/* ==========================================================================
   Rapid HVAC Nashville — Landing Page Stylesheet
   Mobile-first, single-column layout for pay-per-call lead generation.
   Optimized for Google PageSpeed 90+ on mobile.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  /* Brand colors */
  --color-primary: #BB1C20;
  --color-primary-bright: #EC2026;
  --color-primary-dark: #8B1518;
  --color-dark: #182433;
  --color-text: #3C4854;
  --color-text-light: rgba(60, 72, 84, 0.7);
  --color-white: #FFFFFF;
  --color-off-white: #F7F5F2;
  --color-warm-bg: #EBE4D9;
  --color-gray-dark: #3B3B3B;
  --color-gray-medium: #4A4A4A;
  --color-overlay-dark: rgba(0, 0, 0, 0.78);
  --color-overlay-medium: rgba(0, 0, 0, 0.6);

  /* Typography */
  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;

  /* Layout */
  --container-max: 1100px;
  --header-height: 42px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.1);
  --shadow-elevated: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-btn: 0 4px 14px rgba(187, 28, 32, 0.4);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: var(--header-height);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  line-height: 1.2;
  font-weight: 700;
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

/* --------------------------------------------------------------------------
   3. UTILITY CLASSES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary CTA button — used for "Call Now" actions */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-btn);
  width: 100%;
  letter-spacing: 0.5px;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-primary-dark);
  box-shadow: 0 6px 20px rgba(187, 28, 32, 0.5);
  transform: translateY(-1px);
}

