/**
 * ==============================================================================
 * UNITED SAW SERVICES — HYDERABAD
 * Executive Responsive Header & Navigation Stylesheet (css/header.css)
 * ==============================================================================
 * 
 * FEATURES:
 * 1. Proportional Desktop Navbar (68px) with Single-Line Top Utility Bar (34px)
 * 2. Bottom-Chamfered Brand Badge extending below navbar with Orange Accent
 * 3. 2-Column Professional Services Mega-Dropdown with Chamfered Service Cards
 * 4. 100% Fully Responsive Mobile Navigation Drawer (< 992px) with Smooth Animations
 * 5. Touch-Friendly Accordion for "Our Services" in Mobile View
 * 6. High-Contrast Accessible Colors, Fast GPU Transitions & Touch Targets >= 44px
 * 7. Mobile Backdrop Overlay & Body Scroll-Lock Support
 * ==============================================================================
 */

/* ==============================================================================
   1. ROOT VARIABLES FOR EASY USER CUSTOMIZATION
   ============================================================================== */
:root {
  /* Logo Badge Geometry (Desktop) */
  --logo-box-width: 155px;       /* Badge Width (Desktop) */
  --logo-box-height: 125px;       /* Badge Height (Desktop, 28px hangs below 68px navbar) */
  --logo-box-chamfer: 13px;      /* Bottom Cut Corner Chamfer Size */
  --logo-box-bg: #ffffff;        /* Badge Background Color (Matches Navbar) */
  --logo-accent-color: #f25c05;  /* Bottom Chamfer Stripe Color (Orange) */
  --logo-scale: 1.35;            /* Logo Image Scale Factor */
  --logo-shift-down: 18px;       /* Downward shift to ensure top blade teeth are 100% visible */

  /* Header Colors */
  --header-bg: #ffffff;
  --header-border: rgba(114, 118, 121, 0.16);
  --header-shadow: 0 4px 18px rgba(37, 41, 44, 0.06);
  --header-sticky-shadow: 0 8px 26px rgba(37, 41, 44, 0.12);
  --topbar-bg: #25292c;
  --topbar-border: #fb6c03;
  --topbar-text: #e2e8f0;
  --nav-text-color: #25292c;
  --nav-hover-color: #fb6c03;
  --nav-active-bg: rgba(251, 108, 3, 0.08);

  /* Dimensions */
  --topbar-height: 34px;
  --navbar-height: 68px;
  --header-total-clearance: 102px; /* 34px + 68px */
}

/* Global Clearance on Body to Prevent Content Being Obscured */
body {
  padding-top: var(--header-total-clearance);
}

/* Prevent Background Scrolling When Mobile Nav Is Open */
body.nav-open {
  overflow: hidden !important;
  touch-action: none !important;
}

/* ==============================================================================
   2. TOP UTILITY BAR (SINGLE CRISP HORIZONTAL LINE)
   ============================================================================== */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--topbar-height);
  background: var(--topbar-bg);
  color: #ffffff;
  border-bottom: 2px solid var(--topbar-border);
  z-index: 1002;
  display: flex;
  align-items: center;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.top-bar.top-bar-hidden {
  transform: translateY(-100%);
}

