/* Header Menu Styles - Refactored with CSS Variables and Clean Structure */

/* ============================================
   FONT FACES
   ============================================ */
@font-face {
  font-family: "Source Sans Pro";
  src: url("../fonts/source-sans-pro/SourceSansPro-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url("../fonts/source-sans-pro/SourceSansPro-Semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans Pro";
  src: url("../fonts/source-sans-pro/SourceSansPro-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS CUSTOM PROPERTIES (Theme)
   ============================================ */
:root {
  /* Colors */
  --color-gold: #bf9e4f;
  --color-gold-light: #f1c17c;
  --color-gold-dark: #e0ad63;
  --color-gold-rgb: 191, 158, 79;
  --color-purple: #2f2f87;
  --color-purple-rgb: 47, 47, 135;
  --color-ink: #1a183d;
  --color-muted: rgba(26, 24, 61, 0.72);
  --color-white: #ffffff;
  
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease-in-out;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
}

html, html body {font-size:unset!important;     font-size: clamp(16px, 1.5vw, 24px)!important;font-family: "Source Sans Pro", Roboto, Helvetica, Arial!important;}
  
html body {overflow-x: hidden!important;}

/* ============================================
   TOPBAR / HEADER NAVIGATION
   ============================================ */

#topbar.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 0;
  background: linear-gradient(105deg, rgb(236, 236, 255) 0%, #ffffff 50%, #ffffff 100%);
  border-bottom: 1px solid rgba(var(--color-purple-rgb), 0.12);
  box-shadow: 0 6px 24px rgba(26, 24, 61, 0.06);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

#topbar .topbar__container {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 0;
  max-width: 100%;
  padding: 0;
}

#topbar .topbar__brand {
  grid-column: 1;
  grid-row: 1 / span 2;
}

#topbar .topbar__utility {
  grid-row: 1;
  background: rgba(47, 47, 135, 0.06);
  /*border-bottom: 1px solid rgba(var(--color-purple-rgb), 0.12); */
  padding: var(--space-1) 2vw;
}

#topbar .topbar__utility .topbar__row--top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
  justify-content: stretch;
}

#topbar .topbar__utility-left {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

#topbar .topbar__utility-center {
  grid-column: 2;
  justify-self: center;
  display: none;
}

#topbar .topbar__utility-right {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: var(--space-3);
  flex-wrap: nowrap;
}

#topbar .topbar__utility,
#topbar .topbar__main {
  grid-column: 2;
  width: 100%;
}

#topbar .topbar__main {
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-3) 2vw var(--space-3) 0;
}

#topbar .topbar__main-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  flex: 1;
}

#topbar .topbar__tagline {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(47, 47, 135, 0.78);
  white-space: nowrap;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: default;
}

#topbar .topbar__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  align-self: center;
  padding: 0 5vw 0 2vw; 
}

#topbar .topbar__brand img {
  width: clamp(140px, 16vw, 220px);
  height: auto;
  max-width: 100%;
  display: block;
}

#topbar .topbar__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

#topbar .topbar__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

#topbar .topbar__row--top {
  justify-content: flex-end;
  gap: var(--space-4);
}

#topbar .topbar__row--bottom {
  justify-content: flex-start;
  flex-wrap: wrap;
  min-width: 0;
  gap: var(--space-2);
}

#topbar .topbar__main-left .topbar__row--bottom {
  flex: 1;
}

/* ============================================
   NAVIGATION LINKS
   ============================================ */

#topbar .nav__item {
  position: relative;
  margin-left: -12px;
}

/* Unified Nav Link Base - Top Row and Main Menu */
#topbar .topbar__row--top .nav__link,
#topbar .topbar__row--bottom .nav__link {
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  letter-spacing: 0.025em;
  color: var(--color-purple);
  white-space: nowrap;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: linear-gradient(135deg, transparent, transparent);
  text-decoration: none;
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  display: inline-block;
  position: relative;
}

#topbar button.nav__link {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
}
#topbar .topbar__row--top .nav__link {
  font-size: 0.7rem;
  font-weight: 400;
}
#topbar .topbar__row--bottom .nav__link {
  font-size: 0.82rem;
  font-weight: 400;
}

