/* =====================
   CSS Variables
   ===================== */
:root {
  --bg: #0a3428;
  --paper: #f3f5ea;
  --ink: #0f3a2c;
  --leaf: #137a3d;
  --accent: #e57a00;
  
  --mega-w: 620px;
  --mega-x: 0px;
  --radius: 22px;
  --t-fast: 160ms;
  --t-slow: 320ms;
  --easing: cubic-bezier(.22,.8,.28,1);
  
  --pad-t: 26px;
  --pad-r: 26px;
  --pad-b: 22px;
  --pad-l: 26px;
  
  --panel-w: 400px;
  --header-h: 90px;
}

/* =====================
   Base & Layout
   ===================== */
* {
  box-sizing: border-box;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 14px;
  position: relative;
}

/* =====================
   Header
   ===================== */
header.site-header {
  position: sticky;
  left: 0;
  right: 0;
  top: 0;
  z-index: 50;
  background: rgba(1, 52, 38, 1);
  transition: background 0.25s ease;
}

.transparent-header-enabled header.site-header {
  background: rgba(1, 52, 38, 0);
  position: fixed;
}

header.site-header.scrolled,
header.site-header:hover,
header.site-header.search-active {
  background: rgba(1, 52, 38, 1);
}

.admin-bar header.site-header {
  top: 32px;
}

.header-bar {
  min-height: var(--header-h);
  display: flex;
  align-items: stretch;
  gap: 24px;
}

/* =====================
   Brand
   ===================== */
.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.brand img {
  max-height: calc(var(--header-h) - 50px);
  height: auto;
  width: auto;
}

.brand__text {
  color: #cfe6da;
  font-weight: 800;
  text-decoration: none;
  font-size: 20px;
}

/* =====================
   Navigation
   ===================== */
.header-bar nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.nav {
  display: flex;
  align-items: stretch;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav > li {
  display: flex;
  position: relative;
}

.nav > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px;
  color: #cfe6da;
  text-decoration: none;
  letter-spacing: .2px;
  font-family: "Spline Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  position: relative;
  white-space: nowrap;
}

.nav > li > a:hover {
  color: #fff;
}

.nav > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  transform-origin: left;
  transform: scaleX(.25);
  transition: transform var(--t-fast) ease, background var(--t-fast) ease;
}

.nav > li.is-hot > a::after {
  background: var(--accent);
  transform: scaleX(1);
}

#topNav:hover > li {
  opacity: 0.25;
}

#topNav:hover > li.is-hot {
  opacity: 1;
}

/* =====================
   Header Actions
   ===================== */
.header-actions {
  margin-left: auto; /* Changed from margin: 0 auto */
  display: flex;
  align-items: center; /* Add this to vertically center items */
  gap: 6px;
  list-style: none;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
}


.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #cfe6da;
  text-decoration: none;
}

.icon-btn:hover {
  color: #ffffff;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Search button styling */
.header-actions .icon-btn[aria-label="Search"] {
  position: relative;
  height: var(--header-h);
  border-radius: 0;
  width: auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
}

.header-actions .icon-btn[aria-label="Search"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  transform-origin: left;
  transform: scaleX(0.25);
  transition: transform var(--t-fast) ease, background var(--t-fast) ease;
}

.header-actions .icon-btn[aria-label="Search"]:hover::after,
.header-actions .icon-btn[aria-label="Search"].is-active::after {
  background: var(--accent);
  transform: scaleX(1);
}

/* =====================
   Mega Menu
   ===================== */
.hover-zone {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0;
  pointer-events: none;
  overflow: hidden;
}

.hover-zone.is-open {
  pointer-events: auto;
  height: var(--zone-h, 470px);
}

.mega {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
}

/* Card */
.card {
  position: absolute;
  top: 18px;
  left: var(--mega-x);
  box-sizing: border-box;
  width: var(--panel-w);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  transform: translateX(-14px);
  opacity: 0;
  transition: left var(--t-slow) var(--easing),
              transform var(--t-slow) var(--easing),
              opacity var(--t-slow) ease;
  height: var(--panel-h, auto);
  overflow: visible;
}

.hover-zone.is-open .card {
  transform: none;
  opacity: 1;
}

.card-inner {
  position: relative;
  padding: 0;
}

.card-footer {
  position: absolute;
  bottom: 30px;
  left: 20px;
}

.card-footer a {
  color: #123e2e;
}

.card-footer__mail {
  padding-bottom: 25px;
}

/* Section */
.section {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding: var(--pad-t) var(--pad-r) var(--pad-b) var(--pad-l);
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-slow) ease, transform var(--t-slow) var(--easing);
  pointer-events: none;
}

.section.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.section h3 {
  margin: 0;
  font-size: 28px;
}

/* Links */
.links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.links li {
  margin: 8px 0;
  position: relative;
}

