/* ==========================================================================
   RAPID RESPONSE PLUMBING & HEATING — LAYOUT & NAVIGATION
   Mobile-First Implementation
   ========================================================================== */

/* Top Bar Announcement / Hotline Strip */
.top-bar {
  background-color: var(--color-primary-dark);
  color: var(--color-neutral-300);
  font-size: 0.8125rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 60px;
  overflow: hidden;
  transition: max-height var(--duration-normal) var(--ease-out), 
              padding var(--duration-normal) var(--ease-out), 
              opacity var(--duration-fast) var(--ease-out);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
}

.top-bar-item svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.top-bar-item a {
  color: var(--color-surface);
  font-weight: 700;
}

.top-bar-item a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.bullet-sep {
  color: var(--color-neutral-500);
  margin: 0 4px;
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transition: background-color var(--duration-fast), box-shadow var(--duration-fast);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  transition: height var(--duration-normal) var(--ease-out);
}

/* Compact Scroll State (Option C) */
.header.scrolled {
  box-shadow: var(--shadow-lg);
  background-color: rgba(11, 37, 69, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header.scrolled .top-bar {
  max-height: 0;
  padding: 0;
  opacity: 0;
  border-bottom: none;
}

.header.scrolled .header-inner {
  height: 60px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #EA580C 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-surface);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
  flex-shrink: 0;
}

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

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-surface);
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Header Action Group (Always visible, even on mobile) */
.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-cta-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: var(--color-surface);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
  white-space: nowrap;
  min-height: 44px;
}

.phone-cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.45);
  color: var(--color-surface);
}

.phone-cta-link svg {
  width: 18px;
  height: 18px;
  animation: pulse-phone 2s infinite ease-in-out;
  flex-shrink: 0;
}

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

/* Mobile Navigation Drawer (<1024px) */
.nav-menu {
  list-style: none;
}

@media (max-width: 1023px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-2);
    box-shadow: var(--shadow-xl);
    display: none;
    border-bottom: 3px solid var(--color-accent);
    z-index: 99;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-neutral-200);
    border-radius: var(--radius-md);
  }

  .nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--color-surface);
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
  }
}

/* Desktop Navigation (1024px+) */
@media (min-width: 1024px) {
  .header-inner {
    height: 80px;
  }

  .logo-title {
    font-size: 1.25rem;
  }

  .logo-subtitle {
    font-size: 0.725rem;
  }

  .logo-icon {
    width: 44px;
    height: 44px;
  }

  .mobile-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
  }

  .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-neutral-200);
    padding: 8px 4px;
    position: relative;
  }

  .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
  }

  .phone-cta-link {
    padding: 12px 22px;
    font-size: 1.05rem;
  }
}

/* FR-12 Floating Mobile & Desktop Sticky Call Bar */
.sticky-call-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: var(--color-primary-dark);
  padding: 10px 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(100%);
  transition: transform var(--duration-normal) var(--ease-out);
}

.sticky-call-bar.visible {
  transform: translateY(0);
}

.sticky-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: var(--color-surface);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: var(--shadow-glow);
  min-height: 48px;
}

/* Footer Section — Responsive Grid */
.footer {
  background-color: var(--color-primary-dark);
  color: var(--color-neutral-300);
  padding-top: var(--space-12);
  padding-bottom: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-12);
  }
}

.footer-brand p {
  color: var(--color-neutral-400);
  font-size: 0.95rem;
  margin-top: var(--space-4);
  max-width: 320px;
}

.footer-title {
  color: var(--color-surface);
  font-size: 1.1rem;
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  color: var(--color-neutral-400);
  font-size: 0.95rem;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--color-neutral-300);
  font-size: 0.95rem;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-neutral-500);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
