/*
Theme Name: Enfold Child
Description: A <a href='http://codex.wordpress.org/Child_Themes'>Child Theme</a> for the Enfold Wordpress Theme.
Version: 1.6
Author: Kriesi
Author URI: http://www.kriesi.at
Template: enfold
*/

/* --- LAYOUT & SPACING --- */
.custom-narrow-section .container { max-width: 66% !important; }
#main > .container_wrap { border: none; }
.iconbox { margin-bottom: 0 !important; }
.custom-blog-grid { margin-bottom: 0px !important; }
.custom-heading-spacing { margin-bottom: 20px !important; }
.custom-icon-gap { margin-bottom: 5px !important; }
.custom-link-pull p { margin-top: -10px !important; }

/* --- FLEX COLUMNS & CARDS --- */
.flex-card-column { position: relative !important; padding-bottom: 25px !important; }
.flex-card-column .avia-button-wrap { position: absolute !important; left: 0 !important; width: 100% !important; margin: 0 !important; }
#top .my-curved-post-border { border: 2px solid #cc5500; border-radius: 20px; overflow: hidden; }

/* --- COLORS & FONTS --- */
#top #s { color: #000000 !important; background-color: #f9f6f0 !important; }
.header_color .av_ajax_search_title, .custom-header-font .av-special-heading-tag, #top #socket .social_bookmarks li a, .hero-credit-section .hero-image-credit a { color: #f9f6f0 !important; }
#top #socket .social_bookmarks li a { opacity: 1 !important; }
.avia-section.custom-background-section { background-color: #fdf5e6 !important; }
.grid-entry-title, .slide-entry-title { font-size: 15px !important; }

/* --- HIDE UNWANTED ELEMENTS --- */
.avia-content-slider .slide-meta, .avia-content-slider .blog-categories, .template-blog .post-meta-infos, .avia-builder-el-av_blog .post-meta-infos, .avia-content-slider .slide-entry-excerpt, .avia-builder-el-av_blog .entry-content, .av-masonry-date, .image-overlay .image-overlay-inside::before, body.home .current-menu-item, .search-result-counter, .template-search article.post-entry .entry-content, .template-search article.post-entry .post-meta-infos, #top .av-special-heading .special-heading-inner-border, body .av-special-heading.elegant-centered .av-special-heading-tag .heading-wrap::before, body .av-special-heading.elegant-centered .av-special-heading-tag .heading-wrap::after { display: none !important; }

/* --- IMAGES & GALLERIES --- */
a.slide-image.search_image { overflow: visible !important; }
a.search_image .image-overlay.overlay-type-extern { left: 0 !important; }
.single-post .entry-content .gallery .gallery-item, .single-post .entry-content .wp-block-gallery .wp-block-image, .single-post .entry-content img.alignleft { margin-right: 3% !important; margin-bottom: 5px !important; }
.avia-content-slider .slide-image { margin-bottom: 5px !important; }
.avia-content-slider .slide-content .slide-entry-title, .avia-content-slider .entry-content-header { margin-top: 0 !important; padding-top: 0 !important; }
.single-post .big-preview img, .archive .big-preview img, .blog .big-preview img, .avia-content-slider .slide-image img { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; }
.avia-section { background-attachment: fixed !important; }

/* --- LIGHTBOX (MAGNIFIC POPUP) --- */
.mfp-image-holder .mfp-content { max-width: 100% !important; width: 100% !important; }
.mfp-image-holder img.mfp-img { max-width: 95vw !important; max-height: 95vh !important; width: auto !important; height: auto !important; padding: 20px 0 !important; box-sizing: border-box; }
.mfp-bottom-bar { max-width: 95vw !important; margin-top: -30px !important; }

/* --- HERO CREDIT OVERLAY --- */
.hero-credit-section .container { position: relative; min-height: 75vh; }
.hero-credit-section .hero-image-credit { position: absolute; bottom: 12px; right: 15px; font-size: 11px; color: #ffffff; background: rgba(0, 0, 0, 0.45); padding: 3px 8px; border-radius: 4px; line-height: 1.3; z-index: 5; pointer-events: auto; }

/* --- SEARCH RESULTS --- */
#top.search-results .small-preview { width: 50% !important; height: auto !important; }
.template-search article.post-entry { width: 31.33% !important; float: left !important; margin: 0 3% 25px 0 !important; clear: none !important; padding: 0 !important; }
.template-search article.post-entry:nth-of-type(3n) { margin-right: 0 !important; }
.template-search article.post-entry:nth-of-type(3n+1) { clear: both !important; }
.search-result-thumb { display: block !important; float: none !important; width: 100% !important; max-width: 100% !important; margin: 0 0 15px 0 !important; }
.search-result-thumb img { width: 100% !important; height: auto !important; object-fit: cover !important; display: block !important; border-radius: 4px; }
.template-search article.post-entry .entry-content-header { display: block !important; text-align: center !important; float: none !important; }
.template-search article.post-entry .post-title { margin: 0 !important; font-size: 1.2em !important; }

/* --- TAG OVERLAY BADGES --- */
.tag-badge-wrapper .tag-overlay-badge { display: block !important; position: absolute !important; top: 15px; right: 15px; background-color: #333333CC; color: #f9f6f0; padding: 4px 12px; line-height: 1; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; z-index: 100 !important; pointer-events: none; border-radius: 2px; }
.tag-badge-wrapper { position: relative; display: block; width: 100%; }

/* --- CUSTOM GALLERIES (DESKTOP) --- */
#top .avia-gallery:not(.default-gallery) .avia-gallery-thumb { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; column-gap: 3% !important; row-gap: 25px !important; }
#top .avia-gallery:not(.default-gallery) .avia-gallery-thumb a { margin: 0 !important; width: 100% !important; border: none !important; padding: 0 !important; background: transparent !important; }
#top .avia-gallery:not(.default-gallery) .avia-gallery-thumb img { border: none !important; width: 100% !important; height: auto !important; }

/* --- RESPONSIVE LAYOUTS (DESKTOP: MIN-WIDTH 768px) --- */
@media only screen and (min-width: 768px) {
    .responsive #top .avia-content-slider .slide-entry-wrap { margin-bottom: 15px !important; }
    .responsive #top .avia-content-slider .slide-entry.av_one_half, .responsive #top .avia-content-slider .slide-entry.av_one_third, .responsive #top .avia-content-slider .slide-entry.av_one_fourth { margin-left: 3% !important; clear: none !important; }
    .responsive #top .avia-content-slider .slide-entry.first { margin-left: 0 !important; clear: both !important; }
    .responsive #top .avia-content-slider .slide-entry.av_one_half { width: 48.5% !important; }
    .responsive #top .avia-content-slider .slide-entry.av_one_third { width: 31.33% !important; }
    .responsive #top .avia-content-slider .slide-entry.av_one_fourth { width: 22.75% !important; }
}

/* --- RESPONSIVE LAYOUTS (MOBILE: MAX-WIDTH 767px) --- */
@media only screen and (max-width: 767px) {
    .av-subnav-menu > li > a, .av-subnav-menu li a .avia-menu-text, .avia-menu.av_menu_icon_beside li a { padding-left: 8px !important; padding-right: 8px !important; }
    #home-hero { min-height: 300px !important; }
    .responsive #top .avia-content-slider .slide-entry.av_one_half, .responsive #top .avia-content-slider .slide-entry.av_one_third, .responsive #top .avia-content-slider .slide-entry.av_one_fourth { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; margin-bottom: 15px !important; clear: both !important; float: none !important; display: block !important; }
    .responsive #top .avia-content-slider .slide-entry:last-child { margin-bottom: 0 !important; }
    #top .avia-gallery:not(.default-gallery) .avia-gallery-thumb { grid-template-columns: 1fr !important; }
    .template-search article.post-entry { width: 100% !important; margin-right: 0 !important; }
    #top .slide-entry-flex-column { margin-bottom: 30px !important; margin-top: 0 !important; }
}

/* Force Placeholder Color for ALL Search Boxes */
#top #wrap_all form[role="search"] input[type="text"]::placeholder {
    color: rgba(51, 51, 51, 0.5) !important;
    opacity: 1 !important;
}
#top #wrap_all form[role="search"] input[type="text"]::-webkit-input-placeholder {
    color: rgba(51, 51, 51, 0.5) !important;
    opacity: 1 !important;
}
#top #wrap_all form[role="search"] input[type="text"]::-moz-placeholder {
    color: rgba(51, 51, 51, 0.5) !important;
    opacity: 1 !important;
}

