/* =========================================================================
   Header redesign (REQ-202609211213) — single-row header, logo lockup with
   legibility scrim/shadow, translucent gradient bar, mega-menu dropdowns
   for Contractor Services / IDS / Project Spotlight. Replaces the old
   two-row .home-header / .home-nav-* header markup on every page.

   Kept as its own file rather than appended into the existing site.css
   (5,946 lines) — that file's old .home-header/.home-nav-* rules become
   unused once this markup ships (left in place there as harmless dead
   code — a non-blocking cleanup follow-up, not risking a blind edit
   across the ~15 separate media-query blocks that reference them there).
   This file is loaded after site.css on every page, so the one override
   below (.home-shell) wins on the cascade without editing that file.
   All other selectors here are new class names, checked against the full
   site.css for collisions before use (.site-header already existed there
   as unrelated leftover CSS with a box-shadow rule, so this header is
   namespaced .icr-header-bar instead, avoiding that collision). ========= */

.home-shell {
  position: relative;
}

.icr-header-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 128px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  background: linear-gradient(180deg, rgba(3, 3, 3, 0.86) 0%, rgba(3, 3, 3, 0.5) 55%, rgba(3, 3, 3, 0) 100%);
}

/* -- Logo lockup (left): bigger logos + independent radial scrim + a
   drop-shadow hugging each logo's own silhouette, so the lockup stays
   legible against any hero photo/video, not just today's. Same fix
   already applied and Castillo-approved on the mock (2026-09-22). -- */
.logo-lockup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  padding: 10px 18px;
}

.logo-lockup::before {
  content: "";
  position: absolute;
  inset: -8px -16px;
  z-index: -1;
  border-radius: 18px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.28) 55%, rgba(0, 0, 0, 0) 100%);
}

.logo-lockup img.icr-logo {
  height: 46px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 9px rgba(0, 0, 0, 0.55));
}

.logo-divider {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.28);
}

.ids-trigger {
  position: relative;
  display: flex;
  align-items: center;
}

.ids-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
}

.ids-trigger-btn img.ids-logo {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 9px rgba(0, 0, 0, 0.55));
}

.nav-chevron {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-bottom: 2px solid var(--brand-red, #c82934);
  border-right: 2px solid var(--brand-red, #c82934);
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.15s ease;
}

.ids-trigger.is-open .nav-chevron,
.nav-item.is-open .nav-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}

/* -- Center nav -- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0 auto;
  padding-left: 24px;
}

.nav-item {
  position: relative;
}

.nav-item > a,
.nav-item > button {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #cfd5d7;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 2px;
}

.nav-item > a:hover,
.nav-item > button:hover,
.nav-item.is-open > button {
  color: #ffffff;
}

/* -- CTA (right) -- */
.icr-header-bar .cta-quote {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-red, #c82934);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.icr-header-bar .cta-quote:hover {
  background: var(--brand-red-dark, #8f1521);
  transform: translateY(-1px);
  color: #fff;
}

/* ===== Dropdowns — anchor under the hovered item, not full-bleed ===== */
.ids-trigger .mega-dropdown,
.nav-item .mega-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  background: #111111;
  border-top: 3px solid var(--brand-red, #c82934);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 60;
}

.nav-item.is-open > .mega-dropdown,
.ids-trigger.is-open .mega-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* -- Mega-menu tile style (Tesla / Freefly reference) -- */
.mega-dropdown {
  padding: 26px;
}

.mega-dropdown .mega-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  padding: 0 2px;
}

.mega-dropdown .mega-title {
  margin: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mega-dropdown .mega-title span {
  color: var(--brand-red, #c82934);
}

.mega-dropdown .mega-sub {
  margin: 0;
  color: #8b8f90;
  font-size: 12px;
  font-weight: 600;
}

.tile-grid {
  display: grid;
  gap: 14px;
}

.tile-grid.grid-3 {
  grid-template-columns: repeat(3, 168px);
}

.tile-grid.grid-4 {
  grid-template-columns: repeat(4, 168px);
}

.service-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  background: #000;
  box-shadow: 0 0 0 1px #2a2a2a;
}

.service-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: saturate(0.94) brightness(0.92);
}

.service-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.86) 100%);
}