.top-bar-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.top-bar-inner::-webkit-scrollbar {
  display: none;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.top-bar-left span,
.top-bar-right a {
  color: var(--topbar-text);
  font-size: 0.74rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: color 0.2s ease;
  line-height: 1;
}

.top-bar-left i,
.top-bar-right i {
  color: #fb6c03;
  font-size: 0.72rem;
}

.top-bar-right a:hover {
  color: #fb6c03;
}

.top-sep {
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.7rem;
  user-select: none;
}

.ida-top-tag {
  background: rgba(251, 108, 3, 0.18);
  border: 1px solid rgba(251, 108, 3, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.71rem !important;
  white-space: nowrap;
}

.ida-top-icon {
  width: 17px;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

/* ==============================================================================
   3. MAIN HEADER NAVBAR (STICKY / SMART SCROLL ENGINE)
   ============================================================================== */
.site-header {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  top: var(--topbar-height); /* Default: Docked right under top bar */
  height: var(--navbar-height);
  z-index: 1001;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--header-shadow);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              top 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease;
  will-change: transform, top;
}

/* State 1: At Total Top of Page */
.site-header.header-at-top {
  top: var(--topbar-height);
  transform: translateY(0);
  box-shadow: var(--header-shadow);
}

/* State 2: Scrolling Down (Navbar & Top Bar slide out) */
.site-header.header-hidden {
  top: 0;
  transform: translateY(calc(-100% - 60px));
  box-shadow: none;
}

/* State 3: Scrolling Up (Only Navbar Sticky at top: 0) */
.site-header.header-sticky-up {
  top: 0;
  transform: translateY(0);
  box-shadow: var(--header-sticky-shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 20px;
  position: relative;
}

/* ==============================================================================
   4. BRAND LOGO WITH BOTTOM-CHAMFERED EXTENDING BACKGROUND BADGE
   ============================================================================== */
.header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  text-decoration: none;
  flex-shrink: 0;
  position: relative;
  top: 0;
  width: var(--logo-box-width);
  height: var(--logo-box-height);
  padding: 2px 4px 6px 4px;
  filter: drop-shadow(0 6px 16px rgba(15, 23, 42, 0.12));
  z-index: 1005;
  overflow: visible;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.28s ease;
}

.header-logo:hover {
  transform: translateY(2px);
  filter: drop-shadow(0 10px 22px rgba(242, 92, 5, 0.22));
}

/* Chamfered Box Background Shape */
.header-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--logo-box-bg);
  clip-path: polygon(
    0 0,                                                    /* Top-Left */
    100% 0,                                                 /* Top-Right */
    100% calc(100% - var(--logo-box-chamfer)),             /* Bottom-Right Upper */
    calc(100% - var(--logo-box-chamfer)) 100%,             /* Bottom-Right Chamfer Cut */
    var(--logo-box-chamfer) 100%,                          /* Bottom-Left Chamfer Cut */
    0 calc(100% - var(--logo-box-chamfer))                 /* Bottom-Left Upper */
  );
  z-index: -1;
  transition: all 0.28s ease;
}

/* Chamfered Bottom Orange Accent Stripe */
.header-logo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--logo-accent-color);
  clip-path: polygon(
    var(--logo-box-chamfer) 0,
    calc(100% - var(--logo-box-chamfer)) 0,
    calc(100% - var(--logo-box-chamfer)) 100%,
    var(--logo-box-chamfer) 100%
  );
  z-index: 0;
}

.site-logo-img {
  height: calc(var(--logo-box-height) + 10px);
  max-height: 92px;
  width: auto;
  max-width: calc(var(--logo-box-width) + 26px);
  object-fit: contain;
  display: block;
  position: relative;
  top: var(--logo-shift-down);
  transform: scale(var(--logo-scale));
  transform-origin: center center;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  transition: transform 0.25s ease;
}

.header-logo:hover .site-logo-img {
  transform: scale(calc(var(--logo-scale) + 0.04));
}

/* ==============================================================================
   5. DESKTOP NAVIGATION BAR (>= 992px)
   ============================================================================== */
.main-nav {
  display: block;
}

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

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--nav-text-color);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: color 0.22s ease;
  white-space: nowrap;
  display: inline-block;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 3px;
  background: #fb6c03;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  border-radius: 3px;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(251, 108, 3, 0.4);
}

.nav-link:hover, 
.nav-link.active,
.nav-item.active > .nav-link {
  color: #fb6c03 !important;
  font-weight: 700;
}

.nav-link:hover::after, 
.nav-link.active::after,
.nav-item.active > .nav-link::after {
  width: 100%;
}

/* Brochure Nav Button */
.brochure-nav-btn {
  background: rgba(251, 108, 3, 0.08) !important;
  color: #fb6c03 !important;
  padding: 6px 13px !important;
  border-radius: 6px;
  border: 1.5px solid rgba(251, 108, 3, 0.3) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease !important;
  font-size: 0.88rem !important;
}

.brochure-nav-btn:hover,
.brochure-nav-btn.active,
.nav-brochure-item.active .brochure-nav-btn {
  background: #fb6c03 !important;
  color: #ffffff !important;
  border-color: #fb6c03 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 108, 3, 0.35);
}

.brochure-nav-btn::after {
  display: none !important;
}

/* ==============================================================================
   6. "OUR SERVICES" PROMINENT BUTTON & MEGA DROPDOWN (DESKTOP)
   ============================================================================== */
.nav-dropdown-item {
  position: relative;
}

.nav-dropdown-item::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 3px;
  background: #fb6c03;
  border-radius: 3px;
  transform: translateX(-50%);
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(251, 108, 3, 0.4);
}

.nav-dropdown-item.active::after,
.nav-dropdown-item:hover::after {
  width: 75%;
}

