/* =========================================================
   PROJECT PHOENIX - LUXURY HEADER CSS
   ========================================================= */

:root {
  --hdr-gold: #C5A46D;
  --hdr-black: #0D0D0D;
  --hdr-white: #FFFFFF;
  --hdr-text-light: #FFFFFF;
  --hdr-text-dark: #0D0D0D;
  --hdr-font: 'Poppins', sans-serif;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  font-family: var(--hdr-font);
  /* Default State: WHITE (Inner Pages) */
  background-color: var(--hdr-white);
  color: var(--hdr-text-dark);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background-color 0.35s ease, color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-scrolled {
  position: fixed;
  background-color: var(--hdr-gold) !important;
  color: var(--hdr-text-dark) !important;
  border-bottom: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(0);
}

.site-header.is-scrolled .nav-link,
.site-header.is-scrolled .top-item,
.site-header.is-scrolled .top-socials a,
.site-header.is-scrolled .top-divider {
  color: #0D0D0D !important;
  opacity: 1 !important;
}

/* Ensure content inside hero sections on inner pages sits below the non-transparent header */
.site-header:not(.is-transparent) ~ main .service-hero__content,
.site-header:not(.is-transparent) ~ main .hero__content,
.site-header:not(.is-transparent) ~ main .page-hero,
.site-header:not(.is-transparent) ~ main .sp-hero {
  padding-top: 136px;
}

@media (max-width: 1023px) {
  .site-header:not(.is-transparent) ~ main .service-hero__content,
  .site-header:not(.is-transparent) ~ main .hero__content,
  .site-header:not(.is-transparent) ~ main .page-hero,
  .site-header:not(.is-transparent) ~ main .sp-hero {
    padding-top: 68px;
  }
}

/* Fix SVG fill issues overridden by base.css */
.site-header svg[fill="none"] {
  fill: none !important;
}

/* -----------------------------------------
   TRANSPARENT STATE (HOME PAGE HERO)
----------------------------------------- */
.site-header.is-transparent {
  background-color: transparent;
  color: var(--hdr-text-light);
  border-bottom: none;
}

.site-header.is-transparent .site-header__top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* -----------------------------------------
   TOP BAR
----------------------------------------- */
.site-header__top {
  height: 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: height 0.35s ease, opacity 0.35s ease;
}

.site-header.is-scrolled .site-header__top {
  display: none !important;
}

.site-header__top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 92%;
  max-width: 1800px;
  margin: 0 auto;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-item svg {
  width: 14px;
  height: 14px;
}

.top-divider {
  width: 1px;
  height: 12px;
  background-color: currentColor;
  opacity: 0.2;
}

.top-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-socials a {
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.top-socials a:hover {
  opacity: 1;
}

.top-socials svg {
  width: 16px;
  height: 16px;
}

/* -----------------------------------------
   MAIN HEADER
----------------------------------------- */
.site-header__main {
  height: 96px;
  display: flex;
  align-items: center;
  transition: height 0.35s ease;
}

.site-header.is-scrolled .site-header__main {
  height: 78px;
}

.site-header__grid {
  display: grid;
  grid-template-columns: 280px 1fr 260px;
  align-items: center;
  width: 92%;
  max-width: 1800px;
  margin: 0 auto;
}

/* -----------------------------------------
   LOGO
----------------------------------------- */
.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__logo img {
  width: auto;
  max-width: 220px;
  height: 60px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.site-header.is-scrolled .site-header__logo img {
  transform: scale(0.85);
  transform-origin: left center;
}

/* Logo Swapping and Colors */
.logo-dark { 
  display: block; 
  filter: brightness(0); /* Makes the gold logo Black */
}
.logo-light { 
  display: none; 
  filter: brightness(0) invert(1); /* Makes the gold logo White */
}

/* Transparent State (Top of home page only) */
.site-header.is-transparent:not(.is-scrolled) .logo-dark { display: none; }
.site-header.is-transparent:not(.is-scrolled) .logo-light { display: block; }

/* When scrolled, FORCE dark logo regardless of transparent state */
.site-header.is-scrolled .logo-dark { display: block !important; }
.site-header.is-scrolled .logo-light { display: none !important; }

/* -----------------------------------------
   NAVIGATION LINKS
----------------------------------------- */
.site-header__nav {
  justify-self: center;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.nav-arrow {
  width: 14px;
  height: 14px;
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  opacity: 0.7;
}

/* -----------------------------------------
   MEGA MENU
----------------------------------------- */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  background-color: var(--hdr-white);
  color: var(--hdr-text-dark);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 40px;
  z-index: 100;
  margin-top: 20px;
}

.has-mega-menu:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 0;
}

.has-mega-menu:hover .nav-arrow {
  transform: rotate(180deg);
}

.mega-menu__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.mega-menu__heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--hdr-gold);
  margin: 0 0 20px 0;
  font-weight: 500;
  letter-spacing: 1px;
}

