/**
Theme Name: Astra Child
Author: Brainstorm Force
Author URI: http://wpastra.com/about/
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Template: astra
*/

.login h1 a {
background-image: url('http://fazendarenascenca.com.br/wp-content/uploads/2020/08/Convite_11renAngus_Impresso-e1598308955531.png');
background-size: 250px 150px;
width: 250px;
height: 150px;
}
/* Home desktop DNA on the actual wrapper to preserve original hardcoded look */
@media (min-width: 1025px){
  body.home section.wp-block-uagb-section.fr-hero.uagb-section__wrap::after,
  body.home .fr-hero.uagb-section__wrap::after{
    content: "";
    position: absolute;
    left: clamp(12px, 2.5vw, 40px);
    bottom: clamp(12px, 3vh, 40px);
    width: clamp(160px, 26vh, 340px);
    height: clamp(130px, 22vh, 240px);
    z-index: 2; pointer-events: none;
    background-image: url('https://fazendarenascenca.com.br/wp-content/uploads/2025/10/dna.png');
    background-repeat: no-repeat; background-size: contain; background-position: left bottom;
    opacity: 0.22; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.16)); mix-blend-mode: normal;
  }
}

/* Desktop visual separation: ensure primary menu UL doesn't visually hide submenu start
   - Constrain the header nav band so transparent area doesn't mask the dropdown
   - Add a subtle top border/shadow to submenus so they read as separate panels
   - Desktop-only and intentionally non-invasive */
@media (min-width: 921px) {
  /* keep the primary menu bar compact and clip overflow so long UL backgrounds don't extend */
  .ast-desktop .main-header-bar .main-header-container .main-header-menu,
  .ast-desktop #primary-menu {
    max-height: var(--header-height, 96px) !important;
    overflow: visible; /* allow submenus to overflow but keep UL visual compact */
    display: flex !important;
    align-items: center !important;
    background: transparent !important; /* keep header background handling separate */
  }

  /* Add a subtle separator line at the bottom edge of the primary menu UL so the submenu start is obvious */
  .ast-desktop .main-header-bar .main-header-container .main-header-menu::after,
  .ast-desktop #primary-menu::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02));
    pointer-events: none;
    z-index: 1100; /* sit above hero but below submenu panels (which are z-index:1200+) */
  }

  /* Ensure submenus have a visible top edge (border) to read as a separate white panel */
  html body .site .main-header-bar .sub-menu,
  html body #primary-menu .sub-menu,
  .ast-desktop .main-header-bar .sub-menu {
    border-top: 1px solid rgba(0,0,0,0.06) !important;
    margin-top: 0 !important;
    padding-top: 6px !important;
  }

  /* If the theme creates a pseudo-element scrim behind header, ensure it doesn't cover submenu top border */
  .main-header-bar::before { z-index: 0 !important; }
  .main-header-bar > .ast-container { z-index: 2 !important; }
}

/* === AUTO PALETTE HEADER (BEGIN) === */
:root{
  /* Fallbacks globais (ajuste à sua brand)
     --drawer-bg: burgundy background for mobile drawer
     --drawer-fg: cream foreground/text for drawer
     --accent: accent color reused across header/drawer */
  --drawer-bg: #5b2624;
  --drawer-fg: #f3e6cf;
  --accent: #6f4237;

  /* Desktop-stable header palette: frosted light background and dark text */
  --header-solid-bg: rgba(255,255,255,0.92);
  --header-solid-fg: #5b2624;
  --header-overlay-scrim: rgba(0,0,0,.38);
}

/* Header transparente no topo */

.main-header-bar{
  /* Keep defaults; desktop will apply frosted background via media query */
  position: sticky; top: 0; z-index: 999;
  transition: background .25s ease, color .25s ease, backdrop-filter .25s ease, height .22s ease;
}

/* Mobile: reduce header height and spacing without affecting desktop */
@media (max-width: 768px) {
  /* tighten header container */
  .main-header-bar,
  .main-header-bar.is-scrolled { padding-top: 6px; padding-bottom: 6px; }

  /* logo: scale down but keep readable */
  .main-header-bar .site-logo-img img,
  .main-header-bar .custom-logo-link img { max-height: 44px; height: auto; width: auto; }

  /* reduce spacing around branding and controls */
  .main-header-container .site-branding { margin-right: 8px; }
  .ast-mobile-menu-buttons { margin-left: 8px; }

  /* compact menu button */
  .menu-toggle.main-header-menu-toggle { padding: 6px 8px; }

  /* ensure nav area doesn't add extra vertical space */
  .main-header-bar .main-header-bar-navigation { padding-top: 0; padding-bottom: 0; }

  /* keep text readable in tighter space */
  .main-header-bar .menu-link { line-height: 1.2; }
}

/* Desktop frosted header and stable palette */
@media (min-width: 1025px){
  .ast-desktop .main-header-bar{
    background: var(--header-solid-bg) !important;
    color: var(--header-solid-fg) !important;
    backdrop-filter: blur(8px) saturate(120%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky; top:0; z-index: 999;
  }

  /* ensure pseudo-elements used for scrim are hidden on desktop (we use frosted bg)
     and the header content sits above the background */
  .ast-desktop .main-header-bar::before{ display: none !important; }
  .ast-desktop .main-header-bar > .ast-container{ position: relative; z-index: 2; }

  /* Links/icons stable color on desktop */
  .ast-desktop .main-header-bar .menu-link,
  .ast-desktop .main-header-bar .ast-icon{
    color: var(--header-solid-fg) !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    -webkit-text-fill-color: var(--header-solid-fg) !important;
  }

  /* logo should not be overlaid by pseudo elements */
  .ast-desktop .site-branding, .ast-desktop .custom-logo-link, .ast-desktop .site-logo-img { z-index: 3; position: relative; }
}

/* 1) ESCOPAR branco só para o HEADER (não afetar drawer)
   - alvo: itens dentro do layout do header visível (.main-header-container / .ast-flex)
   - evita vazamento para os wrappers do mobile (#ast-mobile-popup, #ast-mobile-header) */
.main-header-container .main-header-bar > .ast-container .menu-link,
.main-header-container .main-header-bar > .ast-container .ast-icon,
.main-header-container .main-header-bar .ast-mobile-menu-buttons .menu-toggle .menu-toggle-icon,
.ast-desktop .main-header-bar > .ast-container .menu-link,
.ast-desktop .main-header-bar > .ast-container .ast-icon {
  color: #fff !important; /* explicit while header transparent */
}

/* Sólido após scroll */
.main-header-bar.is-scrolled{
  background: var(--header-solid-bg);
  color: var(--header-solid-fg);
  backdrop-filter: saturate(120%) blur(8px);
}
.main-header-bar.is-scrolled > .ast-container .menu-link,
.main-header-bar.is-scrolled > .ast-container .ast-icon { color: var(--header-solid-fg); }

/* === Drawer specific styles (use drawer vars and isolate from header) === */
/* Full-screen mobile drawer using the requested palette */
.ast-mobile-popup-drawer,
.ast-mobile-popup-content,
#ast-mobile-popup .ast-mobile-popup-drawer,
#ast-mobile-popup .ast-mobile-popup-content {
  background: var(--drawer-bg) !important;
  color: var(--drawer-fg) !important;
}

/* Links in drawer: full opacity, cream text, high contrast */
.ast-mobile-popup-drawer .menu-link,
.ast-mobile-popup-content .menu-link,
.ast-mobile-popup-drawer .menu-item > a,
.ast-mobile-popup-content .menu-item > a {
  color: var(--drawer-fg) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--drawer-fg) !important;
  mix-blend-mode: normal !important;
}

/* Touch targets >= 52px and subtle separators */
.ast-mobile-popup-drawer .menu-item > a,
.ast-mobile-popup-content .menu-item > a {
  min-height: 52px; display: flex; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--drawer-fg) 8%, transparent);
}

/* Accordion toggles: chevron rotate 90deg when open */
.ast-mobile-popup-drawer .ast-menu-toggle,
.ast-mobile-popup-content .ast-menu-toggle {
  color: var(--drawer-fg) !important;
}
.ast-mobile-popup-drawer .ast-menu-toggle .ast-icon,
.ast-mobile-popup-content .ast-menu-toggle .ast-icon {
  transition: transform .18s ease;
}
.ast-mobile-popup-drawer .menu-item.open > .ast-menu-toggle .ast-icon,
.ast-mobile-popup-content .menu-item.open > .ast-menu-toggle .ast-icon {
  transform: rotate(90deg);
}

