/* ============================================
   NAVBAR - Header & Navigation Styles
   ============================================ */

.header {
  position: fixed;
  top: 1;
  left: 0;
  right: 0;
  height: 100px;
  margin-top: 8px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0);
  contain: layout style;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.header.scrolled {
  margin-top: 0px;
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
  backdrop-filter: blur(5px);
}

.header.scrolled .nav-links a {
  color: var(--color-text-muted);
}

.header.scrolled .nav-links a:hover,
.header.scrolled .nav-links a.active {
  color: var(--color-primary);
}

.header.scrolled .nav-toggle span {
  background: var(--color-primary);
}

.nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-xl);
  min-height: 4.5rem;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0;
}

.logo-imgs {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.logo-img {
  height: 280px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease, height var(--transition-base);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.logo-imgs:hover {
  scale: 1.2;
  transition: scale var(--transition-base);
}

.logo-img-default {
  position: relative;
  opacity: 1;
}

.logo-img-scrolled {
  position: absolute;
  top: 0;
  left: 0;
}

.header.scrolled .logo-img {
  height: 240px;
  width: auto;
}

.header.scrolled .logo-img-default {
  opacity: 0;
  pointer-events: none;
}

.header.scrolled .logo-img-scrolled {
  opacity: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  font-weight: 400;
  font-size: 1rem;
  color: white;
  transition: color var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
  font-weight: 500;
  font-size: 1.05rem;
  transition: all 0.1s ease;
}

.nav-toggle span {
  background: white;
  transition: background var(--transition-base);
}

/* Call Now button: subtle glass default, hover = color animates left-to-right (scaleX); scrolled = solid */
.btn-claim {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06) !important;
  border: none;
  box-shadow: none;
  transition: transform 0.2s ease, opacity 0.3s ease;
  white-space: nowrap;
}

.btn-claim .btn-claim-number {
  color: rgba(255, 255, 255, 0.92);
}

.btn-claim .btn-claim-icon {
  color: var(--color-accent);
  transition: color 0.35s ease;
}

.btn-claim::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 0;
  border-radius: var(--radius-full);
}

.btn-claim:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-claim:hover .btn-claim-icon {
  color: white;
}

.btn-claim .btn-claim-icon,
.btn-claim .btn-claim-number {
  position: relative;
  z-index: 1;
}

.btn-claim-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-claim-icon svg {
  width: 100%;
  height: 100%;
}

.btn-claim:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
  color: white !important;
}

/* Scrolled state: solid style (no glass, no hover fill animation) */
.header.scrolled .btn-claim {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%) !important;
  color: white !important;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.header.scrolled .btn-claim .btn-claim-number,
.header.scrolled .btn-claim .btn-claim-icon {
  color: white !important;
}

.header.scrolled .btn-claim:hover .btn-claim-number,
.header.scrolled .btn-claim:hover .btn-claim-icon {
  color: white !important;
}

.header.scrolled .btn-claim::before {
  display: none;
}

.header.scrolled .btn-claim:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
  color: white !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
}

/* Mobile: phone button always visible in bar (hidden on desktop) */
.btn-claim-mobile {
  display: none;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  /* Smaller logo on phone screens (reduces width) */
  .logo-img {
    height: 160px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
  }

  .header.scrolled .logo-img {
    height: 160px;
    max-width: 160px;
  }

  /* Show phone button in nav bar on mobile; hide the one inside the drawer */
  .btn-claim-mobile {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    margin-right: var(--space-sm);
    padding: 0.5rem 0.65rem;
    white-space: nowrap;
  }

  .btn-claim-mobile .btn-claim-number {
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .btn-claim-mobile .btn-claim-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }

  .nav-links .btn-claim {
    display: none !important;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3xl) var(--space-xl);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-base);
    gap: var(--space-md);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    color: var(--color-primary);
  }

  /* In mobile menu: solid button so it’s visible on white */
  .nav-links .btn-claim {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%) !important;
    color: white !important;
  }

  .nav-links .btn-claim::before {
    display: none;
  }
  
  .nav {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
    min-height: 3.5rem;
    gap: var(--space-md);
  }
}

/* ============================================
   Homepage header extras (stats bar + services slider)
   ============================================ */

/* Home header: stick to top (no margin), auto height */
.header--home {
  height: auto;
  min-height: 80px;
  margin-top: 0;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), min-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-home-extras {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  transition: transform 5s ease;
}