.services-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: linear-gradient(135deg, rgba(251, 108, 3, 0.12) 0%, rgba(251, 108, 3, 0.04) 100%);
  border: 1.5px solid #fb6c03;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  color: #1e2225;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
  box-shadow: 0 2px 8px rgba(251, 108, 3, 0.15);
}

.services-btn-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fb6c03;
  box-shadow: 0 0 0 2px rgba(251, 108, 3, 0.35);
  display: inline-block;
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.dropdown-arrow {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid #fb6c03;
  border-bottom: 2px solid #fb6c03;
  transform: rotate(45deg);
  transition: transform 0.25s ease, border-color 0.22s ease, margin-top 0.25s ease;
  margin-top: -3px;
  margin-left: 2px;
  flex-shrink: 0;
}

/* Hover, Active and Open States */
.nav-dropdown-item:hover .services-dropdown-btn,
.nav-dropdown-item.open .services-dropdown-btn,
.nav-dropdown-item.active .services-dropdown-btn,
.services-dropdown-btn.active {
  background: #fb6c03 !important;
  color: #ffffff !important;
  border-color: #fb6c03 !important;
  box-shadow: 0 4px 18px rgba(251, 108, 3, 0.45);
  transform: translateY(-1px);
}

.nav-dropdown-item:hover .services-btn-badge-dot,
.nav-dropdown-item.open .services-btn-badge-dot,
.nav-dropdown-item.active .services-btn-badge-dot,
.services-dropdown-btn.active .services-btn-badge-dot {
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.nav-dropdown-item:hover .dropdown-arrow,
.nav-dropdown-item.open .dropdown-arrow,
.nav-dropdown-item.active .dropdown-arrow,
.services-dropdown-btn.active .dropdown-arrow {
  border-color: #ffffff !important;
}

.nav-dropdown-item:hover .dropdown-arrow,
.nav-dropdown-item.open .dropdown-arrow {
  transform: rotate(-135deg);
  margin-top: 3px;
}

/* Mega Dropdown Menu (Centered Underneath Button on Desktop) */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 640px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(114, 118, 121, 0.18);
  border-top: 3.5px solid #fb6c03;
  box-shadow: 0 20px 45px rgba(37, 41, 44, 0.16), 0 4px 14px rgba(251, 108, 3, 0.08);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.22s;
  z-index: 1050;
  overflow: hidden;
  list-style: none;
}

/* Invisible Hover Bridge to Keep Dropdown Open When Moving Cursor */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

/* Desktop Hover & Click Open States */
.nav-dropdown-item:hover .nav-dropdown-menu,
.nav-dropdown-item.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(114, 118, 121, 0.12);
}

.dropdown-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dropdown-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fb6c03;
  box-shadow: 0 0 0 3px rgba(251, 108, 3, 0.25);
  animation: dropdownPulse 2s infinite ease-in-out;
}

@keyframes dropdownPulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 108, 3, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(251, 108, 3, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 108, 3, 0); }
}

.dropdown-badge-text {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fb6c03;
  text-transform: uppercase;
}

.dropdown-header-meta {
  font-size: 0.74rem;
  font-weight: 600;
  color: #727679;
}

.dropdown-grid-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px;
  background: #ffffff;
}

.dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Service Cards Inside Dropdown */
.dropdown-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-left: 3.5px solid #fb6c03;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.dropdown-card-item:hover,
.dropdown-card-item.active {
  background: linear-gradient(135deg, rgba(251, 108, 3, 0.14) 0%, rgba(251, 108, 3, 0.04) 100%) !important;
  border-color: rgba(251, 108, 3, 0.6) !important;
  border-left: 4.5px solid #fb6c03 !important;
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(251, 108, 3, 0.16);
}

.dropdown-card-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e2225;
  line-height: 1.35;
  transition: color 0.2s ease;
  display: block;
  white-space: normal;
  flex: 1;
}

.dropdown-card-action {
  font-size: 0.95rem;
  font-weight: 800;
  color: #a0aec0;
  transition: all 0.22s ease;
  transform: translateX(0);
  margin-left: 8px;
  flex-shrink: 0;
  line-height: 1;
}

.dropdown-card-item:hover .dropdown-card-title,
.dropdown-card-item.active .dropdown-card-title {
  color: #fb6c03 !important;
  font-weight: 800;
}

.dropdown-card-item:hover .dropdown-card-action,
.dropdown-card-item.active .dropdown-card-action {
  color: #fb6c03 !important;
  transform: translateX(3px);
}