.service-tile:hover img {
  transform: scale(1.07);
  filter: saturate(1.05) brightness(0.85);
}

.service-tile .tile-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 12px 12px 13px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* ===== Mobile hamburger fallback — simple stacked list, not the desktop
   mega-tiles; a real mobile mega-menu is an explicit follow-up (Backlog
   ticket), desktop-first is Castillo's own call, not a gap. ===== */
.icr-header-bar .mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex: 0 0 auto;
  margin-left: auto;
}

.icr-header-bar .mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-drawer {
  display: none;
  position: absolute;
  top: 128px;
  left: 0;
  right: 0;
  z-index: 60;
  background: #111111;
  border-top: 3px solid var(--brand-red, #c82934);
  padding: 8px 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease;
}

.mobile-drawer a,
.mobile-drawer .m-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 14px 24px;
  cursor: pointer;
}

.mobile-drawer .m-sub {
  display: none;
  flex-direction: column;
  background: #0b0b0b;
}

.mobile-drawer .m-sub.is-open {
  display: flex;
}

.mobile-drawer .m-sub a {
  padding: 11px 24px 11px 40px;
  font-size: 12.5px;
  font-weight: 700;
  color: #cfd5d7;
}

.mobile-drawer .m-cta {
  margin: 14px 24px 0;
  background: var(--brand-red, #c82934);
  border-radius: 999px;
  justify-content: center;
  font-size: 12px;
}

body.icr-mobile-open .mobile-drawer {
  display: block;
  max-height: 80vh;
  overflow-y: auto;
}

body.icr-mobile-open .icr-header-bar .mobile-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.icr-mobile-open .icr-header-bar .mobile-toggle span:nth-child(2) {
  opacity: 0;
}

body.icr-mobile-open .icr-header-bar .mobile-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1080px) {
  .icr-header-bar .main-nav {
    display: none;
  }

  .icr-header-bar .cta-quote {
    display: none;
  }

  .icr-header-bar {
    justify-content: space-between;
  }

  .icr-header-bar .mobile-toggle {
    display: block;
  }

  .ids-trigger .mega-dropdown {
    display: none !important;
  }

  .ids-trigger-btn {
    pointer-events: none;
  }

  .tile-grid.grid-4,
  .tile-grid.grid-3 {
    grid-template-columns: repeat(3, 140px);
  }
}

/* -- Logo lockup keeps flex-shrink:0 (line 45) so it never gets visually
   squished by the flex row, but that also means it never shrinks to make
   room for the hamburger on narrow phones — at desktop size (223px +
   207px + gaps) it pushes .mobile-toggle off the right edge of the
   viewport entirely below ~600px, with no scroll to reach it. Fix: scale
   the lockup itself down on small screens instead of relying on flex to
   do it. ===== */
@media (max-width: 600px) {
  .icr-header-bar {
    padding: 0 8px;
  }

  .logo-lockup {
    gap: 6px;
    padding: 4px;
  }

  .logo-lockup img.icr-logo {
    height: 22px;
  }

  .logo-divider {
    height: 18px;
  }

  .ids-trigger-btn {
    gap: 4px;
    padding: 4px 2px;
  }

  .ids-trigger-btn img.ids-logo {
    height: 20px;
  }

  .icr-header-bar .mobile-toggle {
    padding: 5px;
    margin-left: 4px;
  }
}

/* =========================================================================
   Historical & Digital Preservation real hero photo (REQ-202609211213,
   Castillo decision 2026-09-22): site.css's .historical-hero rule (line
   ~2382 of that 5,946-line file) still points at the generic shared
   stand-in "Artboard 3-100.jpg" used across all 6 drone-service hero
   sections. Overriding it here — this file loads after site.css on every
   page, so this wins the cascade at equal specificity — rather than
   editing that large shared file directly for one line, same reasoning
   the file's own header comment above gives for the .home-shell override.
   Replaces the borrowed Historical Restoration stand-in with the real
   Canva-generated photo (public/assets/Images/historical-digital-preservation-hero-ai.jpg),
   already committed. This selector only ever matches
   historical-digital-preservation.html — no other page uses
   .historical-hero — so there is no risk of this bleeding onto another
   page's hero. ========================================================= */
.historical-hero {
  background-image: url("../Images/historical-digital-preservation-hero-ai.jpg");
}