/* Unified Hover - All nav links */
#topbar .topbar__row--top .nav__link:hover,
#topbar .topbar__row--bottom .nav__link:hover,
body.topbar-alt #topbar .topbar__row--bottom .nav__link:hover {
  background: linear-gradient(135deg, rgba(var(--color-gold-rgb), 0.08), rgba(var(--color-gold-rgb), 0.08));
  text-decoration: none;
}

/* Add underline animation */
#topbar .topbar__row--top .nav__link::before,
#topbar .topbar__row--bottom .nav__link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--color-gold-rgb), 0.75), transparent);
  transition: width var(--transition-base);
  transform: translateX(-50%);
}

#topbar .topbar__row--top .nav__link:hover::before,
#topbar .topbar__row--bottom .nav__link:hover::before {
  width: 82%;
}

#topbar .topbar__row--bottom .nav__link--active::before {
  width: 82%;
}

/* Active States */
#topbar .topbar__row--top .nav__link--active,
#topbar .topbar__row--bottom .nav__link--active {
  color: var(--color-purple);
  font-weight: 700;
}

/* Parent indicator for dropdowns */
/* #topbar .nav__item--has-children .nav__link {
  position: relative;
  padding-right: 24px; 
} */

/* #topbar .nav__item--has-children .nav__link::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform var(--transition-fast);
} */

/* ============================================
   SUB-MENU (DROPDOWN)
   ============================================ */

#topbar .nav__item--has-children .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(var(--color-purple-rgb), 0.12);
  border-radius: var(--radius-md);
  padding: var(--space-2) 0;
  margin-top: var(--space-1);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base);
  z-index: 100;
  list-style: none;
}

#topbar .nav__item--has-children:hover > .submenu,
#topbar .nav__item--has-children:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#topbar .submenu__item {
  margin: 0;
  padding: 0;
}

#topbar .submenu__link {
  display: block;
  padding: 10px var(--space-4);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

#topbar .submenu__link:hover {
  background: rgba(var(--color-purple-rgb), 0.06);
  color: var(--color-ink);
}

#topbar .submenu__link--active {
  color: var(--color-purple);
  font-weight: 600;
  background: rgba(var(--color-purple-rgb), 0.04);
}

/* ============================================
   NESTED SUBMENU (submenu within submenu)
   ============================================ */

/* Position nested submenu to the right of parent */
#topbar .submenu .submenu {
  position: absolute;
  top: -8px; /* Align with parent item */
  left: 100%;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(var(--color-purple-rgb), 0.12);
  border-radius: var(--radius-md);
  padding: var(--space-2) 0;
  margin-left: var(--space-1);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base);
  z-index: 101;
  list-style: none;
}

/* Show nested submenu on hover of parent submenu item */
#topbar .submenu__item--has-children:hover > .submenu,
#topbar .submenu__item--has-children:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Add indicator for items with nested submenu */
#topbar .submenu__item--has-children > .submenu__link::after {
  content: '›';
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  color: var(--color-gold);
}

#topbar .submenu__item--has-children {
  position: relative;
}

/* ============================================
   NAV SOCIAL ICONS
   ============================================ */

#topbar .topbar__row--top .nav__social {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: nowrap;
}

#topbar .nav__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(var(--color-gold-rgb), 0.55);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

#topbar .nav__social-link:hover {
  background: rgba(var(--color-gold-rgb), 0.06);
  border-color: rgba(var(--color-gold-rgb), 0.75);
}

#topbar .nav__social-icon {
  width: 18px;
  height: 18px;
  fill: var(--color-gold);
}

/* ============================================
   BUTTONS (within topbar)
   ============================================ */

#topbar .btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  min-width: 145px;
  max-width: 300px;
  text-align: center;
  transition: transform var(--transition-base), background var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.025em;
}

#topbar .topbar__utility .btn {
  padding: 6px 10px;
  font-size: 0.7rem;
}

#topbar .btn:active {
  transform: translateY(1px);
}