.links a {
  display: block;
  text-decoration: none;
  color: #123e2e;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .2px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 180ms ease, transform var(--t-slow) var(--easing);
  font-family: "Cronos Pro", Sans-serif;
}

.section.is-active .links a {
  opacity: 1;
  transform: none;
}

.links a:hover {
  color: #081f18;
  transition: background var(--t-fast) ease, transform var(--t-fast) ease;
}

/* Pill indicators */
.links li::before,
.submenu li::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 50%;
  width: 7px;
  height: 35px;
  background: var(--accent);
  border-radius: 0 0 6px 0;
  opacity: 0;
  transform: translateY(-50%) translateX(-6px) scaleY(.7);
  transition: opacity 180ms ease, transform 180ms ease;
}

.links li:hover::before,
.links li:focus-within::before,
.links li.is-active::before,
.submenu li:hover::before,
.submenu li:focus-within::before,
.submenu li.is-active::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scaleY(1);
}

@media (hover:hover) and (pointer:fine) {
  .section.is-active .links:hover a,
  .section.is-active .links:focus-within a {
    opacity: .35;
  }
  
  .section.is-active .links li:hover > a,
  .section.is-active .links li:focus-within > a,
  .section.is-active .links li.is-active > a {
    opacity: 1;
    transform: none;
  }
}

/* Submenu */
.submenu {
  position: absolute;
  top: 18px;
  box-sizing: border-box;
  width: var(--panel-w);
  left: calc(var(--mega-x) + var(--panel-w) + 14px);
  height: var(--panel-h, auto);
  max-height: calc(100vh - 200px);
  overflow: visible;
  background: var(--leaf);
  color: #e7f4ec;
  border-radius: var(--radius);
  padding: var(--pad-t) var(--pad-r) var(--pad-b) var(--pad-l);
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity var(--t-slow) ease, transform var(--t-slow) var(--easing);
  pointer-events: none;
}

.submenu.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.submenu ul {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 0;
}

.submenu li {
  margin: 8px 0;
  overflow: visible;
  position: relative;
}

.submenu a {
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  display: block;
  padding: 3px 6px;
  border-radius: 10px;
  transition: background var(--t-fast) ease, transform var(--t-fast) ease;
  font-family: "Spline Sans", sans-serif;
}

.submenu:hover a {
  opacity: 0.25;
  color: white;
}

.submenu:hover a:hover {
  opacity: 1;
}

/* =====================
   Overlays
   ===================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
  z-index: 40;
}

.menu-overlay.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease;
}

/* =====================
   Search Overlay
   ===================== */
.search-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 20px 20px;
  overflow-y: auto;
}

.admin-bar .search-overlay {
  top: calc(var(--header-h) + 32px);
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease;
}

body.search-open {
  overflow: hidden;
}

/* Search container */
.search-container {
  width: 100%;
  max-width: 1280px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 40px;
  transform: translateY(-20px);
  transition: transform var(--t-slow) var(--easing);
  position: relative;
  min-height: 400px;
  max-height: calc(100vh - var(--header-h) - 200px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.search-container::-webkit-scrollbar {
  display: none;
}

.search-overlay.is-open .search-container {
  transform: translateY(0);
}

/* Close button */
.search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--paper);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, transform 200ms ease;
  z-index: 10;
}

.search-close:hover {
  background: var(--ink);
  transform: rotate(90deg);
}

.search-close svg {
  width: 24px;
  height: 24px;
}

/* Search input */
.search-input-wrapper {
  position: relative;
  margin-bottom: 40px;
}

.search-input-wrapper::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--leaf));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease;
}

.search-input-wrapper:focus-within::before {
  transform: scaleX(1);
}

.search-input {
  width: 100%;
  border: none;
  border-bottom: 2px solid #d0d5c8;
  background: transparent;
  padding: 16px 50px 16px 0;
  font-size: 32px;
  font-weight: 300;
  color: var(--ink);
  font-family: "Cronos Pro", Sans-serif;
  outline: none;
  transition: border-color 300ms ease;
}

.search-input:focus {
  border-bottom-color: transparent;
}

.search-input::placeholder {
  color: #7a8a7d;
  font-weight: 300;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  color: var(--leaf);
}

/* Popular pages */
.popular-pages {
  transition: opacity 300ms ease, transform 300ms ease;
}

.popular-pages.is-hidden {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  position: absolute;
}

.popular-pages h3 {
  font-size: 18px;
  color: #7a8a7d;
  margin: 0 0 24px 0;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Search results */
.search-results {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}

.search-results.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-loading,
.search-error,
.search-no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink);
}

.search-loading {
  font-size: 18px;
  color: #7a8a7d;
}

.search-error {
  color: #c44;
}

.search-no-results h3 {
  font-size: 24px;
  margin: 0 0 12px 0;
  color: var(--ink);
}

