/* ==========================================================================
   MOBILE-FIRST NAVIGATION SYSTEM
   Mobile/Tablet: Logo + Pulsating Phone + Hamburger
   Desktop: Full navigation menu
   ========================================================================== */

/* CSS Variables */
:root {
  /* Atlantic Brand Colors */
  --atlantic-blue: #005EB8;
  --atlantic-orange: #FF6B35;
  --atlantic-dark: #1A2332;
  --atlantic-light: #F5F7FA;
  --atlantic-white: #FFFFFF;
  --emergency-red: #FF3333;
  
  /* Navigation Heights */
  --header-height-mobile: 60px;
  --header-height-desktop: 80px;
  
  /* Shadows */
  --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --dropdown-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s ease;
  
  /* Z-indexes */
  --z-header: 1000;
  --z-dropdown: 1100;
  --z-mobile-menu: 2000;
  --z-overlay: 1999;
}

/* ==========================================================================
   BASE HEADER STRUCTURE
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--atlantic-white);
  box-shadow: var(--header-shadow);
  z-index: var(--z-header);
  transition: all var(--transition-base);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height-mobile);
  padding: 0 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo */
.header-logo {
  flex-shrink: 0;
  z-index: 10;
}

.header-logo a {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 24px;
  width: auto;
}

/* ==========================================================================
   MOBILE/TABLET SPECIFIC (Default - Mobile First)
   ========================================================================== */

/* Hide desktop navigation by default */
.desktop-nav,
.desktop-cta {
  display: none;
}

/* Mobile Actions Container */
.mobile-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ==========================================================================
   PULSATING PHONE BUTTON
   ========================================================================== */

.phone-button-pulse {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--atlantic-orange);
  border-radius: 50%;
  text-decoration: none;
  transition: transform var(--transition-base);
}

.phone-button-pulse:hover {
  transform: scale(1.05);
}

.phone-button-pulse:active {
  transform: scale(0.95);
}

.phone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--atlantic-white);
  z-index: 2;
  position: relative;
}

.phone-icon svg {
  width: 20px;
  height: 20px;
}

/* Pulsating Rings Animation */
.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: var(--atlantic-orange);
  border-radius: 50%;
  opacity: 0.6;
  animation: pulse-animation 2s ease-out infinite;
  pointer-events: none;
}

.pulse-ring:nth-child(2) {
  animation-delay: 0.5s;
}

.pulse-ring:nth-child(3) {
  animation-delay: 1s;
}

@keyframes pulse-animation {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

/* ==========================================================================
   HAMBURGER BUTTON
   ========================================================================== */

.hamburger-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.hamburger-button:hover {
  transform: scale(1.05);
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--atlantic-dark);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger-line:nth-child(2) {
  margin: 5px 0;
}

/* Hamburger to X Animation */
.hamburger-button.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-button.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-button.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ==========================================================================
   FULL-SCREEN MOBILE MENU
   ========================================================================== */

/* Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: var(--z-overlay);
}

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

/* Mobile Menu Container */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--atlantic-white);
  overflow-y: auto;
  transition: right var(--transition-smooth);
  z-index: var(--z-mobile-menu);
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--atlantic-light);
  background: var(--atlantic-white);
  position: sticky;
  top: 0;
  z-index: 10;
}

.mobile-menu-logo {
  height: 24px;
  width: auto;
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.mobile-menu-close:hover {
  transform: rotate(90deg);
}

/* Emergency CTA in Mobile Menu */
.mobile-menu-emergency {
  padding: 1rem;
  background: linear-gradient(135deg, #FFF5F2 0%, #FFE8E0 100%);
}

.emergency-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--atlantic-orange);
  color: var(--atlantic-white);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-base);
}