/* Primary Button - Semi-transparent Gold */
#topbar .btn--primary {
  background: linear-gradient(135deg, rgba(var(--color-gold-rgb), 0.15), rgba(var(--color-gold-rgb), 0.15));
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: 0 0 0 0 rgba(var(--color-gold-rgb), 0.4);
}

#topbar .btn--primary:hover {
  background: linear-gradient(135deg, rgba(var(--color-gold-rgb), 0.22), rgba(var(--color-gold-rgb), 0.42));
  box-shadow: 0 10px 26px rgba(var(--color-gold-rgb), 0.16);
  transform: translateY(-1px);
}

/* Secondary Button - Purple Outline (transparent background) */
#topbar .btn--secondary {
  background: transparent;
  border-color: var(--color-purple);
  color: var(--color-purple);
  box-shadow: 0 0 0 0 rgba(var(--color-purple-rgb), 0.4);
}

#topbar .btn--secondary:hover {
  background: linear-gradient(135deg, rgba(var(--color-purple-rgb), 0.08), rgba(var(--color-purple-rgb), 0.14));
  box-shadow: 0 10px 26px rgba(var(--color-purple-rgb), 0.12);
  transform: translateY(-1px);
}

/* Button Groups */
#topbar .btn__group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#topbar .btn__group--right {
  justify-content: flex-end;
}

#topbar .btn__group--tight {
  margin-top: 0;
}

/* ============================================
   MOBILE NAV FAB (Floating Action Button)
   ============================================ */

.nav-fab, .nav__fab {
  position: fixed;
  display: none;
  gap: var(--space-2);
  opacity:0;
  top: 0;
  right: 0;
  padding: 15px 15px;
  z-index: 70;
  align-items: center;
  background-color: #ffffff;
  border: 1px rgba(0, 0, 0, 0.25) solid;
  border-bottom-left-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Show nav-fab when scrolled past hero */
body.topbar-alt:not(.hero-active, .preroll-locked) .nav__fab {
  display: flex;
  opacity:1;
}

.nav__fab-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.nav__fab-logo img {
  width: 32px;
  height: auto;
}

.nav__fab-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav__fab-icon {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  position: relative;
  transition: background var(--transition-fast);
}

.nav__fab-icon::before,
.nav__fab-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  transition: transform var(--transition-fast);
}

.nav__fab-icon::before {
  top: -6px;
}

.nav__fab-icon::after {
  top: 6px;
}

body.nav-open .nav__fab-icon {
  background: transparent;
}

body.nav-open .nav__fab-icon::before {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav__fab-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================================
   MOBILE NAV DRAWER
   ============================================ */

.nav__drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: rgba(255, 255, 255, 0.98);
  z-index: 80;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-md);
}

body.nav-open .nav__drawer {
  transform: translateX(0);
}

.nav__drawer-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  overflow-y: auto;
}

.nav__drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-gold);
}

.nav__drawer-head .brand img {
  width: 140px;
}

/* Mobile menu links */
.nav__drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.nav__drawer-link {
  display: block;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
  opacity: 0.92;
  border-bottom: 1px solid rgba(var(--color-purple-rgb), 0.08);
}

button.nav__drawer-link {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(var(--color-purple-rgb), 0.08);
  font: inherit;
  line-height: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.nav__drawer-link--active {
  color: var(--color-gold);
  font-weight: 700;
}

/* Mobile sub-menu toggle */
.nav__toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--color-gold);
  transition: transform var(--transition-fast);
}

.nav__toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Mobile sub-menu */
.nav__drawer-submenu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  background: transparent;
  padding: 0 0 var(--space-2) var(--space-4);
  margin: 0;
  display: none;
  list-style: none;
}

.nav__drawer-submenu.is-open {
  display: block;
}

.nav__drawer-submenu-link {
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--color-gold);
  text-decoration: none;
  display: block;
}

/* Mobile CTA buttons */
.nav__drawer-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-gold);
}

.nav__drawer-ctas .btn {
  min-width: auto;
  width: 100%;
}