.dropdown-footer-accent {
  height: 3px;
  background: linear-gradient(90deg, #fb6c03 0%, #25292c 100%);
  width: 100%;
}

/* ==============================================================================
   7. HEADER ACTIONS & MOBILE TOGGLE (HAMBURGER)
   ============================================================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-quote-btn {
  background: #fb6c03;
  color: #ffffff;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 18px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(251, 108, 3, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.header-quote-btn:hover {
  background: #e05e00;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251, 108, 3, 0.45);
}

/* Accessible Mobile Toggle Button */
.mobile-toggle {
  display: none; /* Shown only on mobile screens */
  background: transparent;
  border: 1px solid rgba(114, 118, 121, 0.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 10px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: all 0.25s ease;
  z-index: 1010;
  -webkit-tap-highlight-color: transparent;
}

.mobile-toggle:hover,
.mobile-toggle:focus-visible {
  border-color: #fb6c03;
  background: rgba(251, 108, 3, 0.06);
  outline: none;
}

.mobile-toggle span {
  width: 22px;
  height: 2.5px;
  background: #25292c;
  border-radius: 2px;
  display: block;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.22s ease, 
              background-color 0.22s ease;
  transform-origin: center center;
}

/* Morph to 'X' When Nav Is Active */
.mobile-toggle.active span:nth-child(1),
.mobile-toggle.is-active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
  background: #fb6c03;
}

.mobile-toggle.active span:nth-child(2),
.mobile-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active span:nth-child(3),
.mobile-toggle.is-active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
  background: #fb6c03;
}

/* Dark Backdrop Overlay on Mobile When Menu Is Open */
.nav-backdrop {
  display: none;
}

/* ==============================================================================
   8. RESPONSIVE MEDIA QUERIES FOR ALL SCREEN SIZES
   ============================================================================== */

/* ------------------------------------------------------------------------------
   A. LAPTOPS / MEDIUM DESKTOPS (992px to 1199px)
   ------------------------------------------------------------------------------ */
@media (min-width: 992px) and (max-width: 1199px) {
  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }
  .main-nav .nav-list {
    gap: 12px;
  }
  .nav-link {
    font-size: 0.88rem;
  }
  .services-dropdown-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
  .nav-dropdown-menu {
    width: 580px;
  }
}

/* ------------------------------------------------------------------------------
   B. TABLETS & MOBILE DEVICES (<= 991px) — FULL RESPONSIVE NAVBAR
   ------------------------------------------------------------------------------ */