/* Stats bar - same background as scrolled navbar */
.nav-stats-bar {
  padding: 0.5rem var(--space-xl);
  background: transparent;
}

.nav-stats-inner {  
  max-width: auto;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.nav-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem 0.6rem;
  flex-wrap: wrap;
  padding: 0.2rem 0;
  border-radius: var(--radius-md);
  min-width: 80px;
  max-width: auto;
}

.nav-stat-value {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  word-break: break-word; /* wraps long text */
  overflow-wrap: anywhere;
  text-align: center;
}

.nav-stat:hover {
  transform: translateY(-1px);
  background: rgba(15, 46, 92, 0.04);
}

.nav-stat-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.nav-stat:hover .nav-stat-icon {
  transform: scale(1.08);
}

.nav-stat-icon--primary {
  color: var(--color-primary);
}

.nav-stat-value {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  word-break: break-word; /* wraps long text */
  overflow-wrap: anywhere;
  text-align: center;
}

.nav-stat-value span {
  background: linear-gradient(10deg, var(--color-secondary), var(--color-accent-hover));
  color: transparent;
  background-clip: text;
}

.nav-stat-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-stat-stars {
  font-size: 0.8125rem;
  color: var(--color-secondary);
  letter-spacing: 0.04em;
}

.nav-stat-sub {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  margin-left: 1px;
}

/* Phone link in stats bar – same look as other stats, clickable */
.nav-stat--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.nav-stat--link .nav-stat-icon {
  color: var(--color-primary);
}

.nav-stat--link .nav-stat-icon svg {
  display: block;
}

.nav-stat--link:hover {
  background: rgba(15, 46, 92, 0.08);
}

.nav-stat--link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.nav-stat-divider {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.08) 20%, rgba(15, 23, 42, 0.08) 80%, transparent);
  flex-shrink: 0;
  opacity: 0.7;
}

/* Services slider: tight padding, thin divider */
.nav-services-slider-wrap {
  overflow: hidden;
  border-top: 1px solid rgba(15, 46, 92, 0.06);
  padding: 0.25rem 0 0.2rem;
}

.nav-services-slider {
  overflow: hidden;
  width: 100%;
}

.nav-services-track {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  width: max-content;
  animation: nav-services-scroll 45s linear infinite;
}

.nav-services-track:hover {
  animation-play-state: paused;
}

@keyframes nav-services-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.nav-service-pill {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0;
  white-space: nowrap;
  transition: color 0.25s ease, transform 0.2s ease;
}

.nav-service-pill:hover {
  color: var(--color-primary);
  transform: translateX(2px);
}

.nav-service-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.45;
  flex-shrink: 0;
  transition: opacity 0.25s ease;
}

.nav-services-track:hover .nav-service-dot {
  opacity: 0.7;
}

/* Homepage extras: responsive – keep visible on all screens including phones */
@media (max-width: 1024px) {
  .nav-stats-inner {
    gap: var(--space-sm);
  }

  .nav-stat-value {
    font-size: 1rem;
  }

  .nav-stat-label {
    font-size: 0.6875rem;
  }
}

@media (max-width: 768px) {
  .header--home .header-home-extras {
    max-height: 160px;
  }

  .nav-stats-bar {
    padding: 0.4rem var(--space-md);
  }

  .nav-stats-inner {
    gap: var(--space-xs) var(--space-sm);
    justify-content: center;
  }

  .nav-stat {
    padding: 0.15rem 0.25rem;
  }

  .nav-stat-value {
    font-size: 0.875rem;
  }

  .nav-stat-label {
    font-size: 0.6rem;
  }

  .nav-stat-stars {
    font-size: 0.7rem;
  }

  .nav-stat-sub {
    display: none;
  }

  .nav-stat-divider {
    height: 16px;
    opacity: 0.5;
  }

  .nav-stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .nav-stat--link .nav-stat-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .header--home .header-home-extras {
    max-height: 140px;
  }

  .nav-stats-bar {
    padding: 0.35rem var(--space-sm);
  }

  .nav-stats-inner {
    gap: 0.25rem var(--space-xs);
  }

  .nav-stat {
    padding: 0.1rem 0.2rem;
  }

  .nav-stat-value {
    font-size: 0.8125rem;
  }

  .nav-stat-label {
    font-size: 0.5625rem;
  }

  .nav-stat-divider {
    height: 14px;
  }
}