footer .footer-links a {
    padding: 2px 0;
    text-decoration: none;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress {
  position: fixed;
  left: 18px;
  top: 72px;
  z-index: 55;
  width: 10px;
  height: calc(100vh - 100px);
  border-radius: var(--radius-full);
  background: rgba(var(--color-purple-rgb), 0.05);
  border: 1px solid rgba(var(--color-purple-rgb), 0.12);
  overflow: hidden;
}

body.hero-active .progress {
  display: none;
}

.progress__bar {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--color-purple), #982789, var(--color-gold-light));
}

/* ============================================
   ALTERNATIVE TOPBAR LAYOUT
   Two rows: logo+buttons on top, nav centered below
   ============================================ */

body.topbar-alt #topbar .topbar__container {
  width: 100%;
}

/* body.topbar-alt #topbar.topbar {
  padding-top: var(--space-3);
} */

body.topbar-alt #topbar .topbar__brand {
  align-self: center;
}

body.topbar-alt #topbar .topbar__content {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  margin-top: 8px;
}

body.topbar-alt #topbar .topbar__row--top {
  padding-bottom: 0;
  /* border-bottom: 1px solid var(--color-gold); */
}

body.topbar-alt #topbar .topbar__row--bottom {
  width: 100%;
}

body.topbar-alt #topbar .topbar__content .btn {
  padding: 5px 10px;
}

body.topbar-alt #topbar .topbar__brand img {
  width: clamp(140px, 15vw, 220px);
}

/* SHELL */
body .shell {
    position: absolute;
    top: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Large desktop */
@media (min-width: 1400px) {
  #topbar .topbar__container {
    gap: var(--space-5);
  }

  #topbar .topbar__row--bottom {
    gap: 14px;
  }

  #topbar .topbar__row--bottom .nav__link {
    font-size: 0.9rem;
    padding: var(--space-2) 14px;
  }
}

/* Small desktop */
@media (max-width: 1199px) {
  #topbar .topbar__brand img {
    width: clamp(120px, 14vw, 180px);
  }

  #topbar .topbar__container {
    gap: var(--space-3);
  }

  #topbar .topbar__row--bottom {
    gap: var(--space-2);
  }

  #topbar .topbar__row--bottom .nav__link {
    font-size: 0.8rem;
    padding: var(--space-2) 10px;
  }

  #topbar .btn {
    min-width: 120px;
    font-size: 0.75rem;
    padding: 10px var(--space-3);
  }

  body.topbar-alt #topbar .topbar__container {
    gap: var(--space-3);
  }

  body.topbar-alt #topbar .topbar__row--bottom {
    gap: var(--space-2);
  }
}

/* Tablet - switch to hamburger */
@media (max-width: 1023px) {
  #topbar.topbar {
    display: none;
  }

  .nav__fab {
    display: flex;
  }

  .progress {
    display: none;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .nav__drawer {
    width: 85vw;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #topbar .nav__item--has-children .submenu,
  .nav__drawer {
    transition: none;
  }
}

#topbar .topbar__row--top .nav__link {
  font-family: "Source Sans Pro", Roboto, Helvetica, Arial !important;
  font-weight: 400 !important;
  font-synthesis: none !important;
  font-optical-sizing: none !important;
  font-kerning: normal !important;
  line-height: 1.3 !important;
  letter-spacing: 0.025em !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: geometricPrecision !important;
}

#topbar .topbar__row--bottom .nav__link {
  font-family: "Source Sans Pro", Roboto, Helvetica, Arial !important;
  font-weight: 400 !important;
  font-synthesis: none !important;
  font-optical-sizing: none !important;
  font-kerning: normal !important;
  line-height: 1.3 !important;
  letter-spacing: 0.025em !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: geometricPrecision !important;
}

/* ============================================
   RULES MOVED FROM doc.php INLINE STYLES
   ============================================ */

/* Fix admin bar ul styling from draft_4.css */
#wpadminbar ul,
#wpadminbar ul li {
    display: block !important;
    flex-direction: row !important;
    gap: 0 !important;
}

