/* v2.9 — smart Astra header, typographic mobile control, footer refinement. */
.fg-smart-header-spacer { height: 0; pointer-events: none; }
#masthead.fg-smart-header--fixed { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 9998; transform: translateY(0); transition: transform .3s cubic-bezier(.22,1,.36,1); box-shadow: 0 8px 24px rgba(35,20,20,.07); }
#masthead.fg-smart-header--hidden { transform: translateY(calc(-100% - 2px)); }
#masthead.fg-smart-header--fixed .ast-primary-header-bar { background-color: var(--fg-color-paper, #EDE8DF); border-bottom: 1px solid rgba(185,156,126,.55); }
body.admin-bar #masthead.fg-smart-header--fixed { top: 32px; }
@media(max-width:782px) { body.admin-bar #masthead.fg-smart-header--fixed { top: 46px; } }
@media(max-width:600px) { body.admin-bar #masthead.fg-smart-header--fixed { top: 0; } }
/* Do not trap the fixed viewport menu in a transformed/hidden header. */
body.fg-mobile-nav-open #masthead.fg-smart-header--fixed,
body:has(.ast-mobile-popup-drawer.active) #masthead.fg-smart-header--fixed { transform: none; }
@media(max-width:921px) {
  /* Replace the v2.8 icon only visually; keep Astra's actual toggle button. */
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle { min-width: 80px; min-height: 44px; padding: 0 .55rem; font-size: .76rem; letter-spacing: .16em; font-weight: 500; }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::before,
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle::after { content: none !important; display: none !important; }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle .ast-mobile-svg,
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle .ast-icon,
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle svg { opacity: 0 !important; visibility: hidden !important; }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle { color: var(--fg-color-wine, #512526); }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle .fg-menu-label { display: inline-block; position: absolute; inset: 0; align-content: center; text-align: center; font-size: .76rem; line-height: 44px; letter-spacing: .16em; color: currentColor; pointer-events: none; }
  body.fg-mobile-nav-open .ast-mobile-header-wrap .ast-button-wrap .menu-toggle { color: var(--fg-color-paper, #EDE8DF); }
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle:hover,
  .ast-mobile-header-wrap .ast-button-wrap .menu-toggle:focus-visible { color: var(--fg-color-sand, #B99C7E); }
}
/* Footer: editorial hierarchy without restructuring Astra builder widgets. */
.site-footer .site-primary-footer-wrap { padding-block: clamp(4rem, 7vw, 7.5rem); }
.site-footer .widget-title, .site-footer :is(h2,h3,h4) { letter-spacing: .07em; font-size: clamp(.85rem, .8rem + .2vw, 1rem); }
.site-footer .widget_nav_menu a, .site-footer .menu-item a { text-decoration: none; text-underline-offset: .32em; transition: color .2s ease, text-decoration-color .2s ease; }
.site-footer .widget_nav_menu a:hover, .site-footer .menu-item a:hover,
.site-footer .widget_nav_menu a:focus-visible, .site-footer .menu-item a:focus-visible { color: var(--fg-color-sand,#B99C7E); text-decoration: underline; text-decoration-thickness: 1px; }
.site-footer .site-below-footer-wrap { border-top: 1px solid rgba(185,156,126,.4); }
.site-footer .ast-footer-copyright { opacity: .88; font-size: clamp(.74rem,.7rem + .16vw,.86rem); }
@media(prefers-reduced-motion:reduce) { #masthead.fg-smart-header--fixed { transition: none; } .site-footer .menu-item a { transition: none; } }
/* Keep header accessible when tabbing into its links. */
#masthead.fg-smart-header--hidden:focus-within { transform: translateY(0); }

/* v2.9.2 — Astra off-canvas closes with a distinct control from MENU. */
@media (max-width: 921px) {
  .ast-mobile-popup-drawer .ast-mobile-popup-close {
    position: relative; min-width: 82px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    padding-inline: .65rem; color: var(--fg-color-paper, #EDE8DF);
  }
  .ast-mobile-popup-drawer .ast-mobile-popup-close .fg-menu-close-label {
    display: inline-block; font-size: .76rem; letter-spacing: .16em;
    font-weight: 500; line-height: 1.25; color: inherit; pointer-events: none;
  }
  .ast-mobile-popup-drawer .ast-mobile-popup-close:has(.fg-menu-close-label) :is(.ast-mobile-svg, svg, .ast-icon) {
    display: none !important;
  }
  .ast-mobile-popup-drawer .ast-mobile-popup-close:hover,
  .ast-mobile-popup-drawer .ast-mobile-popup-close:focus-visible { color: var(--fg-color-sand, #B99C7E); }
  .ast-mobile-popup-drawer .ast-mobile-popup-close:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
}
