/* ========================================
   RESET & BASE STYLES
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================================
   HEADER STYLES
======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* ========================================
   LOGO STYLES
======================================== */
.logo {
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

.logo:hover {
  opacity: 0.85;
}

.logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

/* ========================================
   DESKTOP NAVIGATION
======================================== */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease, background 0.3s ease;
  border-radius: 6px;
  white-space: nowrap;
}

.nav-menu > li > a:hover {
  color: #B31E32;
  background: rgba(0, 102, 204, 0.05);
}

/* .nav-menu > li > a.active {
  color: #33354d;
  background: rgba(0, 102, 204, 0.1);
} */

/* Dropdown indicator */
.has-submenu > a::after {
  content: ' ▾';
  font-size: 0.8em;
  margin-left: 0.25rem;
}

/* ========================================
   DESKTOP DROPDOWN SUBMENU
======================================== */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 100;
  list-style: none;
}

.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li {
  margin: 0;
}

.submenu a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #444;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
  white-space: nowrap;
}

.submenu a:hover {
  /* background: rgba(0, 102, 204, 0.08); */
  color: #8C1927;
  padding-left: 1.5rem;
}

/* ========================================
   GET QUOTE BUTTON
======================================== */
.btn-get-quote {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background:  #B31E32;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.btn-get-quote:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 10px #8C1927;
  color: #ffffff !important;
}

.btn-get-quote:active {
  transform: translateY(0);
}

/* ========================================
   HAMBURGER MENU
======================================== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: transform 0.3s ease;
}

.nav-toggle span {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle:hover span {
  background: #8C1927;
}

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

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

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

/* ========================================
   MOBILE OVERLAY
======================================== */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   MOBILE PANEL
======================================== */
.mobile-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85%;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
}

.mobile-panel[aria-hidden="false"] {
  right: 0;
}

.mobile-panel-inner {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  height: 100%;
}

.mobile-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 2.5rem;
  line-height: 1;
  color: #333;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.mobile-close:hover {
  background: rgba(0, 102, 204, 0.1);
  color: #0066cc;
}

/* ========================================
   MOBILE NAVIGATION
======================================== */
.nav-menu-vertical {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 3rem;
}

.nav-menu-vertical > li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-menu-vertical a {
  display: block;
  padding: 1rem 0.75rem;
  color: #333;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.nav-menu-vertical > li > a:hover,
.nav-menu-vertical > li > a.active {
  color: #8C1927;
  padding-left: 1.25rem;
}

/* Mobile submenu toggle button */
.submenu-toggle {
  width: 100%;
  text-align: left;
  padding: 1rem 0.75rem;
  background: transparent;
  border: none;
  color: #333;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.submenu-toggle:hover {
  color: #8C1927;
  padding-left: 1.25rem;
}

.submenu-toggle::after {
  content: '▾';
  transition: transform 0.3s ease;
}

.submenu-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Mobile submenu */
.mobile-submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  background: rgba(0, 102, 204, 0.02);
  margin: 0;
  padding: 0;
}

.mobile-submenu.expanded {
  max-height: 500px;
  opacity: 1;
  padding: 0.5rem 0;
}

.mobile-submenu li {
  border: none;
}

.mobile-submenu a {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  color: #555;
  font-weight: 400;
}

.mobile-submenu a:hover {
  color: #8C1927;
  background: rgba(0, 102, 204, 0.05);
  padding-left: 2rem;
}

.mobile-cta {
  margin-top: auto;
  text-align: center;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */

/* Tablets and smaller desktops */
@media (max-width: 1200px) {
  .nav-menu {
    gap: 0.25rem;
  }
  
  .nav-menu > li > a {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }
  
  .btn-get-quote {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .submenu {
    min-width: 260px;
  }
  
  .submenu a {
    font-size: 0.85rem;
    padding: 0.65rem 1.15rem;
  }
}

/* Mobile view */
@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .header-inner {
    height: 70px;
    padding: 0 1.5rem;
  }
  
  .logo img {
    height: 45px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .header-inner {
    padding: 0 1rem;
    height: 65px;
  }
  
  .logo img {
    height: 40px;
  }
  
  .mobile-panel {
    width: 280px;
  }
  
  .mobile-panel-inner {
    padding: 1.5rem 1rem;
  }
  
  .nav-menu-vertical a,
  .submenu-toggle {
    font-size: 0.95rem;
  }
  
  .mobile-submenu a {
    font-size: 0.9rem;
  }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .header-inner {
    height: 60px;
  }
  
  .logo img {
    height: 38px;
  }
  
  .mobile-panel-inner {
    padding: 1rem;
  }
  
  .nav-menu-vertical {
    margin-top: 2rem;
    gap: 0.15rem;
  }
  
  .nav-menu-vertical a,
  .submenu-toggle {
    padding: 0.75rem;
  }
  
  .mobile-submenu a {
    padding: 0.6rem 1.25rem;
  }
}

/* Prevent body scroll when mobile menu is open */
body.nav-open {
  overflow: hidden;
}

/* Accessibility focus styles */
.nav-toggle:focus-visible,
.nav-menu a:focus-visible,
.btn-get-quote:focus-visible,
.mobile-close:focus-visible,
.nav-menu-vertical a:focus-visible,
.submenu-toggle:focus-visible,
.submenu a:focus-visible,
.mobile-submenu a:focus-visible {
  outline: 3px solid #8C1927;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .nav-toggle,
  .mobile-panel,
  .nav-overlay {
    display: none;
  }
  
  .site-header {
    position: relative;
    box-shadow: none;
    border-bottom: 1px solid #ddd;
  }
  
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }
}