/* Active page highlighting for static menu */
.topbar-row--bottom a.current-page,
.nav-drawer-links a.current-page {
    color: #302f7b;
    font-weight: 600;
    border-bottom: 2px solid #302f7b;
}

/* Fix ScrollSmoother blocking topbar */
#ScrollSmoother-wrapper,
.ScrollSmoother-wrapper {
    position: relative !important;
    height:auto!important;
}

/* Hide topbar completely until page loads (WP theme pages only) */
body.theme-frontend .topbar {
    display: none !important;
}
body.theme-frontend.topbar-loaded .topbar {
    display: flex !important;
    animation: topbarEnter 0.5s ease-out;
}
@keyframes topbarEnter {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Show topbar when at top of page (WP theme pages only) */
body.theme-frontend.hero-active .topbar {
    transform: translateY(0) !important;
}

/* Slide topbar up when scrolled past hero (WP theme pages only) */
body.theme-frontend:not(.hero-active) .topbar {
    opacity: 1 !important;
    transform: translateY(-100%) !important;
    transition: transform 0.35s ease !important;
}

/* Page title styling for hero section */
.page-title {
    position: absolute;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

body .wp-block-group .page-title h1 {
    color: #fff;
    font-family: "Merriweather";
    font-weight: 400;
    font-size: clamp(40px, 6.7708333333vw, 130px);
    line-height: 1.1076923077;
    text-align: center;
    margin: 0;
}

main.wp-block-group.no-title {
  padding-top: 15vh;
}
main.wp-block-group:not(.no-title) .wp-block-image {
  background-color: rgba(47, 47, 135,1);
}
main.wp-block-group:not(.no-title) .wp-block-image img {    
  padding-top: 6vh;
  max-height:100vh;
  opacity:0.7;
}

/* ============================================
   LEAD FORM MODAL
   ============================================ */

.modal-overlay[hidden] { display: none; }

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(48, 47, 123, 0.28);
  display: grid;
  place-items: center;
  padding: 18px;
  animation: modalFadeIn 0.25s ease-out;
}

.modal {
  width: min(840px, 100%);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(48, 47, 123, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: modalScaleIn 0.3s ease-out;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(48, 47, 123, 0.12);
}

.modal-head__title {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26, 24, 61, 0.82);
}

.modal .icon-btn {
  background: transparent;
  color: rgba(48, 47, 123, 1);
  border: 1px solid rgba(48, 47, 123, 0.16);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  overflow: auto;
}

.modal-body .error {
  color: #c0392b;
  font-weight: 600;
  margin: 0 0 12px;
}

.modal-body .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-body label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(26, 24, 61, 0.82);
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(48, 47, 123, 0.16);
  background: rgba(48, 47, 123, 0.04);
  color: #1a183d;
  outline: none;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  border-color: rgba(48, 47, 123, 0.55);
}

.modal-body textarea {
  min-height: 96px;
  resize: vertical;
}

.lead-offer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 45%),
              linear-gradient(155deg, #2f2f87, #262f6a 60%, #1e2c5d);
  box-shadow: 0 18px 32px rgba(20, 24, 58, 0.22);
}

.lead-offer form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lead-intro {
  margin: 0;
  color: #f4f6ff;
  font-weight: 600;
  line-height: 1.5;
  font-size: 0.95rem;
}

.lead-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(15px, 2.1vw, 19px);
  font-weight: 700;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-note {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-icon-inline {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  opacity: 0.88;
  flex-shrink: 0;
}

.lead-offer .helper {
  color: rgba(239, 243, 255, 0.78);
}

.lead-offer .helper strong {
  color: #ffffff;
}

.lead-offer label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
}

.lead-offer input,
.lead-offer select,
.lead-offer textarea {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 12px;
}

.lead-offer input::placeholder,
.lead-offer textarea::placeholder {
  color: rgba(236, 240, 255, 0.65);
}

.lead-offer input:focus,
.lead-offer select:focus,
.lead-offer textarea:focus {
  border-color: rgba(255, 255, 255, 0.6);
}

.lead-offer .btn-primary {
  box-shadow: 0 12px 18px rgba(15, 19, 56, 0.24);
}
