/* Menu / header — larger logo + futuristic backdrop */

:root {
  /* Must match real #header height (logo + padding) to avoid white gap */
  --tuaum-header-h: 156px;
}

#header {
  /* Keep Bootstrap .fixed-top — do NOT set position:relative here */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  overflow: visible; /* dropdown must not be clipped */
  z-index: 997;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.22);
  box-shadow:
    0 8px 28px rgba(0, 12, 28, 0.45),
    inset 0 -1px 0 rgba(0, 229, 255, 0.12);
  background:
    radial-gradient(ellipse 90% 140% at 8% 40%, rgba(0, 220, 255, 0.32) 0%, transparent 52%),
    radial-gradient(ellipse 70% 120% at 92% 15%, rgba(90, 130, 255, 0.28) 0%, transparent 48%),
    radial-gradient(ellipse 55% 90% at 55% 120%, rgba(0, 255, 210, 0.16) 0%, transparent 42%),
    radial-gradient(circle at 40% 50%, rgba(0, 160, 255, 0.08) 0%, transparent 35%),
    linear-gradient(125deg, #010914 0%, #061428 36%, #0b2342 64%, #030d1a 100%);
}

/* Circuit / grid overlay */
#header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.14) 1px, transparent 1px),
    linear-gradient(rgba(0, 180, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 255, 0.07) 1px, transparent 1px);
  background-size:
    44px 44px,
    44px 44px,
    11px 11px,
    11px 11px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  opacity: 1;
}

/* Scanning light sweep */
#header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(0, 240, 255, 0.08) 48%,
    rgba(120, 180, 255, 0.14) 50%,
    rgba(0, 240, 255, 0.08) 52%,
    transparent 60%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: tuaum-header-scan 9s ease-in-out infinite;
}

@keyframes tuaum-header-scan {
  0%,
  100% {
    background-position: 120% 0;
  }
  50% {
    background-position: -20% 0;
  }
}

#header.header-scrolled {
  padding: 8px 0;
  background:
    radial-gradient(ellipse 70% 100% at 10% 50%, rgba(0, 200, 255, 0.16) 0%, transparent 55%),
    linear-gradient(125deg, rgba(2, 11, 24, 0.97) 0%, rgba(6, 20, 40, 0.97) 50%, rgba(4, 16, 31, 0.97) 100%);
  box-shadow: 0 6px 22px rgba(0, 8, 20, 0.5);
}

#header .container {
  position: relative;
  z-index: 1;
  gap: 18px;
  overflow: visible;
}

#header .logo {
  flex: 0 0 auto;
}

#header .logo h1 {
  margin: 0;
  line-height: 1;
}

#header .logo img {
  /* Source logo is ~100px; force larger display */
  height: 136px;
  width: auto;
  max-height: none;
  filter: drop-shadow(0 0 14px rgba(0, 220, 255, 0.4));
  transition: transform 0.25s ease, filter 0.25s ease, height 0.25s ease;
}

#header.header-scrolled .logo img {
  height: 104px;
  filter: drop-shadow(0 0 10px rgba(0, 220, 255, 0.3));
}

#header .logo a:hover img {
  transform: translateY(-1px) scale(1.02);
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.55));
}

/* Main/header offset is controlled in breadcrumbs.css + main.js sync */

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 0;
  overflow: visible;
  position: relative;
  z-index: 20;
}

.navbar > ul {
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
  overflow: visible;
}

.navbar > ul > li {
  position: relative;
}

.navbar > ul > li > a,
.navbar > ul > li > a:focus {
  position: relative;
  padding: 10px 12px;
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(230, 248, 255, 0.92);
  text-shadow: 0 0 12px rgba(0, 200, 255, 0.15);
  border-radius: 3px;
  border-bottom: 0 !important;
  transition: color 0.2s ease, background 0.2s ease, text-shadow 0.2s ease;
}

.navbar > ul > li > a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00e5ff, transparent);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.7);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.navbar > ul > li > a:hover,
.navbar > ul > li:hover > a,
.navbar > ul > li > a.active,
.navbar > ul > li > a.active:focus {
  color: #fff;
  background: rgba(0, 200, 255, 0.1);
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
}

.navbar > ul > li > a:hover::after,
.navbar > ul > li:hover > a::after,
.navbar > ul > li > a.active::after,
.navbar > ul > li > a.active:focus::after {
  transform: scaleX(1);
}

.navbar > ul > li > a i {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.85;
}