@media (max-width: 991px) {
  :root {
    --logo-box-width: 135px;
    --logo-box-height: 80px;
    --logo-box-chamfer: 10px;
    --logo-scale: 1.25;
    --logo-shift-down: 12px;
    --topbar-height: 32px;
    --navbar-height: 64px;
    --header-total-clearance: 96px;
  }

  body {
    padding-top: var(--header-total-clearance);
  }

  /* Make sure header container spans cleanly */
  .site-header {
    height: var(--navbar-height);
  }

  .header-inner {
    padding: 0 16px;
    height: 100%;
    position: static; /* Allows mobile menu drawer to align 100% with the full site-header */
  }

  /* Show Hamburger Toggle Button */
  .mobile-toggle {
    display: flex;
  }

  /* Hide Desktop Quote Button from Header Bar */
  .header-quote-btn {
    display: none;
  }

  .site-logo-img {
    height: 70px;
    max-height: 74px;
    max-width: 140px;
  }

  /* Mobile Backdrop Overlay */
  .nav-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s;
  }

  .nav-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* ----------------------------------------------------------------------------
     MOBILE MENU DRAWER CONTAINER
     ---------------------------------------------------------------------------- */
  .main-nav {
    display: block; /* Managed with visibility & transform for smooth animation */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid rgba(114, 118, 121, 0.14);
    border-bottom: 4px solid #fb6c03;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(251, 108, 3, 0.08);
    padding: 16px 18px 24px 18px;
    max-height: calc(100vh - var(--navbar-height) - 10px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.28s;
  }

  /* Active Open State */
  .main-nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Mobile Navigation List */
  .main-nav .nav-list {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    width: 100%;
  }

  .nav-item {
    width: 100%;
    display: block;
  }

  .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #1e2225;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
  }

  .nav-link:hover,
  .nav-link.active,
  .nav-item.active > .nav-link {
    color: #fb6c03 !important;
    font-weight: 700;
    background: rgba(251, 108, 3, 0.08) !important;
    border-color: rgba(251, 108, 3, 0.3) !important;
    border-left: 4px solid #fb6c03 !important;
    padding-left: 16px;
  }

  .nav-link::after,
  .nav-dropdown-item::after {
    display: none !important;
  }

  /* ----------------------------------------------------------------------------
     MOBILE ACCORDION FOR "OUR SERVICES"
     ---------------------------------------------------------------------------- */
  .nav-dropdown-item {
    width: 100%;
  }

  .services-dropdown-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin: 2px 0;
    font-size: 0.94rem;
    background: #fdf6f0;
    border: 1.5px solid #fb6c03;
    border-radius: 6px;
    clip-path: none;
    box-shadow: none;
  }

  .services-dropdown-btn:hover,
  .nav-dropdown-item.open .services-dropdown-btn,
  .nav-dropdown-item.active .services-dropdown-btn {
    background: #fb6c03 !important;
    color: #ffffff !important;
    transform: none;
  }

  .dropdown-arrow {
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-width: 2.5px;
  }

  .nav-dropdown-item.open .dropdown-arrow {
    transform: rotate(-135deg);
    margin-top: 4px;
  }

  /* Accordion Submenu Panel */
  .nav-dropdown-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: 1px solid rgba(251, 108, 3, 0.3) !important;
    border-left: 3.5px solid #fb6c03 !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    margin-top: 2px !important;
    margin-bottom: 8px !important;
    display: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: #fbfcfe !important;
    padding: 6px !important;
    animation: accordionSlideDown 0.22s ease forwards;
  }

  @keyframes accordionSlideDown {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-dropdown-item.open .nav-dropdown-menu {
    display: block !important;
  }

  .dropdown-header-bar {
    padding: 8px 12px;
    background: #edf2f7;
    border-radius: 4px;
    margin-bottom: 6px;
  }

  .dropdown-header-meta {
    display: none !important;
  }

  .dropdown-grid-columns {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .dropdown-card-item {
    padding: 11px 12px !important;
    background: #ffffff !important;
    border: 1px solid rgba(114, 118, 121, 0.16) !important;
    border-left: 3.5px solid #fb6c03 !important;
    clip-path: none !important;
    border-radius: 6px !important;
  }

  .dropdown-card-item:hover,
  .dropdown-card-item.active {
    background: rgba(251, 108, 3, 0.09) !important;
    border-color: rgba(251, 108, 3, 0.4) !important;
    transform: none !important;
  }

  .dropdown-card-title {
    font-size: 0.88rem !important;
  }

  /* Brochure Mobile Button */
  .brochure-nav-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px !important;
    font-size: 0.96rem !important;
  }

  /* Quick Action Button Inside Mobile Drawer */
  .mobile-drawer-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(114, 118, 121, 0.24);
  }

  .mobile-quote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fb6c03;
    color: #ffffff !important;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 20px;
    border-radius: 6px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(251, 108, 3, 0.35);
  }

  .mobile-quote-btn:hover {
    background: #e05e00;
  }

  .mobile-quick-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25292c;
    color: #ffffff !important;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 11px 20px;
    border-radius: 6px;
    text-decoration: none;
  }
}

/* ------------------------------------------------------------------------------
   C. SMALL PHONES (<= 576px)
   ------------------------------------------------------------------------------ */
@media (max-width: 576px) {
  :root {
    --logo-box-width: 122px;
    --logo-box-height: 74px;
    --logo-box-chamfer: 9px;
    --logo-scale: 1.20;
    --logo-shift-down: 10px;
    --topbar-height: 30px;
    --navbar-height: 62px;
    --header-total-clearance: 92px;
  }

  .site-header {
    height: var(--navbar-height);
  }

  .header-inner {
    padding: 0 12px;
  }

  .site-logo-img {
    height: 64px;
    max-height: 68px;
    max-width: 125px;
  }

  /* Compact Top Bar on Small Phones */
  .top-bar-inner {
    padding: 0 10px;
  }

  .top-bar-left .location-tag,
  .top-bar-left .top-sep:nth-of-type(1),
  .top-bar-left .cert-tag {
    display: none; /* Hide verbose text to fit on small phone screens without horizontal scroll */
  }

  .top-bar-right a {
    font-size: 0.72rem;
  }

  .top-bar-right a[href^="mailto:"] {
    display: none; /* Prioritize phone call on mobile */
  }

  .main-nav {
    padding: 12px 14px 20px 14px;
  }

  .nav-link {
    padding: 11px 12px;
    font-size: 0.94rem;
  }

  .dropdown-card-item {
    padding: 10px 11px !important;
  }

  .dropdown-card-title {
    font-size: 0.85rem !important;
  }
}

/* Scroll margin helper for anchor navigation */
.service-card, [id^="demo-"], section[id] {
  scroll-margin-top: 85px;
}