/* Custom Category Search Box Styling */
#custom-searchform div {
    display: flex;
    gap: 0 !important;
    width: 100%;
    align-items: center;
}

/* Style the text input to match dropdown heights */
#custom-searchform #custom-s {
    flex-grow: 1; /* Expands to fill the space */
    height: 44px; /* Matches standard Enfold dropdown height */
    padding: 10px 15px;
    border: 1px solid #e1e1e1;
    border-right: none; /* Seamless connection to the button */
    border-radius: 3px 0 0 3px;
    font-size: 14px;
    background-color: #ffffff;
    box-shadow: none;
    margin: 0;
    -webkit-appearance: none;
}

/* Semi-transparent placeholder text */
#custom-searchform #custom-s::placeholder {
    color: rgba(51, 51, 51, 0.5);
    opacity: 1;
}

/* Convert the submit button to an icon block */
#custom-searchform #custom-searchsubmit {
    height: 44px; /* Matches input height */
    width: 50px;
    border-radius: 0 3px 3px 0;
    margin: 0;
    padding: 0;
    background-color: #CC5500; /* Kinsleylife burnt orange */
    border: none;
    color: transparent; /* Hides the "Search" text */
    font-size: 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Inject the Enfold magnifying glass icon */
#custom-searchform #custom-searchsubmit::after {
    content: '\e803'; /* Enfold's entypo-fontello search icon */
    font-family: 'entypo-fontello';
    font-size: 18px;
    color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Button hover state */
#custom-searchform #custom-searchsubmit:hover {
    background-color: #2B2D2F; /* Kinsleylife charcoal */
}
figure.semantic-credit-wrapper {
  position: relative !important;
  display: inline-block !important;
  margin: 0 !important;
  width: fit-content !important;
}

figure.semantic-credit-wrapper img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
}

figure.semantic-credit-wrapper figcaption {
  position: absolute !important;
  bottom: 12px !important;
  right: 12px !important;
  z-index: 99 !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  display: block !important;
}

figure.semantic-credit-wrapper figcaption a {
  color: #ffffff !important;
  text-decoration: underline !important;
}