/* Ensure submenu items are visible and high-contrast */
.ast-mobile-popup-drawer .sub-menu,
.ast-mobile-popup-content .sub-menu { background: transparent; }
.ast-mobile-popup-drawer .sub-menu .menu-item > a,
.ast-mobile-popup-content .sub-menu .menu-item > a { padding-left: 30px; }
#ast-mobile-header .ast-mobile-popup-content,
.ast-theme-transparent-header #ast-mobile-popup .ast-mobile-popup-content,
.ast-theme-transparent-header #ast-mobile-popup .ast-mobile-popup-drawer {
  background: var(--header-solid-bg) !important;
  color: var(--header-solid-fg) !important;
}

/* Neutralize mix-blend-mode / text-fill / filters that could make text appear light */
#ast-mobile-popup .menu-link,
#ast-mobile-popup .menu-item > a,
#ast-mobile-popup .ast-icon,
.ast-mobile-popup-drawer .menu-link,
.ast-mobile-popup-drawer .menu-item > a,
.ast-mobile-popup-content .menu-link,
.ast-mobile-popup-content .menu-item > a {
  color: var(--header-solid-fg) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--header-solid-fg) !important;
  mix-blend-mode: normal !important;
  filter: none !important;
}

/* If Astra injects inline SVG fills via .ast-mobile-svg, override those too */
#ast-mobile-popup .ast-mobile-svg,
#ast-mobile-popup .ast-mobile-svg *,
.ast-mobile-popup-drawer .ast-mobile-svg,
.ast-mobile-popup-content .ast-mobile-svg,
.ast-mobile-popup-drawer .ast-mobile-svg *,
.ast-mobile-popup-content .ast-mobile-svg * {
  fill: var(--header-solid-fg) !important;
  color: var(--header-solid-fg) !important;
}

/* Astra Customizer / toggle icon catches
   Cover common selectors generated by the Customizer and builder
   ensuring the mobile toggle and injected SVGs are solid and opaque in the popup */
[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg,
.ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg,
.main-header-container .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg,
#ast-mobile-popup .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg,
#ast-mobile-header .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg {
  fill: var(--header-solid-fg) !important;
  color: var(--header-solid-fg) !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  -webkit-text-fill-color: var(--header-solid-fg) !important;
}

/* Estados hover/focus com leve ênfase (mantendo contraste) */
.ast-mobile-popup-drawer .menu-link:hover,
.ast-mobile-popup-content .menu-link:hover,
.ast-mobile-popup-drawer .menu-link:focus,
.ast-mobile-popup-content .menu-link:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 1 !important;
}

/* Alguns temas/combinações aplicam opacidade em submenus: neutralizar */
.ast-mobile-popup-drawer .menu-item,
.ast-mobile-popup-content .menu-item {
  opacity: 1 !important;
}

/* Botão de fechar do drawer (quando existir) */
.ast-mobile-popup-drawer [class*="close"],
.ast-mobile-popup-content [class*="close"],
.ast-mobile-popup-drawer .ast-close-popup,
.ast-mobile-popup-content .ast-close-popup {
  background: var(--header-solid-bg);
  color: var(--header-solid-fg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--header-solid-fg) 25%, transparent);
}

/* Hero: scrim para legibilidade do título */
.hero-scrim{ position: relative; }
.hero-scrim::before{
  content:""; position:absolute; inset:0;
  background: linear-gradient(to bottom, var(--header-overlay-scrim), transparent 40%);
  pointer-events:none;
}

/* Título responsivo e sem quebra feia */
.hero-title{
  font-size: clamp(24px, 6vw, 40px);
  line-height: 1.1;
  letter-spacing: .02em;
  color: #fff;
  text-wrap: balance;
}
.hero-title-wrap{ position: relative; display: inline-block; }
.hero-title-wrap::before{
  content:""; position:absolute; inset:-8px -12px;
  background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,0));
  border-radius: 12px; z-index:-1;
}
/* === AUTO PALETTE HEADER (END) === */

/* === CHILD THEME HEADER OVERRIDES (BEGIN) === */

/* REMOVED: global body color reset — caused drawer palette to leak into main content.
   Drawer/mobile-specific styling is handled in the dedicated mobile/drawer selectors above. */

.site a,
.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Force non-header menu and icons to be fully opaque and neutral blend mode */
.menu-link,
.ast-icon {
  opacity: 1 !important;
  -webkit-text-fill-color: initial !important;
  mix-blend-mode: normal !important;
}

/* Header sizing + smooth shrink */
.main-header-bar{
  --header-height: 96px;
  height: var(--header-height);
  transition: background .25s ease, color .25s ease, backdrop-filter .25s ease, height .25s ease, padding .25s ease;
}
.main-header-bar .custom-logo-link img,
.main-header-bar .site-logo-img,
.main-header-bar .ast-site-identity img {
  transition: transform .25s ease;
}
.main-header-bar.is-scrolled{
  --header-height: 68px;
  height: var(--header-height);
  background: var(--header-solid-bg);
  color: var(--header-solid-fg);
  backdrop-filter: saturate(120%) blur(8px);
}
.main-header-bar.is-scrolled .custom-logo-link img,
.main-header-bar.is-scrolled .site-logo-img,
.main-header-bar.is-scrolled .ast-site-identity img {
  transform: scale(.82);
}

/* CTA (Acesse o Catálogo) styling — JS marks desktop CTA with .header-cta */
.menu-link.header-cta,
.header-cta {
  display: inline-block;
  padding: 14px 20px;
  background: var(--accent);
  color: var(--drawer-fg) !important;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
  transition: transform .12s ease, box-shadow .12s ease, text-decoration .12s;
}
.menu-link.header-cta:hover,
.header-cta:hover,
.menu-link.header-cta:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: translateY(-2px);
  outline: none;
}
.menu-link.header-cta:focus {
  box-shadow: none;
}

/* Dropdowns inside header */
.main-header-bar .sub-menu {
  background: var(--drawer-fg);
  color: var(--drawer-bg);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(16,14,12,0.08);
  padding: 8px;
  opacity: 1 !important;
}
.main-header-bar .sub-menu .menu-item > a {
  color: var(--drawer-bg) !important;
  opacity: 1 !important;
  padding: 10px 16px;
  display: block;
}

/* Rotate chevron when submenu open on desktop */
.main-header-bar .menu-item-has-children > .ast-menu-toggle .ast-icon,
.main-header-bar .menu-item-has-children > a .ast-icon { transition: transform .18s ease; }
.main-header-bar .menu-item-has-children.open > .ast-menu-toggle .ast-icon,
.main-header-bar .menu-item-has-children:hover > .ast-menu-toggle .ast-icon { transform: rotate(90deg); }

/* Clickable area and focus ring */
.menu-link,
.main-header-bar .menu-item > a {
  padding: 10px 12px;
  min-height: 44px;
  line-height: inherit;
}
.menu-link:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 2px;
}

/* Neutralize opacity that some themes apply to submenus/menu-items */
.sub-menu,
.menu-item { opacity: 1 !important; }

