/* ============================================
   GV Construction — Modern Mega-Menu Header
   Sticky, transparent over hero, white on scroll
   ============================================ */

/* Reset header from any older styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.3s ease;
  padding: 16px 0;
  background: transparent;
}
.site-header.header-scrolled {
  background: rgba(10, 28, 47, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  padding: 8px 0;
}
.site-header.header-solid {
  background: rgba(10, 28, 47, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.header-logo { display: flex; align-items: center; flex-shrink: 0; }
.header-logo img {
  height: 48px;
  width: auto;
  transition: height 0.3s ease, filter 0.3s ease;
}
.site-header.header-scrolled .header-logo img,
.site-header.header-solid .header-logo img { height: 38px; }

/* ===== Main Nav ===== */
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.98rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
  position: relative;
}
.site-header.header-scrolled .nav-link,
.site-header.header-solid .nav-link { color: #fff; }

.nav-link::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 2px;
  background: #1ab555;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}
.nav-item:hover .nav-link::after,
.nav-item.is-active .nav-link::after { transform: scaleX(1); }

.nav-item.has-dropdown .nav-link::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  margin-right: 4px;
  margin-bottom: 4px;
  opacity: 0.7;
  transition: transform 0.25s ease;
  order: 2;
  margin-left: 4px;
  margin-right: 0;
}
.nav-item.has-dropdown:hover .nav-link::before {
  transform: rotate(225deg) translate(-1px, -1px);
}

/* ===== Mega Dropdown ===== */
.mega-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 320px;
  width: max-content;
  max-width: min(92vw, 760px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  padding: 18px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  border-top: 3px solid #1ab555;
  z-index: 1200;
}
.mega-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 16px;
  /* invisible bridge so hover doesn't close */
  pointer-events: auto;
}

.nav-item.has-dropdown:hover .mega-dropdown,
.nav-item.has-dropdown:focus-within .mega-dropdown,
.nav-item.has-dropdown.is-open .mega-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  animation: dropdownFadeSlide 0.24s ease;
}

.dropdown-inner {
  padding: 6px 0;
  position: relative;
  z-index: 2;
}

/* Rich mega dropdown with promo panel */
.mega-dropdown.mega-rich {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 320px;
  gap: 0;
  min-width: 760px;
  max-width: min(95vw, 980px);
  padding: 0;
  overflow: hidden;
}
.mega-dropdown.mega-rich .dropdown-inner {
  padding: 20px 0;
}
.mega-dropdown.mega-rich .dropdown-inner ul li {
  opacity: 0;
  transform: translateY(8px);
}
.nav-item.has-dropdown:hover .mega-dropdown.mega-rich .dropdown-inner ul li,
.nav-item.has-dropdown:focus-within .mega-dropdown.mega-rich .dropdown-inner ul li {
  animation: dropdownItemIn 0.32s ease forwards;
}
.nav-item.has-dropdown:hover .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(1),
.nav-item.has-dropdown:focus-within .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(1) { animation-delay: 0.03s; }
.nav-item.has-dropdown:hover .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(2),
.nav-item.has-dropdown:focus-within .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(2) { animation-delay: 0.08s; }
.nav-item.has-dropdown:hover .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(3),
.nav-item.has-dropdown:focus-within .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(3) { animation-delay: 0.13s; }
.nav-item.has-dropdown:hover .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(4),
.nav-item.has-dropdown:focus-within .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(4) { animation-delay: 0.18s; }
.nav-item.has-dropdown:hover .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(5),
.nav-item.has-dropdown:focus-within .mega-dropdown.mega-rich .dropdown-inner ul li:nth-child(5) { animation-delay: 0.23s; }

.mega-dropdown.mega-rich .dropdown-promo {
  background: #f7fafc;
  border-left: 1px solid #e7edf3;
  color: #1a3553;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: background 0.25s ease;
}
.mega-dropdown.mega-rich .dropdown-promo:hover {
  background: #f2f8f5;
}
.dropdown-promo-image-wrap {
  height: 170px;
  overflow: hidden;
}
.dropdown-promo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.8s ease;
}
.dropdown-promo:hover .dropdown-promo-image {
  transform: scale(1.11);
}
.dropdown-promo-body {
  padding: 16px 18px 20px;
}
.dropdown-promo-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #1a3553;
  font-family: 'Lora', serif;
}
.dropdown-promo-text {
  margin: 0 0 14px;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #4f6173;
}
.dropdown-promo-link {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1a3553;
}

.mega-dropdown.mega-rich-wide {
  grid-template-columns: minmax(420px, 1fr) 340px;
  min-width: 880px;
  max-width: min(96vw, 1080px);
}
.mega-dropdown.mega-rich-wide .dropdown-inner {
  padding: 22px 26px;
}
.dropdown-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 240px;
}
.dropdown-inner li a {
  display: block;
  padding: 10px 24px;
  color: #1a3553;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.2s ease;
  border-left: 3px solid transparent;
}
.dropdown-inner li a:hover {
  background: #f5f9f7;
  color: #1ab555;
  padding-left: 28px;
  border-left-color: #1ab555;
}