/* Header call button */
.btn-call-header {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.btn-call-header:hover,
.btn-call-header:focus-visible {
  background-color: var(--color-primary-dark);
}

/* Ghost/outline button for dark backgrounds */
.btn-ghost {
  background-color: transparent;
  color: var(--color-white);
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border: 2px solid var(--color-white);
  border-radius: var(--radius-md);
  width: 100%;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background-color: var(--color-white);
  color: var(--color-primary);
}

/* Inline phone link styling */
.phone-link {
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
}

.phone-link-light {
  color: var(--color-primary-bright);
}

/* --------------------------------------------------------------------------
   5. STICKY HEADER
   -------------------------------------------------------------------------- */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.75rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

.header-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.header-urgency {
  background-color: var(--color-dark);
  color: var(--color-white);
  text-align: center;
  padding: 0.15rem var(--space-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   6. HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: var(--space-xl) 0 var(--space-lg);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.85) 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

.hero-phone {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.hero-phone a {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-cta {
  margin-bottom: var(--space-md);
}

.hero-cta .btn-primary {
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.hero-features {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  text-align: left;
}

.hero-features li {
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  line-height: 1.3;
}

.hero-features .check {
  color: #22BF8E;
  font-weight: 700;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   7. TRUST BADGES
   -------------------------------------------------------------------------- */
.trust-strip {
  background-color: var(--color-warm-bg);
  padding: var(--space-md) 0;
}

.trust-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.375rem;
}

.trust-badge-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.trust-badge-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-dark);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   8. ABOUT SECTION
   -------------------------------------------------------------------------- */
.about {
  padding: var(--space-xl) 0;
  background-color: var(--color-white);
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.625rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.15;
}

.about-text p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
}

.about-image {
  margin-top: var(--space-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.about-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   9. SERVICE AREAS SIDEBAR
   -------------------------------------------------------------------------- */
.areas-box {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-lg);
  box-shadow: 6px 6px 0 var(--color-gray-medium);
}

.areas-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #E9F3FF;
  margin-bottom: var(--space-sm);
}

.areas-list {
  list-style: none;
}

.areas-list li {
  font-size: 0.9375rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

.areas-list li:last-child {
  border-bottom: none;
}

.areas-list li::before {
  content: '✓ ';
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   10. CTA BANNER (repeated between sections)
   -------------------------------------------------------------------------- */
.cta-banner {
  position: relative;
  padding: var(--space-lg) 0;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}

.cta-banner-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cta-banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-overlay-dark);
}

.cta-banner .container {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 0.375rem;
}

.cta-banner .cta-subtext {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-banner .btn-primary {
  max-width: 320px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   11. SERVICES SECTION
   -------------------------------------------------------------------------- */
.services {
  position: relative;
  padding: var(--space-xl) 0;
  color: var(--color-white);
  overflow: hidden;
}

.services-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.services-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.8);
}

.services .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.services .section-label {
  color: var(--color-primary-bright);
}

.services .section-title {
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.service-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(74, 74, 74, 0.9);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: capitalize;
  padding: 0.625rem 0.75rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   12. WHY CHOOSE US
   -------------------------------------------------------------------------- */
.why-us {
  padding: var(--space-xl) 0;
  background-color: var(--color-gray-dark);
  color: var(--color-white);
}

.why-us .section-label {
  color: rgba(255, 255, 255, 0.8);
}

.why-us .section-title {
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.why-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.why-card {
  background-color: var(--color-white);
  color: var(--color-dark);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: 10px 12px 0 var(--color-primary);
}

.why-card h3 {
  font-size: 1.125rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.why-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   13. TESTIMONIALS
   -------------------------------------------------------------------------- */
.testimonials {
  position: relative;
  padding: var(--space-xl) 0;
  color: var(--color-white);
  overflow: hidden;
}

.testimonials-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.testimonials-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonials-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(94,14,15,1) 100%);
  opacity: 0.88;
}

.testimonials .container {
  position: relative;
  z-index: 1;
}

.testimonials .section-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-white);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.testimonial-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.testimonial-text {
  font-size: 0.9375rem;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: var(--space-md);
  color: rgba(255, 255, 255, 0.92);
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-name {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.125rem;
}

.testimonial-date {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   14. DETAILED SERVICES / COPY SECTION
   -------------------------------------------------------------------------- */
.detail-services {
  padding: var(--space-xl) 0;
  background-color: var(--color-gray-dark);
  color: var(--color-white);
}

.detail-services .section-label {
  color: var(--color-primary-bright);
}

.detail-services .section-title {
  color: var(--color-white);
}

.detail-services-text p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.detail-services-image {
  margin-top: var(--space-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-services-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   15. BRANDS / PARTNER LOGOS
   -------------------------------------------------------------------------- */
.brands {
  padding: var(--space-lg) 0;
  background-color: var(--color-white);
  overflow: hidden;
}

.brands .section-heading {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-md);
  color: var(--color-dark);
}

.brands-track {
  display: flex;
  transition: transform 0.6s ease;
}

.brand-slide {
  min-width: 33.333%;
  max-width: 33.333%;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
}

.brand-slide img {
  display: block;
  max-width: 100%;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   16. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-lg) 0 var(--space-md);
  text-align: center;
}

.footer-logo {
  height: 64px;
  width: auto;
  margin: 0 auto var(--space-sm);
}

.footer-nap {
  margin-bottom: var(--space-sm);
}

.footer-nap p {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.footer-nap a {
  color: var(--color-white);
  font-weight: 600;
}

.footer-legal {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
}

.footer-legal p {
  margin-bottom: 0.25rem;
}

/* --------------------------------------------------------------------------
   17. PHONE SVG ICON (inline)
   -------------------------------------------------------------------------- */
.icon-phone {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.1em;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   18. SECTION WAVE DIVIDER
   -------------------------------------------------------------------------- */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
  margin-top: -1px;
}

.wave-divider svg {
  width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   19. PULSE ANIMATION (for CTA buttons)
   -------------------------------------------------------------------------- */
@keyframes pulse-shadow {
  0%, 100% { box-shadow: 0 4px 14px rgba(187, 28, 32, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(187, 28, 32, 0.7); }
}

.btn-pulse {
  animation: pulse-shadow 2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   20. RESPONSIVE — TABLET (min-width: 600px)
   -------------------------------------------------------------------------- */
@media (min-width: 600px) {
  .hero h1 {
    font-size: 2.75rem;
  }

  .hero-phone {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .trust-badges {
    grid-template-columns: repeat(4, 1fr);
  }

  .services-grid {
    gap: var(--space-md);
  }

  .service-card-label {
    font-size: 0.9375rem;
  }

  .btn-primary {
    width: auto;
    min-width: 280px;
  }

  .btn-ghost {
    width: auto;
    min-width: 280px;
  }

  .cta-banner .btn-primary {
    width: auto;
  }

  .brand-slide {
    min-width: 20%;
    max-width: 20%;
    flex-shrink: 0;
    padding: 0 1.5rem;
  }

  .brand-slide img {
    max-height: 60px;
  }

  .testimonial-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   21. RESPONSIVE — DESKTOP (min-width: 960px)
   -------------------------------------------------------------------------- */
@media (min-width: 960px) {
  :root {
    --header-height: 46px;
  }

  .hero {
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
  }

  .about-image {
    margin-top: 0;
  }

  .about-sidebar {
    display: contents;
  }

  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-card {
    aspect-ratio: 3 / 4;
  }

  .why-cards {
    flex-direction: row;
    gap: var(--space-md);
  }

  .why-card {
    flex: 1;
  }

  .detail-services-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
  }

  .detail-services-image {
    margin-top: 0;
  }
}