/* Dropdown — full panel, not clipped */
.navbar .dropdown ul {
  display: block;
  left: 0;
  right: auto;
  top: calc(100% + 6px);
  min-width: 240px;
  width: max-content;
  max-width: min(320px, 90vw);
  padding: 8px;
  border: 1px solid rgba(0, 200, 255, 0.18);
  border-radius: 6px;
  background: linear-gradient(180deg, #f7fcff 0%, #eef6fa 100%);
  box-shadow:
    0 14px 34px rgba(2, 20, 40, 0.22),
    0 0 0 1px rgba(0, 200, 255, 0.06);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.navbar .dropdown:hover > ul,
.navbar .dropdown:focus-within > ul {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  top: 100%;
}

.navbar .dropdown ul li {
  min-width: 0;
  white-space: nowrap;
}

.navbar .dropdown ul a {
  display: block;
  padding: 10px 14px;
  border-radius: 4px;
  color: #1e3a48 !important;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none !important;
  background: transparent !important;
  white-space: nowrap;
}

.navbar .dropdown ul a::after {
  display: none !important;
}

.navbar .dropdown ul a:hover,
.navbar .dropdown ul .active:hover,
.navbar .dropdown ul li:hover > a {
  color: #052c3f !important;
  background: rgba(0, 180, 220, 0.12) !important;
}

/* Language flags */
.navbar .language {
  margin-left: 4px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 40, 70, 0.45);
  box-shadow: 0 0 16px rgba(0, 200, 255, 0.12);
}

.navbar .language a,
.navbar .language a:focus,
.navbar .language a:hover {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0.85;
}

.navbar .language a::after {
  display: none !important;
}

.navbar .language a:hover {
  opacity: 1;
}

.navbar .language img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.mobile-nav-toggle {
  color: #e6f8ff;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* Raise whole header stacking when mobile menu is open */
#header:has(.navbar-mobile) {
  z-index: 10000;
}

/* Mobile overlay — full-screen, dark text on white panel */
.navbar.navbar-mobile {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  background: rgba(1, 10, 22, 0.92) !important;
  display: block !important;
  overflow-y: auto !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}

.navbar-mobile .mobile-nav-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  color: #e6f8ff !important;
  z-index: 10001;
}

.navbar.navbar-mobile > ul {
  display: block !important;
  position: absolute !important;
  top: 55px !important;
  right: 15px !important;
  bottom: 15px !important;
  left: 15px !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 12px 0 !important;
  background: #ffffff !important;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow-y: auto !important;
  flex-wrap: nowrap !important;
}

.navbar.navbar-mobile > ul > li {
  width: 100% !important;
  display: block !important;
}

.navbar-mobile > ul > li > a,
.navbar-mobile > ul > li > a:focus,
.navbar-mobile a,
.navbar-mobile a:focus {
  color: #052c3f !important;
  background: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
  border-bottom: 0 !important;
  white-space: normal !important;
  width: 100%;
  justify-content: flex-start;
}

.navbar-mobile > ul > li > a::after,
.navbar-mobile a::after {
  display: none !important;
}

.navbar-mobile a:hover,
.navbar-mobile .active,
.navbar-mobile .active:focus,
.navbar-mobile li:hover > a {
  color: #0a6a8a !important;
  background: rgba(0, 160, 200, 0.08) !important;
}

.navbar.navbar-mobile .dropdown ul {
  display: none;
  position: static !important;
  left: auto !important;
  top: auto !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 4px 12px 8px !important;
  padding: 4px !important;
  background: #f3f8fb !important;
  box-shadow: none !important;
  border: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.navbar.navbar-mobile .dropdown ul.dropdown-active,
.navbar.navbar-mobile .dropdown > ul.dropdown-active {
  display: block !important;
}

/* Template toggles .dropdown-active on the nested ul */
.navbar-mobile .dropdown ul.dropdown-active {
  display: block !important;
}

.navbar-mobile .dropdown ul li {
  min-width: 0 !important;
  width: 100% !important;
}

.navbar-mobile .dropdown ul a {
  color: #1e3a48 !important;
  white-space: normal !important;
  width: 100% !important;
}

.navbar-mobile .language {
  margin: 12px 16px;
  display: inline-flex;
  border-color: rgba(5, 44, 63, 0.2);
  background: rgba(5, 44, 63, 0.06);
  box-shadow: none;
}

@media (max-width: 1199px) {
  :root {
    --tuaum-header-h: 141px;
  }

  .navbar > ul > li > a,
  .navbar > ul > li > a:focus {
    padding: 8px 9px;
    font-size: 11px;
  }

  #header .logo img {
    height: 120px;
  }

  #header.header-scrolled .logo img {
    height: 92px;
  }
}

@media (max-width: 991px) {
  :root {
    --tuaum-header-h: 118px;
  }

  #header .logo img {
    height: 96px;
  }

  #header.header-scrolled .logo img {
    height: 72px;
  }
}

/* Home slider — taller on mobile (~header + 15%) */
@media (max-width: 991px) {
  .home-carousel,
  .home-carousel .carousel-inner,
  .home-carousel .carousel-item {
    min-height: calc(var(--tuaum-header-h, 118px) * 1.15);
    height: calc(var(--tuaum-header-h, 118px) * 1.15);
  }

  .home-carousel .carousel-item > a,
  .home-carousel .carousel-item {
    display: block;
    height: 100%;
  }

  .home-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

@media (max-width: 575px) {
  .home-carousel,
  .home-carousel .carousel-inner,
  .home-carousel .carousel-item {
    min-height: calc(var(--tuaum-header-h, 118px) * 1.15);
    height: calc(var(--tuaum-header-h, 118px) * 1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  #header::after {
    animation: none;
  }
}