.search-no-results p {
  font-size: 16px;
  color: #7a8a7d;
  margin: 0;
}

.search-results-title {
  font-size: 18px;
  color: #7a8a7d;
  margin: 0 0 24px 0;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Search results grid */
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Search result cards */
.search-result-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  transition: transform 250ms ease, box-shadow 250ms ease;
  background-size: cover;
  background-position: center;
}

.search-result-card.has-image {
  background-color: var(--leaf);
}

.search-result-card.no-image {
  background: var(--leaf);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.search-result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10, 52, 40, 0.2);
}

.search-result-overlay {
  position: relative;
  width: 100%;
  padding: 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  z-index: 1;
}

.search-result-card.no-image .search-result-overlay {
  background: transparent;
  text-align: center;
}

.search-result-card .search-result-type {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.search-result-card .search-result-title {
  font-size: 24px;
  font-weight: 800;
  color: white;
  margin: 0;
  font-family: "Cronos Pro", Sans-serif;
  line-height: 1.2;
}

.search-result-card.no-image .search-result-title {
  font-size: 28px;
}

/* =====================
   Utilities
   ===================== */
.fas {
  font-family: "FontAwesome";
  font-style: unset;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 1024px) {
  .search-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .search-container {
    padding: 30px 20px;
    border-radius: 16px;
  }
  
  .search-input {
    font-size: 24px;
    padding: 12px 40px 12px 0;
  }
  
  .search-results-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .search-overlay {
    padding: 60px 16px 16px;
  }
  
  .search-result-card .search-result-title {
    font-size: 20px;
  }
}

/* =====================
   Nav & Search Cross-Fade
   ===================== */

/* When hovering search button, fade out nav items */
.header-actions .icon-btn[aria-label="Search"]:hover ~ nav #topNav > li,
.header-bar:has(.icon-btn[aria-label="Search"]:hover) nav #topNav > li {
  opacity: 0.25;
}

/* When hovering nav, fade out search button */
#topNav > li:hover ~ .header-actions .icon-btn[aria-label="Search"] {
  opacity: 0.25;
}

/* Restore opacity when hovering search button itself */
.header-actions .icon-btn[aria-label="Search"]:hover {
  opacity: 1;
}

/* Alternatively, use a parent-based approach for better browser support */
.header-bar:has(nav:hover) .icon-btn[aria-label="Search"] {
  opacity: 0.25;
}

.header-bar:has(.icon-btn[aria-label="Search"]:hover) nav li {
  opacity: 0.25;
}

.header-bar:has(.icon-btn[aria-label="Search"]:hover) nav li.is-hot {
  opacity: 1; /* Keep active item at full opacity */
}

/* =====================
   Quote Overlay
   ===================== */
.quote-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 20px 20px;
  overflow-y: auto;
}

.admin-bar .quote-overlay {
  top: calc(var(--header-h) + 32px);
}

.quote-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease;
}

body.quote-open {
  overflow: hidden;
}

/* Quote container */
.quote-container {
  width: 100%;
  max-width: 1280px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 60px 40px;
  transform: translateY(-20px);
  transition: transform var(--t-slow) var(--easing);
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-overlay.is-open .quote-container {
  transform: translateY(0);
}

/* Close button */
.quote-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--paper);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, transform 200ms ease;
  z-index: 10;
}

.quote-close:hover {
  background: var(--ink);
  transform: rotate(90deg);
}

.quote-close svg {
  width: 24px;
  height: 24px;
}

/* Quote content */
.quote-content {
  text-align: center;
  width: 100%;
}

.quote-content h2 {
  font-size: 48px;
  font-family: "Cronos Pro", Sans-serif;
  color: var(--ink);
  margin: 0 0 40px 0;
  font-weight: 800;
}

/* Coming soon message */
.coming-soon-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 60px 40px;
  background: linear-gradient(135deg, rgba(19, 122, 61, 0.08) 0%, rgba(229, 122, 0, 0.08) 100%);
  border-radius: 20px;
  border: 2px dashed #d0d5c8;
}

.coming-soon-icon {
  width: 64px;
  height: 64px;
  color: var(--leaf);
  stroke-width: 1.5;
}

.coming-soon-message p {
  font-size: 32px;
  font-family: "Cronos Pro", Sans-serif;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.coming-soon-subtext {
  font-size: 16px;
  color: #7a8a7d;
  font-weight: 400;
  max-width: 400px;
}

/* Responsive */
@media (max-width: 768px) {
  .quote-container {
    padding: 40px 20px;
  }
  
  .quote-content h2 {
    font-size: 36px;
    margin-bottom: 30px;
  }
  
  .coming-soon-message {
    padding: 40px 20px;
  }
  
  .coming-soon-icon {
    width: 48px;
    height: 48px;
  }
  
  .coming-soon-message p {
    font-size: 24px;
  }
}