/* Ensure header-only white text stays scoped to header containers */
.main-header-container .main-header-bar > .ast-container .menu-link,
.main-header-container .main-header-bar > .ast-container .ast-icon,
.ast-desktop .main-header-bar > .ast-container .menu-link,
.ast-desktop .main-header-bar > .ast-container .ast-icon { color: #fff !important; }

/* === CHILD THEME HEADER OVERRIDES (END) === */

/* === DESKTOP-SPECIFIC HEADER FIXES (min-width: 921px) === */
@media (min-width: 921px){

  /* Ensure top-level nav layout: logo left, menu center, CTA right is handled by theme layout
     but we enforce consistent vertical centering and spacing between items */
  .ast-desktop .main-header-bar .main-header-container .ast-row {
    align-items: center;
    display: flex;
  }

  /* Top-level menu item spacing and alignment */
  .ast-desktop .main-header-bar .main-header-container .main-navigation .menu-item {
    margin-inline-end: 24px; /* gap between items (adjustable: 24-32px) */
    display: inline-flex;
    align-items: center;
  }
  /* Remove trailing margin from last item to avoid layout drift */
  .ast-desktop .main-header-bar .main-header-container .main-navigation .menu-item:last-child { margin-inline-end: 0; }

  /* Enforce min clickable areas and vertical centering */
  .ast-desktop .main-header-bar .main-header-container .menu-item > a,
  .ast-desktop .main-header-bar .main-header-container .menu-link {
    min-height: 44px;
    padding-top: 8px; padding-bottom: 8px;
    display: inline-flex; align-items: center;
  }

  /* Hide mobile toggle on desktop */
  .ast-desktop .main-header-bar .ast-mobile-menu-buttons,
  .ast-desktop .main-header-bar .menu-toggle { display: none !important; }

  /* CTA: prefer .ast-custom-button-link; hide duplicate .menu-link inside .ast-masthead-custom-menu-items */
  .ast-masthead-custom-menu-items .menu-link { display: none !important; }
  .ast-masthead-custom-menu-items .ast-custom-button-link {
    display: inline-block !important;
    /* Restore original Astra sizing/padding so button matches theme defaults */
    padding: 14px 20px !important;
    background: var(--accent) !important; /* keep current maroon */
    color: #FFF8F0 !important; /* soft white/cream text on desktop */
    border-radius: 999px !important; /* pill */
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.08) !important; /* subtle rest shadow matching original */
  }
  /* Accessible focus-visible (desktop): visible outline/fillet without altering hover transform */
  .ast-masthead-custom-menu-items .ast-custom-button-link:focus-visible{
    outline: none !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #6f4237) 18%, transparent), 0 4px 14px rgba(0,0,0,0.12) !important;
    border: 2px solid rgba(255,255,255,0.04) !important;
  }

  /* Normalize inner .ast-button so button appears as a single element */
  .ast-masthead-custom-menu-items .ast-custom-button-link .ast-button{
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    color: inherit !important;
    display: inline-block !important;
    line-height: 1 !important;
  }

  /* Parent items should be relative so submenu can anchor */
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children { position: relative; }

  /* Extra-high-specificity: ensure top-level menu li are positioned relative to anchor submenus */
  .ast-desktop #primary-menu > li.menu-item-has-children,
  .ast-desktop .main-header-menu > li.menu-item-has-children { position: relative !important; }


  /* Anchor submenu under the parent item, left-aligned to the parent */
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children > .sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin: 6px 0 0 0 !important;
    min-width: 280px; width: max-content;
    z-index: 9999;
    opacity: 1 !important;
    padding: 8px;
    border-radius: 12px;
    background: var(--drawer-fg) !important; /* cream */
    color: var(--drawer-bg) !important; /* dark brown text */
    box-shadow: 0 8px 20px rgba(16,14,12,0.06);
    border: none !important;
  }

  /* Submenu items visual: full opacity, dark text and comfortable spacing */
  .ast-desktop .main-header-bar .main-header-container .sub-menu .menu-item > a{
    color: var(--drawer-bg) !important;
    opacity: 1 !important;
    padding: 10px 16px; display: block; min-height: 44px; line-height: 1.1;
    border-bottom: 1px solid color-mix(in srgb, var(--drawer-bg) 8%, transparent);
  }
  .ast-desktop .main-header-bar .main-header-container .sub-menu .menu-item:last-child > a{ border-bottom: none; }

  /* Ensure submenu container is a vertical list (avoid flex/tab layout) */
  .ast-desktop .main-header-bar .main-header-container .sub-menu,
  .ast-desktop #primary-menu .sub-menu { display: block !important; flex-direction: column !important; white-space: normal !important; }

  /* If Astra injects inline left/top, make sure submenus anchor under the parent */
  .ast-desktop #primary-menu .menu-item-has-children > .sub-menu[style],
  .ast-desktop .main-header-menu .menu-item-has-children > .sub-menu[style] {
    left: 0 !important;
    top: 100% !important;
    transform: none !important;
  }

  /* Chevron rotation via aria-expanded or .open class */
  .ast-desktop .main-header-bar .menu-item-has-children > .ast-menu-toggle .ast-icon,
  .ast-desktop .main-header-bar .menu-item-has-children > a .ast-icon{ transition: transform .18s ease; }
  .ast-desktop .main-header-bar .menu-item-has-children[aria-expanded="true"] > .ast-menu-toggle .ast-icon,
  .ast-desktop .main-header-bar .menu-item-has-children.open > .ast-menu-toggle .ast-icon{
    transform: rotate(90deg);
  }

  /* Hover/focus states: underline without opacity change */
  .ast-desktop .main-header-bar .menu-link:hover,
  .ast-desktop .main-header-bar .menu-link:focus,
  .ast-desktop .main-header-bar .main-navigation .menu-item > a:hover,
  .ast-desktop .main-header-bar .main-navigation .menu-item > a:focus{
    text-decoration: underline; text-underline-offset: 3px; opacity: 1 !important;
  }

  /* Prevent global white/opacity leaks: enforce neutralization on desktop */
  .ast-desktop .menu-link,
  .ast-desktop .ast-icon,
  .ast-desktop .menu-item,
  .ast-desktop .sub-menu { opacity: 1 !important; mix-blend-mode: normal !important; -webkit-text-fill-color: initial !important; }

  /* Ensure header shrink paddings reduced slightly when scrolled */
  .ast-desktop .main-header-bar.is-scrolled .ast-container{ padding-inline: 12px !important; }

}
/* === END DESKTOP-SPECIFIC HEADER FIXES === */

/* === HIGH-SPECIFICITY SAFEGUARDS (LAST-RESORT OVERRIDES) === */
/* These rules are intentionally highly specific and placed last to beat dynamic styles
   generated by Astra's customizer/dynamic-css bundles. Use only to neutralize leaks. */

html body .site .main-header-bar .main-header-container .main-header-bar-navigation .main-header-menu > li > a.menu-link,
html body .site .main-header-bar .main-header-container .main-header-bar-navigation .main-header-menu > li > .ast-menu-toggle,
html body .site .main-header-bar .main-header-container .main-header-bar-navigation .main-header-menu .ast-icon {
  color: inherit !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  -webkit-text-fill-color: initial !important;
}

/* Force submenus to inherit the child-theme palette unless explicitly inside mobile popup */
html body .site .main-header-bar .main-header-container .main-header-bar-navigation .main-header-menu li .sub-menu {
  background: var(--drawer-fg) !important;
  color: var(--drawer-bg) !important;
  opacity: 1 !important;
  transform: none !important;
}

