/* ==========================================================================
   Maniro — Header Component (Navbar + Hero)
   ========================================================================== */

/* ---------- Navbar ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

/* Brand / logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  flex-shrink: 0;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.05);
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--color-text);
  transition: color 0.25s var(--ease);
}

.brand:hover .brand-name {
  color: var(--color-sky-dark);
}

[data-theme="dark"] .brand:hover .brand-name {
  color: var(--color-sky);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--color-text);
  background: var(--color-bg-subtle);
}

.nav-link.is-active {
  color: var(--color-text);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--color-sky);
}

/* Right-side actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--color-sky);
  color: var(--color-sky-dark);
  background: var(--color-sky-tint);
  transform: rotate(12deg);
}

[data-theme="dark"] .theme-toggle:hover {
  color: var(--color-sky);
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* Mobile hamburger — hidden on desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.menu-toggle:hover {
  border-color: var(--color-sky);
  background: var(--color-sky-tint);
}

.menu-toggle:hover .menu-bar {
  background: var(--color-sky-dark);
}

[data-theme="dark"] .menu-toggle:hover .menu-bar {
  background: var(--color-sky);
}

.menu-bar {
  width: 16px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0b0f14;
  background-image: url("../../assets/images/hero/hero-transmission-towers.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
}

/* Serve the lighter, higher-quality WebP to browsers that support it;
   the JPEG above stays as the universal fallback */
@supports (background-image: image-set(url("x.webp") type("image/webp") 1x)) {
  .hero {
    background-image: image-set(
      url("../../assets/images/hero/hero-transmission-towers.webp")
        type("image/webp") 1x
    );
  }
}

/* Dark overlay so the white text stays readable over the photo,
   heavier on the right (where RTL text sits) fading toward the left */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to left,
      rgba(6, 10, 16, 0.82) 0%,
      rgba(6, 10, 16, 0.62) 42%,
      rgba(6, 10, 16, 0.32) 75%,
      rgba(6, 10, 16, 0.18) 100%
    ),
    linear-gradient(
      to top,
      rgba(6, 10, 16, 0.55) 0%,
      rgba(6, 10, 16, 0) 35%
    );
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: block;
  padding-block: 64px;
}

.hero-content {
  max-width: 620px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-sky);
}

.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-sky);
}

.hero-title {
  margin: 0 0 22px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: normal;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-text {
  max-width: 460px;
  margin: 0 0 34px;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons need their own treatment here since they sit on top of a photo
   instead of a flat surface — solid color + glass style keep both readable
   no matter how light or dark that part of the image is, in any theme. */
.hero-actions .btn-primary {
  background: var(--color-sky);
  color: #06232f;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.hero-actions .btn-primary:hover {
  background: #ffffff;
  color: #06232f;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.45);
  transform: translateY(-2px);
}

.hero-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-2px);
}