/* 2-col mega dropdown */
.dropdown-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 14px 24px;
  min-width: 620px;
  max-width: min(92vw, 720px);
}
.dropdown-col h4 {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1ab555;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f5;
}
.dropdown-col ul li a {
  display: block;
  padding: 8px 0;
  border-left: 0;
  color: #1a3553;
  opacity: 0.98;
  transition: color 0.2s ease, transform 0.2s ease;
}
.dropdown-col ul li a:hover {
  transform: translateX(6px);
  border-left: 0;
  color: #1ab555;
}

@keyframes dropdownFadeSlide {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes dropdownItemIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Header Actions (lang + burger) ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.language-switcher {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s ease;
}
.site-header.header-scrolled .language-switcher,
.site-header.header-solid .language-switcher {
  background: rgba(255, 255, 255, 0.14);
}
.language-switcher .flag {
  width: 26px;
  height: 18px;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.language-switcher .flag:hover { transform: scale(1.12); }

/* Burger (mobile) */
.burger {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 38px;
  height: 38px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.site-header.header-scrolled .burger span,
.site-header.header-solid .burger span { background: #fff; }

.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Mobile Drawer ===== */
.mobile-drawer {
  position: fixed;
  top: 74px;
  left: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: #fff;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 999;
  overflow-y: auto;
  padding: 12px 0 30px;
}
.mobile-drawer.is-open { transform: translateX(0); }

.mobile-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 2px 18px 10px auto;
  border: 1px solid #dbe5ef;
  border-radius: 50%;
  background: #fff;
  color: #1a3553;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}
.mobile-drawer-close span {
  position: absolute;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.mobile-drawer-close span:first-child { transform: rotate(45deg); }
.mobile-drawer-close span:last-child { transform: rotate(-45deg); }
.mobile-drawer-close:hover {
  background: #1ab555;
  border-color: #1ab555;
  color: #fff;
  transform: rotate(90deg);
}

.mobile-backdrop {
  position: fixed;
  inset: 74px 0 0 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  z-index: 998;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-backdrop.is-open { opacity: 1; visibility: visible; }

.mobile-nav { padding: 0; margin: 0; list-style: none; }
.mobile-nav > li { border-bottom: 1px solid #eef2f5; }
.mobile-nav > li > a,
.mobile-nav > li > .mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 24px;
  font-size: 1.05rem;
  color: #1a3553;
  text-decoration: none;
  font-weight: 500;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.mobile-dropdown-toggle::after {
  content: '+';
  font-size: 1.4rem;
  color: #1ab555;
  font-weight: 300;
  transition: transform 0.2s ease;
}
.mobile-nav > li.is-open .mobile-dropdown-toggle::after {
  transform: rotate(45deg);
}
.mobile-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f5f9f7;
}
.mobile-nav > li.is-open .mobile-submenu { max-height: 500px; }
.mobile-submenu li a {
  display: block;
  padding: 12px 36px;
  color: #1a3553;
  font-size: 0.95rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.mobile-submenu li a:hover {
  border-left-color: #1ab555;
  color: #1ab555;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .nav-link { padding: 10px 12px; font-size: 0.92rem; }
}
@media (max-width: 980px) {
  .main-nav { display: none; }
  .burger { display: flex; }
}
@media (max-width: 480px) {
  .header-inner { padding: 0 16px; gap: 12px; }
  .header-logo img { height: 38px; }
  .mobile-drawer { top: 66px; }
  .mobile-backdrop { inset: 66px 0 0 0; }
}

/* Lock body scroll when mobile drawer open */
body.no-scroll { overflow: hidden; }

/* Spacer so content doesn't hide under fixed header on non-hero pages */
.header-spacer { height: 80px; }

/* ===== Floating Contact Button ===== */
.floating-contact-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1400;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.floating-contact-btn.is-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.floating-contact-text {
  background: rgba(10, 28, 47, 0.92);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  transform: translateX(8px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.floating-contact-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2f6b8a, #123147 72%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  border: 2px solid rgba(76, 176, 145, 0.85);
  animation: gvPulse 1.9s ease-in-out infinite;
  overflow: hidden;
}

.floating-contact-icon-wrap img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.floating-contact-btn:hover .floating-contact-text {
  transform: translateX(0);
  opacity: 1;
}

.floating-contact-btn:hover .floating-contact-icon-wrap {
  animation-play-state: paused;
  transform: scale(1.05);
}

@keyframes gvPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 181, 85, 0.45), 0 10px 24px rgba(0, 0, 0, 0.28);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(26, 181, 85, 0), 0 10px 24px rgba(0, 0, 0, 0.28);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 181, 85, 0), 0 10px 24px rgba(0, 0, 0, 0.28);
  }
}

@media (max-width: 680px) {
  .floating-contact-text {
    display: none;
  }
  .floating-contact-icon-wrap {
    width: 54px;
    height: 54px;
  }
}