/* If Astra places the submenu with left: 50% and transform, remove that and position under parent */
html body .site .main-header-bar .main-header-container .main-header-bar-navigation .main-header-menu li .sub-menu[style],
html body .site .main-header-bar .main-header-container .main-header-bar-navigation .main-header-menu li .sub-menu {
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

/* Extra enforcement: if Astra injects inline top/left, override to anchor under parent on desktop */
@media (min-width: 921px){
  html body .site .main-header-bar .main-header-container .main-header-bar-navigation .main-header-menu li .sub-menu[style] {
    left: 0 !important;
    top: 100% !important;
    right: auto !important;
    transform: none !important;
  }

  /* Neutralize any global color reset that leaked drawer variables into main content */
  html body .site, html body .site .site, html body .site .site-content, html body .site .entry-content, html body .site .entry-title, html body .site .entry-summary {
    color: unset !important;
  }
}
/* Header top scrim + scrolled behavior (desktop only)
   - Add a subtle scrim behind the header in the transparent/top state for
     legibility over light hero images.
   - When .is-scrolled is applied, switch to solid header, swap link colors,
     and apply smooth shrink (height + logo scale). */
@media (min-width: 921px){
  .main-header-bar{ position: sticky; top:0; z-index: 999; }

  /* scrim sits behind header content but above page hero */
  .main-header-bar::before{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.36), rgba(0,0,0,0.18));
    pointer-events: none;
    z-index: 0;
    transition: opacity .25s ease, background .25s ease;
    opacity: 1;
  }
  .main-header-bar > .ast-container{ position: relative; z-index: 1; }

  /* Ensure header-top state links/icons are high-contrast (cream/white) */
  .ast-desktop .main-header-bar .menu-link,
  .ast-desktop .main-header-bar .ast-icon {
    color: var(--drawer-fg) !important; /* cream */
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    -webkit-text-fill-color: var(--drawer-fg) !important;
  }

  /* Scrolled state: solid background, swap link colors and apply shrink */
  .main-header-bar.is-scrolled::before{ opacity: 0; background: none; }
  .main-header-bar.is-scrolled{
    background: var(--header-solid-bg) !important;
    color: var(--header-solid-fg) !important;
    --header-height: 68px;
    height: var(--header-height) !important;
    backdrop-filter: saturate(120%) blur(8px) !important;
    transition: height .22s ease, background .22s ease, color .22s ease;
  }
  .main-header-bar.is-scrolled > .ast-container .menu-link,
  .main-header-bar.is-scrolled > .ast-container .ast-icon{
    color: var(--header-solid-fg) !important;
    -webkit-text-fill-color: var(--header-solid-fg) !important;
  }

  /* Logo shrink in scrolled state */
  .main-header-bar .custom-logo-link img,
  .main-header-bar .site-logo-img,
  .main-header-bar .ast-site-identity img { transition: transform .25s ease; }
  .main-header-bar.is-scrolled .custom-logo-link img,
  .main-header-bar.is-scrolled .site-logo-img,
  .main-header-bar.is-scrolled .ast-site-identity img { transform: scale(.82) !important; }

  /* CTA: ensure pill, vertical alignment, white text and hover/focus
     Keep only typography changes (desktop): semibold + slight letter-spacing.
     Do NOT force size/padding or add shadows here so Astra's defaults remain intact. */
  .ast-masthead-custom-menu-items .menu-link { display: none !important; }
  .ast-masthead-custom-menu-items .ast-custom-button-link{
    display: inline-flex !important; align-items: center; justify-content: center;
    min-height: 48px; padding: 14px 20px !important; background: var(--accent) !important; color: #FFF8F0 !important;
    border-radius: 999px !important; font-weight: 100 !important; letter-spacing: 0.02em !important; text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.08) !important;
  }
  /* Keep the existing lift transform and original subtle hover shadow */
  .ast-masthead-custom-menu-items .ast-custom-button-link:hover{ transform: translateY(-2px); text-decoration: underline; box-shadow: 0 6px 20px rgba(0,0,0,0.10) !important; }
  .ast-masthead-custom-menu-items .ast-custom-button-link:focus{ outline: none !important; }

  /* Ensure submenus remain legible and anchored under parent in both states */
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children { position: relative !important; }
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children > .sub-menu{
    position: absolute !important; top: 100% !important; left: 0 !important; transform: none !important;
    min-width: 280px; width: max-content; z-index: 9999; padding: 8px; border-radius: 12px;
    background: var(--drawer-fg) !important; color: var(--drawer-bg) !important; opacity: 1 !important;
    box-shadow: 0 8px 20px rgba(16,14,12,0.06) !important; border: none !important;
  }
  .ast-desktop .main-header-bar .main-header-container .sub-menu .menu-item > a{ color: var(--drawer-bg) !important; opacity:1 !important; }

  /* Ensure no opacity/mix-blend leaks on desktop */
  .ast-desktop .menu-link, .ast-desktop .ast-icon { opacity: 1 !important; mix-blend-mode: normal !important; -webkit-text-fill-color: initial !important; }

  /* Hide mobile menu buttons on desktop */
  .ast-desktop .main-header-bar .ast-mobile-menu-buttons, .ast-desktop .main-header-bar .menu-toggle { display: none !important; }
}

/* Fallback: ensure any injected SVG fills inside header submenus follow palette */
html body .site .main-header-bar svg, html body .site .main-header-bar svg * { fill: currentColor !important; }