.emergency-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.emergency-icon {
  font-size: 1.5rem;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.emergency-text {
  flex: 1;
  margin: 0 1rem;
}

.emergency-text strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.emergency-text span {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Mobile Menu List */
.mobile-menu-list {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-item {
  border-bottom: 1px solid var(--atlantic-light);
}

.mobile-menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  color: var(--atlantic-dark);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
}

.mobile-menu-link:hover {
  background: var(--atlantic-light);
  padding-left: 2rem;
}

/* Submenu */
.submenu-arrow {
  transition: transform var(--transition-base);
  color: var(--atlantic-blue);
}

.mobile-menu-item.submenu-open .submenu-arrow {
  transform: rotate(180deg);
}

.mobile-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
  background: var(--atlantic-light);
}

.mobile-menu-item.submenu-open .mobile-submenu {
  max-height: 500px;
}

.mobile-submenu li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-submenu a {
  display: block;
  padding: 0.75rem 1.5rem 0.75rem 2.5rem;
  color: var(--atlantic-dark);
  text-decoration: none;
  font-size: 0.925rem;
  transition: all var(--transition-base);
}

.mobile-submenu a:hover {
  background: var(--atlantic-white);
  padding-left: 3rem;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--atlantic-light);
  background: var(--atlantic-light);
}

.mobile-menu-badges {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mobile-menu-badges .badge {
  padding: 0.25rem 0.75rem;
  background: var(--atlantic-blue);
  color: var(--atlantic-white);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
}

/* ==========================================================================
   DESKTOP NAVIGATION (>1024px)
   ========================================================================== */

@media (min-width: 1024px) {
  /* Adjust header height */
  .header-container {
    height: var(--header-height-desktop);
    padding: 0 2rem;
  }
  
  /* Larger logo on desktop */
  .logo-img {
    height: 28px;
  }
  
  /* Hide mobile elements */
  .mobile-actions,
  .mobile-menu,
  .mobile-menu-overlay {
    display: none !important;
  }
  
  /* Show desktop navigation */
  .desktop-nav {
    display: flex;
    flex: 1;
    justify-content: center;
    margin: 0 2rem;
  }
  
  /* Navigation Menu */
  .nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .nav-item {
    position: relative;
  }
  
  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--atlantic-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.925rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--atlantic-blue);
    transform: translateX(-50%);
    transition: width var(--transition-base);
  }
  
  .nav-link:hover {
    color: var(--atlantic-blue);
  }
  
  .nav-link:hover::after {
    width: 80%;
  }
  
  .dropdown-arrow {
    font-size: 0.75rem;
    transition: transform var(--transition-base);
  }
  
  /* Dropdown Menu */
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--atlantic-white);
    border-radius: 8px;
    box-shadow: var(--dropdown-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
    padding: 0.5rem 0;
  }
  
  .nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--atlantic-dark);
    text-decoration: none;
    font-size: 0.925rem;
    transition: all var(--transition-base);
  }
  
  .dropdown-item:hover {
    background: var(--atlantic-light);
    padding-left: 1.75rem;
  }
  
  .dropdown-icon {
    font-size: 1.125rem;
  }
  
  /* Mega Dropdown */
  .mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 600px;
    background: var(--atlantic-white);
    border-radius: 8px;
    box-shadow: var(--dropdown-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
    padding: 1.5rem;
  }
  
  .nav-item:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  
  .mega-dropdown-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .mega-column h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--atlantic-blue);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mega-column a {
    display: block;
    padding: 0.5rem 0;
    color: var(--atlantic-dark);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-base);
  }
  
  .mega-column a:hover {
    color: var(--atlantic-blue);
    padding-left: 0.5rem;
  }
  
  /* Desktop CTA */
  .desktop-cta {
    display: flex;
    flex-shrink: 0;
  }
  
  .cta-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: var(--atlantic-orange);
    color: var(--atlantic-white);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-base);
    font-weight: 500;
  }
  
  .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  }
  
  .cta-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cta-text small {
    font-size: 0.75rem;
    opacity: 0.9;
  }
  
  .cta-text strong {
    font-size: 1rem;
    font-weight: 700;
  }
}

/* ==========================================================================
   TABLET SPECIFIC ADJUSTMENTS (768px - 1023px)
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1023px) {
  .header-container {
    padding: 0 1.5rem;
  }
  
  .logo-img {
    height: 26px;
  }
  
  .phone-button-pulse {
    width: 48px;
    height: 48px;
  }
  
  .hamburger-button {
    width: 48px;
    height: 48px;
  }
  
  .hamburger-line {
    width: 28px;
    height: 3px;
  }
}

/* ==========================================================================
   ACCESSIBILITY & UTILITIES
   ========================================================================== */

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--atlantic-blue);
  outline-offset: 2px;
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Smooth scroll behavior */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Print styles */
@media print {
  .site-header,
  .mobile-menu,
  .mobile-menu-overlay {
    display: none !important;
  }
}