.mega-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mega-menu__list a {
  font-size: 0.9rem;
  color: var(--hdr-black);
  transition: color 0.3s ease;
}

.mega-menu__list a:hover {
  color: var(--hdr-gold);
}

.mega-menu__link-all {
  margin-top: 10px;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.8rem !important;
  letter-spacing: 1px;
}

.mega-menu__image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}

.mega-menu__image img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 95%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 95%);
  transition: transform 0.5s ease;
}

.mega-menu__image:hover img {
  transform: scale(1.05);
}

/* -----------------------------------------
   CTA BUTTON
----------------------------------------- */
.site-header__cta {
  justify-self: end;
}

.btn--reserve {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border: 1px solid var(--hdr-gold);
  background-color: transparent;
  color: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn--reserve:hover {
  background-color: var(--hdr-gold);
  color: var(--hdr-white) !important;
}

.site-header:not(.is-transparent) .btn--reserve {
  color: var(--hdr-black);
}

.site-header.is-transparent:not(.is-scrolled) .btn--reserve {
  color: var(--hdr-white);
}

.site-header.is-scrolled .btn--reserve {
  color: var(--hdr-black) !important;
  border-color: var(--hdr-black) !important;
}

.site-header.is-scrolled .btn--reserve:hover {
  background-color: var(--hdr-black);
  color: var(--hdr-white) !important;
}

.calendar-icon {
  width: 16px;
  height: 16px;
}

/* -----------------------------------------
   HAMBURGER TOGGLE (DESKTOP HIDDEN)
----------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
  justify-self: end;
}

.nav-toggle__bar {
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* -----------------------------------------
   MOBILE NAVIGATION DRAWER
----------------------------------------- */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--hdr-black);
  color: var(--hdr-white);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0,0,0,0.3);
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav__logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

.mobile-nav__close {
  background: none;
  border: none;
  color: var(--hdr-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.mobile-nav__close svg {
  width: 24px;
  height: 24px;
}

.mobile-nav__content {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--hdr-white);
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--hdr-gold);
}

.mobile-nav-link-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav-dropdown-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--hdr-gold);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav-subitems {
  list-style: none;
  padding: 12px 0 0 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-subitems[hidden] {
  display: none;
}

.mobile-nav-subitems .mobile-nav-link {
  font-size: 0.85rem;
  opacity: 0.8;
}

.view-all-link {
  color: var(--hdr-gold) !important;
}

.mobile-nav__footer {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn--reserve-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 1px solid var(--hdr-gold);
  background-color: var(--hdr-gold);
  color: var(--hdr-black);
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 0.85rem;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}

.btn--reserve-mobile:hover {
  background-color: var(--hdr-white);
}

.mobile-nav__contact {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.mobile-nav__contact a {
  color: var(--hdr-gold);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

/* -----------------------------------------
   RESPONSIVE MEDIA QUERIES (< 1024px)
----------------------------------------- */
@media (max-width: 1023px) {
  .site-header__top {
    display: none;
  }

  .site-header__main {
    height: 68px;
  }

  .site-header.is-scrolled .site-header__main {
    height: 60px;
  }

  .site-header__grid {
    grid-template-columns: 1fr auto;
    width: 90%;
  }

  .site-header__logo img {
    height: 44px;
    max-width: 160px;
  }

  .site-header__nav {
    display: none;
  }

  .site-header__cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 479px) {
  .mobile-nav {
    max-width: 100%;
  }
}