/* Small visual nudge for submenu alignment on very narrow parent items */
.ast-desktop .main-header-bar .main-header-container .main-header-menu .menu-item-has-children > .sub-menu { padding-inline: 4px !important; }
/* === Desktop Header - Estilo Fazenda Renascença ===
   Fundo bege quente translúcido (efeito vidro sutil) 
   + leve gradiente dourado à esquerda 
   + sombra suave e sólido no sticky.
   Autor: Leonardo Teixeira — 2025
==================================================== */
/* === Header Desktop (matte premium, sem blur, 100% pigmentado) === */
@media (min-width:1025px){

  /* Zera fundos/pseudo-layers do Astra que lavam a cor */
  .ast-desktop .site-header,
  .ast-desktop .site-header::before,
  .ast-theme-transparent-header .site-header,
  .ast-theme-transparent-header .site-header::before{
    background: transparent !important;
  }

  /* Camada principal do header */
  .ast-desktop .main-header-bar,
  .ast-theme-transparent-header .main-header-bar{
    /* Cor base + profundidade vertical + toque dourado à esquerda */
    background: linear-gradient(180deg, #efe3cd8f 0%, #e6d9bf00 100%), linear-gradient(90deg, rgba(205, 164, 111, 0.06) 0%, rgba(0, 0, 0, 0) 22%), #e6d9bf00 !important;                                    /* fallback sólido */

    /* Evita “vidro” puxar céu claro */
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;

    /* Acabamento (alguns temas ignoram border/shadow; reforço o seletor abaixo) */
    transition: background .25s ease, box-shadow .25s ease !important;
  }

  /* Reforço de borda/sombra com seletor mais específico */
  header.site-header .main-header-bar{
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
  }

  /* Sticky mantém o mesmo matte (consistência e legibilidade) */
  .ast-sticky-active .main-header-bar{
    background:
      linear-gradient(180deg, #EFE3CD 0%, #E6D9BF 100%),
      #E6D9BF !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08) !important;
  }

  /* Dropdowns sempre legíveis */
  .main-header-menu .sub-menu{
    background: rgba(255,255,255,0.96) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  }
}


/* === IMMEDIATE FIX: Force desktop submenus to white and anchor under parent === */
@media (min-width: 921px){
  /* Target exact variants observed in DevTools and override inline placement */
  html body .site .main-header-bar .sub-menu,
  html body .site #primary-menu .sub-menu,
  .ast-desktop .main-header-bar .sub-menu,
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children > .sub-menu {
    background: #ffffff !important;
    background-image: none !important;
    color: var(--header-solid-fg, #5b2624) !important;
    box-shadow: 0 8px 20px rgba(10,8,6,0.06) !important;
    border: 1px solid color-mix(in srgb, var(--header-solid-fg, #5b2624) 6%, transparent) !important;
    border-radius: 10px !important;
    padding: 6px !important;
    margin: 0 !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    -webkit-text-fill-color: initial !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
    background-clip: padding-box !important;
    z-index: 1200 !important;
  }

  /* Remove visible gap between parent and submenu: sit flush under parent */
  html body .site #primary-menu > li.menu-item-has-children > .sub-menu,
  html body .site .main-header-menu > li.menu-item-has-children > .sub-menu,
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children > .sub-menu {
    top: 100% !important;
    margin-top: 0 !important;
    padding-top: 4px !important;
  }

  /* Ensure inline left/top injected by JS is overridden to anchor under the parent */
  html body .site .main-header-bar .menu-item-has-children > .sub-menu[style],
  html body .site #primary-menu > li.menu-item-has-children > .sub-menu[style],
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children > .sub-menu[style] {
    left: 0 !important;
    top: 100% !important;
    transform: none !important;
    margin-top: 0 !important;
  }

  /* Hide any pseudo-elements that might paint a tint */
  html body .site .main-header-bar .sub-menu::before,
  html body .site .main-header-bar .sub-menu::after,
  .ast-desktop .main-header-bar .sub-menu::before,
  .ast-desktop .main-header-bar .sub-menu::after {
    content: none !important; display: none !important; background: transparent !important;
  }

  /* Submenu links: dark text, good hit area */
  html body .site .main-header-bar .sub-menu .menu-item > a,
  html body .site #primary-menu .sub-menu .menu-item > a {
  color: #542F29 !important; /* ensure readable dark-brown default */
  -webkit-text-fill-color: #542F29 !important;
  opacity: 1 !important;
  padding: 12px 16px !important; /* vertical ~12px, horizontal ~16px */
  display: block !important;
  min-height: 40px !important; /* comfortable tap/click area */
  }

  /* === UX: Vertical, full-width submenu items with clear labels and hover/focus states === */
  /* Make submenu a vertical list and ensure each item fills submenu width */
  html body .site .main-header-bar .sub-menu,
  html body .site #primary-menu .sub-menu,
  .ast-desktop .main-header-bar .sub-menu {
    display: block !important;
    width: max-content; /* allow natural width but items fill container */
    min-width: 220px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.06) !important; /* very light neutral */
    border-radius: 8px !important;
    box-shadow: 0 8px 18px rgba(10,8,6,0.06) !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    z-index: 1200 !important;
  }

  /* Each li should be full-width and stack vertically */
  html body .site .main-header-bar .sub-menu .menu-item,
  html body .site #primary-menu .sub-menu .menu-item {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Link labels: left-aligned, readable color matching main labels */
  html body .site .main-header-bar .sub-menu .menu-item > a,
  html body .site #primary-menu .sub-menu .menu-item > a {
  color: #542F29 !important; /* marrom escuro - visible by default */
  -webkit-text-fill-color: #542F29 !important;
  opacity: 1 !important;
  text-align: left !important;
  font-weight: 400 !important; /* regular */
  font-size: 15px !important;
  padding: 12px 16px !important; /* comfortable padding */
  min-height: 40px !important; /* comfortable tap/click area */
  transition: background-color 140ms ease, color 140ms ease, font-weight 140ms ease !important;
  border-radius: 6px !important;
  line-height: 1.2 !important;
  }

  /* Hover / focus / active: maroon background and white text (contrast AA) */
  html body .site .main-header-bar .sub-menu .menu-item > a:hover,
  html body .site .main-header-bar .sub-menu .menu-item > a:focus,
  html body .site #primary-menu .sub-menu .menu-item > a:hover,
  html body .site #primary-menu .sub-menu .menu-item > a:focus {
  background: var(--accent, #6f4237) !important; /* marrom/brand */
  color: #ffffff !important;
  font-weight: 600 !important; /* semibold on hover for hierarchy */
  outline: none !important;
  text-decoration: none !important;
  }

  /* Ensure keyboard users see a clear focus ring for accessibility */
  html body .site .main-header-bar .sub-menu .menu-item > a:focus{
  /* visible focus: 2px outer glow and a subtle inset lateral fillet to aid keyboard users */
  outline: none !important;
  box-shadow: inset 4px 0 0 0 var(--accent, #6f4237), 0 0 0 3px color-mix(in srgb, var(--accent, #6f4237) 18%, transparent) !important;
  background: color-mix(in srgb, var(--accent, #6f4237) 8%, transparent) !important;
  }

  /* Keep submenu anchored to left of parent and flush (no gap) */
  html body .site #primary-menu > li.menu-item-has-children > .sub-menu,
  html body .site .main-header-menu > li.menu-item-has-children > .sub-menu,
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children > .sub-menu {
    left: 0 !important;
    top: 100% !important;
    margin-top: 0 !important;
    pointer-events: auto !important;
  }

  /* Do not change mobile behavior: scoping to desktop-only media query preserves mobile drawer */
}

/* Microthemer conflict fixes: neutralize active-styles.css submenu spacing/background rules */
@media (min-width: 921px) {
  /* Microthemer writes `#primary-menu .sub-menu { margin-top: -10px !important; }` in active-styles.css.
     Force neutral values with highest reasonable specificity while keeping changes scoped to the child theme. */
  html body .site #primary-menu .sub-menu,
  html body .site .main-header-menu > li.menu-item-has-children > .sub-menu,
  .ast-desktop .main-header-bar .main-header-container .menu-item-has-children > .sub-menu,
  #primary-menu .sub-menu {
    /* anchor directly under parent, remove extra margin from Microthemer */
    top: 100% !important;
    left: 0 !important;
    margin-top: 0 !important;
    padding-top: 4px !important; /* small gap if desired, else set to 0 */
    transform: none !important;
    position: absolute !important;
  }

  /* If Microthemer is adding a background/tint variable, prefer white for dropdown panels */
  #primary-menu .sub-menu, html body .site #primary-menu .sub-menu {
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: 0 8px 20px rgba(10,8,6,0.06) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    z-index: 1300 !important;
  }

  /* Last-resort: ensure hovered/focused submenu items always show white text and neutral fills
     - Extra selector specificity to override earlier rules that re-apply the dark color on hover
     - Covers anchor, child span, and SVG fills inside the link */
  html body .site .main-header-bar .sub-menu .menu-item > a:hover,
  html body .site .main-header-bar .sub-menu .menu-item > a:focus,
  html body .site .main-header-bar .sub-menu .menu-item > a:active,
  html body .site #primary-menu .sub-menu .menu-item > a:hover,
  html body .site #primary-menu .sub-menu .menu-item > a:focus,
  html body .site #primary-menu .sub-menu .menu-item > a:active,
  html body .site .main-header-bar .sub-menu .menu-item > a:hover *,
  html body .site .main-header-bar .sub-menu .menu-item > a:focus *,
  html body .site #primary-menu .sub-menu .menu-item > a:hover *,
  html body .site #primary-menu .sub-menu .menu-item > a:focus * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    fill: #ffffff !important;
    transition: background-color 140ms ease-out, color 140ms ease-out !important;
  }
}

/* Removido bloco de correção avançada – solução limpa: regras problemáticas eliminadas em active-styles.css */
/* Mobile background column - minimal fix for 'Nossa História' image
   Mantém código enxuto: 1 regra + 1 ajuste de inner-wrap.
   Ajuste o valor de min-height conforme necessário (380–420px). */
@media (max-width:480px){
  .uagb-block-f3fa5f44.uagb-column__wrap{min-height:380px !important;margin:0 !important;background-size:cover !important;background-position:center center !important;}
  .uagb-block-f3fa5f44.uagb-column__wrap > .uagb-column__inner-wrap{min-height:inherit !important;}
}

/* === HERO REFINEMENT (Home only) (body.home .fr-hero / .uagb-block-f79e1cea) ===
   Objetivo: gradiente translúcido animado + legibilidade do texto + entrada suave
   Cores: marrom escuro #6D5032, bege claro #F0E8DC, texto marrom #3B2314, subtítulo #F7F2E9
   Notas:
   - Mantém estética atual, apenas melhora contraste/hierarquia/dinâmica
   - Animações suaves e discretas; respeita prefers-reduced-motion
*/

/* Paleta utilitária local (não impacta global) */
body.home .fr-hero,
body.home .uagb-block-f79e1cea,
body.home .wp-block-uagb-section:first-of-type,
body.home .wp-block-uagb-section:first-of-type .uagb-section__wrap{
  --fr-brown-dark: #6D5032;
  --fr-beige-light: #F0E8DC;
  --fr-brown-text: #3B2314;
  --fr-cream-text: #F7F2E9;
  --fr-serif: Georgia, "Times New Roman", serif;
}


/* Container hero: pilha/z-index previsível */
body.home .fr-hero.uagb-section__wrap, body.home .uagb-block-f79e1cea.uagb-section__wrap,
body.home .fr-hero.wp-block-uagb-section, body.home .uagb-block-f79e1cea.wp-block-uagb-section{
  position: relative !important;
  overflow: hidden;
}

/* Desativar overlays de plugin para evitar empilhamento; usaremos ::before */
/* Home: desativar overlay padrão do UAGB (evita dupla transparência) */
body.home .fr-hero .uagb-section__overlay, body.home .uagb-block-f79e1cea .uagb-section__overlay{ display: none !important; }

/* ÚNICO overlay via ::before com falloff diagonal (tablet apenas)
   Nota: Desktop (>=1025px) não aplica faixa; composição fica com a imagem + texto */
@media (min-width: 769px) and (max-width: 1024px){
  body.home .fr-hero, body.home .uagb-block-f79e1cea{ position: relative !important; }
  /* permitir faixa começar fora da tela e não ser cortada */
  body.home .fr-hero.uagb-section__wrap, body.home .uagb-block-f79e1cea.uagb-section__wrap,
  body.home .fr-hero.wp-block-uagb-section, body.home .uagb-block-f79e1cea.wp-block-uagb-section{ overflow: visible; }
  body.home .fr-hero::before, body.home .uagb-block-f79e1cea::before{
    content: "";
    position: absolute; top: 0; bottom: 0; left: -6vw; /* tablet pode ocupar toda a altura */
    width: min(52vw, 760px); /* cobre ~40–45% com diagonal */
    z-index: 1; pointer-events: none;
    /* Gradiente alternativo sem bege visível */
    background: linear-gradient(90deg,
      rgba(207,166,113,0.95) 0%,    /* #CFA671 */
      rgba(214,178,128,0.92) 38%,   /* tom intermediário */
      rgba(207,166,113,0.30) 64%,   /* fade para transparência mais rápido */
      rgba(207,166,113,0.00) 100%
    );
    /* Diagonal ~12°: avança da esquerda para o centro */
    clip-path: polygon(0 0, 78% 0, 100% 100%, 0% 100%);
  }
}

/* Faixa diagonal no desktop (>=1025px), exceto em iOS (guard mais abaixo) */
@media (min-width: 1025px){
  body.home .fr-hero, body.home .uagb-block-f79e1cea{ position: relative !important; }
  /* garantir que a faixa não seja cortada */
  body.home .fr-hero.uagb-section__wrap, body.home .uagb-block-f79e1cea.uagb-section__wrap,
  body.home .fr-hero.wp-block-uagb-section, body.home .uagb-block-f79e1cea.wp-block-uagb-section{ overflow: visible; }
  
  /* FAIXA DIAGONAL DESKTOP - ESPECIFICIDADE CORRIGIDA */
  html body.home .fr-hero::before, 
  html body.home .uagb-block-f79e1cea::before,
  html body.home .fr-hero.uagb-section__wrap::before,
  html body.home .uagb-block-f79e1cea.uagb-section__wrap::before,
  html body.home .wp-block-uagb-section.fr-hero::before,
  html body.home .wp-block-uagb-section.uagb-block-f79e1cea::before{
    content: "" !important;
    position: absolute !important; 
    top: 0 !important; 
    bottom: 0 !important; 
    left: -8vw !important;
    /* desktop cobre um pouco mais para equilibrar composição */
    width: min(48vw, 820px) !important;
    z-index: 1 !important; 
    pointer-events: none !important;
    background: linear-gradient(90deg,
      rgba(207,166,113,0.95) 0%,
      rgba(214,178,128,0.92) 36%,
      rgba(207,166,113,0.30) 62%,
      rgba(207,166,113,0.00) 100%
    ) !important;
    /* Mantém a diagonal semelhante ao tablet */
    clip-path: polygon(0 0, 78% 0, 100% 100%, 0% 100%) !important;
    display: block !important;
  }
}

/* iOS guard: desativar faixa no desktop para evitar inflar header em iPad com modo desktop */
/* CORRIGIDO: Substituído @supports por detecção JavaScript confiável */
/* Aplicar apenas em iPads com tela grande (modo desktop) */
@media (min-width: 1025px) {
  .ios-device body.home .fr-hero::before, 
  .ios-device body.home .uagb-block-f79e1cea::before { 
    content: none !important; 
  }
}

/* Fallback usando media query para caso JS falhe */
@media (min-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) {
  @media (max-device-width: 1366px) {
    body.home .fr-hero::before, 
    body.home .uagb-block-f79e1cea::before { 
      content: none !important; 
    }
  }
}

/* DNA via ::after (Home) — tamanhos por breakpoint */
@media (min-width: 1024px){
  body.home .fr-hero::after, body.home .uagb-block-f79e1cea::after{
    content: "";
    position: absolute; left: clamp(12px, 3vw, 28px); bottom: clamp(12px, 3vw, 28px);
    width: clamp(160px, 24vh, 320px); height: clamp(80px, 16vh, 180px);
    z-index: 2; pointer-events: none;
    background-image: url('https://fazendarenascenca.com.br/wp-content/uploads/2025/10/dna.png');
    background-repeat: no-repeat; background-size: contain; background-position: left bottom;
    opacity: 0.15; filter: none; mix-blend-mode: normal;
  }
}
@media (min-width: 769px) and (max-width: 1023px){
  body.home .fr-hero::after, body.home .uagb-block-f79e1cea::after{
    content: "";
    position: absolute; left: clamp(10px, 2.5vw, 22px); bottom: clamp(10px, 2.5vw, 22px);
    width: clamp(120px, 14vh, 200px); height: clamp(64px, 10vh, 140px);
    z-index: 2; pointer-events: none;
    background-image: url('https://fazendarenascenca.com.br/wp-content/uploads/2025/10/dna.png');
    background-repeat: no-repeat; background-size: contain; background-position: left bottom;
    opacity: 0.14;
  }
}

/* DNA gráfico: ocultar no mobile */
.fr-hero .dna-graphic, .fr-hero .fr-dna,
.uagb-block-f79e1cea .dna-graphic, .uagb-block-f79e1cea .fr-dna{
  position: absolute;
  left: clamp(8px, 2.5vw, 24px);
  bottom: clamp(8px, 2.5vw, 24px);
  width: clamp(120px, 22vw, 280px);
  max-width: 40%;
  opacity: 0.12;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(.22,.61,.36,1);
}
@media (max-width: 768px){
  .fr-hero .dna-graphic, .fr-hero .fr-dna,
  .uagb-block-f79e1cea .dna-graphic, .uagb-block-f79e1cea .fr-dna{
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Bloco de texto: desktop à esquerda, mobile centralizado em cartão translúcido */
body.home .fr-hero .uagb-section__inner-wrap, body.home .uagb-block-f79e1cea .uagb-section__inner-wrap{
  position: relative;
  z-index: 2;
  max-width: 640px; /* largura de leitura consistente */
  margin-left: clamp(16px, 5vw, 6vw);
  margin-right: auto;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 32px);
  /* posicionar no primeiro terço vertical (dependendo da altura da hero) */
  padding-top: clamp(48px, 16vh, 28vh);
  padding-bottom: clamp(24px, 12vh, 18vh);
  text-align: left;
  transition: all 0.5s cubic-bezier(.22,.61,.36,1);
}
@media (max-width: 768px){
  body.home .fr-hero .uagb-section__inner-wrap, body.home .uagb-block-f79e1cea .uagb-section__inner-wrap{
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: clamp(16px, 4vw, 24px) clamp(16px, 5vw, 24px);
    min-height: 300px; /* valor original restaurado */
    width: min(86vw, 680px);
    margin-left: auto; margin-right: auto;
    /* espaçamento original restaurado */
    margin-top: calc(var(--header-height, 64px) + 24px); /* valor original */
    margin-bottom: calc(clamp(72px, 12vh, 120px) + env(safe-area-inset-bottom, 0px)); /* valor original */
    transition: all 0.5s cubic-bezier(.22,.61,.36,1);
  }
}

/* Desativar overlay no mobile (apenas card) */
@media (max-width: 768px){
  body.home .fr-hero::before, body.home .uagb-block-f79e1cea::before{ content: none !important; }
}

/* Background position para focar composição */
@media (min-width: 769px){
  body.home .fr-hero.uagb-section__wrap, body.home .uagb-block-f79e1cea.uagb-section__wrap{ background-position: 65% center !important; background-size: cover !important; min-height: 80vh; }
}

/* Mobile: configuração restaurada ao estado original funcional - UPDATE 16:45 */
@media (max-width: 768px){
  body.home .fr-hero.uagb-section__wrap, body.home .uagb-block-f79e1cea.uagb-section__wrap{ 
    background-position: 55% center !important; 
    background-size: cover !important; 
  }
  
  /* Força clear cache e override */
  body.home .fr-hero .uagb-section__inner-wrap, 
  body.home .uagb-block-f79e1cea .uagb-section__inner-wrap{
    min-height: 300px !important; /* força altura original */
    margin-top: calc(var(--header-height, 64px) + 24px) !important;
    margin-bottom: calc(clamp(72px, 12vh, 120px) + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* OVERRIDE DE MÁXIMA ESPECIFICIDADE - MOBILE */
@media screen and (max-width: 768px) {
  html body.home.home.home .fr-hero.uagb-section__wrap.uagb-section__wrap.uagb-section__wrap,
  html body.home.home.home .uagb-block-f79e1cea.uagb-section__wrap.uagb-section__wrap.uagb-section__wrap {
    background-position: 55% center !important; 
    background-size: cover !important;
  }
  
  html body.home.home.home .fr-hero .uagb-section__inner-wrap.uagb-section__inner-wrap,
  html body.home.home.home .uagb-block-f79e1cea .uagb-section__inner-wrap.uagb-section__inner-wrap {
    min-height: 300px !important;
    height: auto !important;
    max-height: 500px !important;
    margin-top: 88px !important;
    margin-bottom: 96px !important;
  }
}

/* Tipografia responsiva com clamp e hierarquia consistente */
body.home .fr-hero h1, body.home .fr-hero .uagb-heading-text,
body.home .uagb-block-f79e1cea h1, body.home .uagb-block-f79e1cea .uagb-heading-text,
body.home .wp-block-uagb-section.uagb-section__wrap:first-of-type h1, body.home .wp-block-uagb-section.uagb-section__wrap:first-of-type .uagb-heading-text{
  font-size: clamp(28px, 5.6vw, 54px);
}
body.home .fr-hero h1 + p, body.home .fr-hero .uagb-heading-text + p,
body.home .uagb-block-f79e1cea h1 + p, body.home .uagb-block-f79e1cea .uagb-heading-text + p,
body.home .wp-block-uagb-section.uagb-section__wrap:first-of-type h1 + p, body.home .wp-block-uagb-section.uagb-section__wrap:first-of-type .uagb-heading-text + p{
  font-size: clamp(16px, 2.8vw, 20px);
  line-height: 1.25;
}
@media (max-width: 768px){
  body.home .fr-hero h1 + p, body.home .fr-hero .uagb-heading-text + p,
  body.home .uagb-block-f79e1cea h1 + p, body.home .uagb-block-f79e1cea .uagb-heading-text + p{
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
}

/* Animações sóbrias: manter gradiente animado no desktop, fade-up no card e textos */
@media (max-width: 768px){
  body.home .fr-hero .uagb-section__inner-wrap{ opacity: 0; transform: translateY(10px); animation: fr-fade-up 700ms ease 80ms forwards; }
}

/* DNA discreto no desktop da Home, invisível no mobile */
body.home .fr-hero .dna-graphic, body.home .fr-hero .fr-dna,
body.home .uagb-block-f79e1cea .dna-graphic, body.home .uagb-block-f79e1cea .fr-dna{
  position: absolute; left: clamp(8px, 2.5vw, 24px); bottom: clamp(8px, 2.5vw, 24px);
  width: clamp(120px, 22vw, 280px); max-width: 40%; opacity: 0.12; z-index: 1; pointer-events: none;
}
@media (max-width: 768px){
  body.home .fr-hero .dna-graphic, body.home .fr-hero .fr-dna,
  body.home .uagb-block-f79e1cea .dna-graphic, body.home .uagb-block-f79e1cea .fr-dna{ display: none !important; }
}

/* Conteúdo acima do overlay (Home apenas) */
body.home .fr-hero .uagb-section__inner-wrap, body.home .uagb-block-f79e1cea .uagb-section__inner-wrap{
  position: relative;
  z-index: 2; /* acima do overlay */
  max-width: 1200px; /* leitura confortável */
  margin-inline: auto;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 5vw, 80px);
}

/* Título principal – fade-up, serifado, forte e marrom escuro (Home) */
body.home .fr-hero h1,
body.home .fr-hero .uagb-heading-text,
body.home .uagb-block-f79e1cea h1,
body.home .uagb-block-f79e1cea .uagb-heading-text,
body.home .wp-block-uagb-section:first-of-type h1,
body.home .wp-block-uagb-section:first-of-type .uagb-heading-text,
body.home .wp-block-uagb-section:first-of-type .uagb-section__wrap h1,
body.home .wp-block-uagb-section:first-of-type .uagb-section__wrap .uagb-heading-text{
  color: var(--fr-brown-text) !important;
  font-family: var(--fr-serif);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25); /* discretíssimo, melhora nitidez sobre beige */
  opacity: 0; transform: translateY(14px);
  animation: fr-fade-up 780ms cubic-bezier(.22,.61,.36,1) 120ms forwards;
}

/* Subtítulo – leve delay, tom claro e sombra sutil para leitura (Home) */
body.home .fr-hero h1 + p,
body.home .fr-hero .uagb-heading-text + p,
body.home .fr-hero .hero-subtitle,
body.home .uagb-block-f79e1cea h1 + p,
body.home .uagb-block-f79e1cea .uagb-heading-text + p,
body.home .uagb-block-f79e1cea .hero-subtitle,
body.home .wp-block-uagb-section:first-of-type h1 + p,
body.home .wp-block-uagb-section:first-of-type .uagb-heading-text + p,
body.home .wp-block-uagb-section:first-of-type .uagb-section__wrap h1 + p,
body.home .wp-block-uagb-section:first-of-type .uagb-section__wrap .uagb-heading-text + p{
  color: var(--fr-cream-text) !important; /* branco suave */
  text-shadow: 0 2px 8px rgba(0,0,0,0.28);
  font-weight: 500;
  opacity: 0; transform: translateY(12px);
  animation: fr-fade-up 760ms cubic-bezier(.22,.61,.36,1) 420ms forwards; /* +0.3s */
  max-width: 68ch; /* evita linhas longas demais */
}

/* Alinhamento: desktop à esquerda, mobile centralizado */
@media (min-width: 769px){
  body.home .fr-hero .uagb-section__inner-wrap, body.home .uagb-block-f79e1cea .uagb-section__inner-wrap{ text-align: left; }
}
@media (max-width: 768px){
  body.home .fr-hero .uagb-section__inner-wrap, body.home .uagb-block-f79e1cea .uagb-section__inner-wrap{ text-align: center; padding-left: clamp(16px, 6vw, 28px); padding-right: clamp(16px, 6vw, 28px); }
}

/* Mobile: gradiente vertical e um pouco mais opaco para contraste */
@media (max-width: 768px){
  .fr-hero .uagb-section__overlay, .uagb-block-f79e1cea .uagb-section__overlay{
    /* Fallback */
    background: linear-gradient(180deg,
      rgba(109,80,50,0.78) 0%,
      rgba(109,80,50,0.62) 22%,
      rgba(240,232,220,0.46) 58%,
      rgba(240,232,220,0.34) 100%
    );
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--fr-brown-dark) 78%, transparent) 0%,
      color-mix(in srgb, var(--fr-brown-dark) 62%, transparent) 22%,
      color-mix(in srgb, var(--fr-beige-light) 46%, transparent) 58%,
      color-mix(in srgb, var(--fr-beige-light) 34%, transparent) 100%
    ) !important;
    background-size: 100% 200% !important; /* permite pan vertical suave */
    animation: fr-gradient-pan-y 22s ease-in-out infinite alternate;
  }
}

/* Animação sutil do gradiente */
@keyframes fr-gradient-pan-x{
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes fr-gradient-pan-y{
  0%   { background-position: 50% 0%; }
  100% { background-position: 50% 100%; }
}

/* Fade-up genérico usado no título e subtítulo */
@keyframes fr-fade-up{
  to { opacity: 1; transform: translateY(0); }
}

/* Respeitar usuários com redução de movimento */
@media (prefers-reduced-motion: reduce){
  body.home .fr-hero .uagb-section__overlay, body.home .uagb-block-f79e1cea .uagb-section__overlay{ animation: none !important; }
  body.home .fr-hero h1, body.home .fr-hero .uagb-heading-text,
  body.home .uagb-block-f79e1cea h1, body.home .uagb-block-f79e1cea .uagb-heading-text,
  body.home .fr-hero h1 + p, body.home .fr-hero .uagb-heading-text + p, body.home .fr-hero .hero-subtitle,
  body.home .uagb-block-f79e1cea h1 + p, body.home .uagb-block-f79e1cea .uagb-heading-text + p, body.home .uagb-block-f79e1cea .hero-subtitle{
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
}

/* === Home Hero Mobile: diagonal overlay + centralização === */
@media (max-width: 768px){
  /* Overlay diagonal */
  body.home .fr-hero .uagb-section__overlay{
    display: block !important;
    background: none !important;
    position: absolute; 
    inset: 0;
  }

  body.home .fr-hero .uagb-section__overlay::before{
    content:"";
    position:absolute;
    inset:0;
    background: linear-gradient(125deg,
      rgba(207,166,113,0.35) 0%,
      rgba(207,166,113,0.20) 40%,
      rgba(207,166,113,0.00) 65%
    );
  }

  /* Centralização viewport */
  body.home .fr-hero .uagb-section__inner-wrap{
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Título: força 36px com alta especificidade */
  html body.home .fr-hero .uagb-ifb-title,
  html body.home .uagb-block-f79e1cea .uagb-ifb-title{
    font-size: 36px !important;
  }

  /* Subtítulo: força font-weight 500 */
  html body.home .fr-hero .uagb-ifb-desc,
  html body.home .uagb-block-f79e1cea .uagb-ifb-desc{
    font-weight: 500 !important;
  }
}

/* DNA gráfico: manter visível com opacidade reduzida, canto inferior esquerdo, sem interferir no texto */
.fr-hero .dna-graphic, .fr-hero .fr-dna,
.uagb-block-f79e1cea .dna-graphic, .uagb-block-f79e1cea .fr-dna{
  position: absolute;
  left: clamp(8px, 2.5vw, 24px);
  bottom: clamp(8px, 2.5vw, 24px);
  width: clamp(120px, 22vw, 280px);
  max-width: 40%;
  opacity: 0.12; /* 12% dentro do solicitado (10–15%) */
  z-index: 1; /* abaixo do texto (z=2), acima do bg (z=auto), junto do overlay */
  pointer-events: none; /* não clica */
}

/* Salvaguarda: garantir que o texto nunca invada áreas críticas da imagem (touros) */
@media (min-width: 1025px){
  /* Safe area à esquerda – ajuste se necessário para fotos específicas (Home) */
  body.home .fr-hero .uagb-section__inner-wrap, body.home .uagb-block-f79e1cea .uagb-section__inner-wrap{
    padding-left: clamp(48px, 8vw, 120px);
    max-width: min(92vw, 1280px);
  }
}


/* === iOS mobile sticky header fix (Safari/Chrome on iOS) ===
   Context: iOS WebKit has a compositing bug where position: sticky + backdrop-filter
   can inflate the element's paint bounds, making the header appear abnormally tall.
   Fix: On iOS (only) and small screens, disable backdrop-filter on the header and
   let it auto-size to its contents. Android and desktop remain unchanged. 
   CORRIGIDO: Substituído @supports por detecção JavaScript confiável */

@media (max-width: 768px) {
  .ios-device .main-header-bar,
  .ios-device .main-header-bar.is-scrolled {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    /* Avoid fixed height interactions on iOS and clamp to sane bounds */
    height: auto !important;
    min-height: 56px !important;
    max-height: 76px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    transition: background .25s ease, color .25s ease !important; /* drop height transition */
    /* Remove paint containment: can cause iOS first-paint glitches with sticky */
    contain: initial !important;
    /* Force early compositing so header paints at top-of-page */
    transform: translateZ(0);
    will-change: transform;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Ensure inner container centers content and doesn't expand vertically */
  .ios-device .main-header-bar > .ast-container{
    display: flex !important;
    align-items: center !important;
  }
  
  /* Keep logo scale neutral on scroll to avoid height calculations jitter */
  .ios-device .main-header-bar.is-scrolled .custom-logo-link img,
  .ios-device .main-header-bar.is-scrolled .site-logo-img,
  .ios-device .main-header-bar.is-scrolled .ast-site-identity img {
    transform: none !important;
  }

  /* iOS Mobile (top-of-page): força cor/opacity dos ícones/links do header para evitar sumiço visual sobre heros claros */
  .ios-device .ast-header-break-point .main-header-bar .menu-link,
  .ios-device .ast-header-break-point .main-header-bar .ast-icon,
  .ios-device .ast-header-break-point .main-header-bar .menu-toggle .menu-toggle-icon,
  .ios-device .ast-header-break-point .main-header-bar .menu-toggle .ast-mobile-svg,
  .ios-device #ast-mobile-header .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg{
    color: var(--drawer-bg) !important;
    fill: var(--drawer-bg) !important;
    -webkit-text-fill-color: var(--drawer-bg) !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
  }
}

/* === HERO TEXT LAYOUT PREMIUM - DESKTOP ONLY === */
/* Posicionamento e estilização do texto na faixa diagonal dourada */
@media (min-width: 1025px) {
  /* Container principal responsivo */
  body.home .fr-hero .uagb-section__inner-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    min-height: 80vh !important;
  }

  /* Bloco de texto posicionado na faixa dourada - CORREÇÃO ULTRA-AGRESSIVA */
  html body.home .fr-hero .uagb-block-fafb578c.uagb-infobox__content-wrap,
  html body.home .uagb-block-f79e1cea .uagb-block-fafb578c.uagb-infobox__content-wrap {
    position: absolute !important;
    left: -5% !important; /* Ultra-agressivo baseado em overflow de 42px */
    top: 50% !important;
    transform: translateY(-50%) !important;
    max-width: 50% !important;
    text-align: left !important;
    z-index: 10 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
  }

  /* Título principal - FAZENDA RENASCENÇA - Marrom profundo premium */
  body.home .fr-hero .uagb-ifb-title {
    font-size: clamp(40px, 3.8vw, 58px) !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    letter-spacing: 0.5px !important;
    color: #3D2410 !important; /* Marrom profundo para contraste premium */
    text-shadow: 0 2px 4px rgba(0,0,0,0.25) !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Subtítulo - Genética & Qualidade - Tamanho aumentado */
  body.home .fr-hero .uagb-ifb-desc {
    font-size: clamp(26px, 2.3vw, 36px) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    color: rgba(255,255,255,0.95) !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    padding-left: 2px !important; /* Correção alinhamento óptico */
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Ocultar separador para layout mais limpo */
  body.home .fr-hero .uagb-ifb-separator {
    display: none !important;
  }

  /* Container e wrapper otimizados */
  body.home .fr-hero .uagb-ifb-content {
    text-align: left !important;
  }

  body.home .fr-hero .uagb-ifb-title-wrap {
    margin-bottom: 8px !important;
  }
}

/* RESPONSIVIDADE ULTRA-AGRESSIVA PARA TELAS GRANDES */
@media (min-width: 1366px) {
  html body.home .fr-hero .uagb-block-fafb578c.uagb-infobox__content-wrap,
  html body.home .uagb-block-f79e1cea .uagb-block-fafb578c.uagb-infobox__content-wrap {
    left: -6% !important; /* Ultra-agressivo para telas maiores */
    max-width: 52% !important;
  }
}

@media (min-width: 1920px) {
  html body.home .fr-hero .uagb-block-fafb578c.uagb-infobox__content-wrap,
  html body.home .uagb-block-f79e1cea .uagb-block-fafb578c.uagb-infobox__content-wrap {
    left: -8% !important; /* Correção ultra-agressiva final */
    max-width: 54% !important;
  }
  
  /* Expandir faixa dourada em telas ultra-wide */
  body.home .fr-hero::before, 
  body.home .uagb-block-f79e1cea::before {
    background: linear-gradient(90deg,
      rgba(207,166,113,0.95) 0%,
      rgba(214,178,128,0.92) 38%,
      rgba(207,166,113,0.30) 64%,
      rgba(207,166,113,0.00) 100%
    ) !important;
  }
}

/* ============================================
   HEADER MOBILE POSTS - OCULTAR EM SINGLE POSTS
   ============================================ */

/* Ocultar header em posts no mobile para melhor leitura */
body.single-post.ast-header-break-point .main-header-bar {
    display: none !important;
}

/* Garantir que não há offset residual */
body.single-post.ast-header-break-point #content,
body.single-post.ast-header-break-point .site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ============================================
   COLUNAS HOME - CORRIGIR QUEBRA DE LINHA
   ============================================ */

/* Evitar quebra de linha em "Animais a Venda" - apenas desktop */
@media (min-width: 768px) {
    .uagb-block-7de8d05f .uagb-ifb-title {
        white-space: nowrap !important;
    }
}

