/* ============================================================
   REUSABLE HEADER COMPONENT — fixed + shrinks on scroll.
   Applied via body classes (see academia_custom_body_classes() in
   academia-custom-pages.php), not a hardcoded page ID, so any custom
   template can opt in:
   - body.academia-fixed-header        -> base behavior (every custom page)
   - body.academia-header-transparent-hero -> ALSO start transparent with
     white nav text, for pages with a dark full-bleed photo hero (London).
     Pages with a light hero (Home) skip this modifier and get a solid
     header from the start - default (dark) nav text already reads fine.
   ============================================================ */
body.academia-fixed-header #masthead{
  position:fixed; top:0; left:0; right:0; z-index:999;
  transition:background-color .3s ease, box-shadow .3s ease;
}
/* logged-in admin bar (32px desktop / 46px <783px) sits above our fixed
   header with a higher z-index and would otherwise cover it - push the
   header down when previewing while logged in (real visitors never see this) */
body.academia-fixed-header.admin-bar #masthead{ top:32px; }
@media (max-width:782px){
  body.academia-fixed-header.admin-bar #masthead{ top:46px; }
}
body.academia-header-transparent-hero #masthead .main-header-bar{
  background-color:transparent;
  border-bottom-color:transparent;
}
body.academia-fixed-header #masthead .main-header-bar{
  transition:background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}
body.academia-header-transparent-hero #masthead:not(.is-scrolled) .main-header-menu .menu-link,
body.academia-header-transparent-hero #masthead:not(.is-scrolled) .main-header-menu .menu-item > a{
  color:#fff;
  text-shadow:0 1px 3px rgba(0,0,0,.55);
}
body.academia-header-transparent-hero #masthead:not(.is-scrolled) .ast-mobile-menu-buttons-minimal svg,
body.academia-header-transparent-hero #masthead:not(.is-scrolled) .astra-menu-toggle-icon path{
  fill:#fff !important; stroke:#fff !important;
}
/* mobile drawer must always be solid+readable, regardless of scroll position
   or the transparent-hero modifier - applies to every fixed header */
body.academia-fixed-header #masthead.mobile-menu-open .main-header-bar{
  background-color:#fff !important;
  box-shadow:0 2px 16px rgba(19,42,58,.1) !important;
}
body.academia-fixed-header #masthead.mobile-menu-open .main-header-menu .menu-link,
body.academia-fixed-header #masthead.mobile-menu-open .main-header-menu .menu-item > a{
  color:var(--ink) !important;
  text-shadow:none !important;
}
body.academia-fixed-header #masthead.is-scrolled .main-header-bar{
  background-color:rgba(255,255,255,.72);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  box-shadow:0 2px 16px rgba(19,42,58,.08);
}
/* content must start at the very top, behind the fixed header - each
   template's own hero needs enough top padding to clear the header height */
body.academia-fixed-header #content,
body.academia-fixed-header .ast-container{ margin-top:0 !important; padding-top:0 !important; }

/* header row: bigger, centered, more breathing room */
body.academia-fixed-header .ast-builder-grid-row-container{ align-items:center !important; transition:min-height .3s ease; }
body.academia-fixed-header .ast-primary-header-bar{ padding-block:22px !important; transition:padding-block .3s ease; }
body.academia-fixed-header .custom-logo{ max-height:60px !important; width:auto !important; height:auto !important; transition:max-height .3s ease; }
body.academia-fixed-header .ast-site-identity{ display:flex; align-items:center; }
body.academia-fixed-header .main-header-menu .menu-link{ font-size:1.093rem !important; padding-inline:10px !important; }
body.academia-fixed-header .main-header-menu{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:2px 4px; width:100%; }
body.academia-fixed-header .site-header-primary-section-right{ justify-content:center !important; }

/* Sub-menu items: regular weight, no text-shadow (top-level items keep
   their weight; the transparent-hero white-text shadow must not leak into the
   white dropdown panel) */
body #masthead .sub-menu .menu-link,
body #masthead .sub-menu .menu-item > a,
body #ast-mobile-header .sub-menu .menu-link{font-weight:400 !important; text-shadow:none !important;}

/* Fixed-header pages WITHOUT a photo hero (Kontakt, Blog arhiva) used Astra's own navy header bar, with dark menu
   text on it. Give them the same light bar the other pages get once scrolled, so the header looks the same everywhere. */
body.academia-fixed-header:not(.academia-header-transparent-hero) #masthead .main-header-bar{
  background-color:rgba(255,255,255,.96) !important;
  box-shadow:0 2px 16px rgba(19,42,58,.08);
  border-bottom-color:transparent !important;
}
body.academia-fixed-header:not(.academia-header-transparent-hero) #masthead .main-header-menu .menu-link,
body.academia-fixed-header:not(.academia-header-transparent-hero) #masthead .main-header-menu .menu-item > a{
  color:var(--ink,#132A3A);
}
