/* ============================================
   AC Repair Fort Worth - Responsive Styles
   Mobile-First Breakpoints
   ============================================ */

/* Mobile — typography & components (spacing in layout.css) */
@media (max-width: 767px) {
  body {
    background-attachment: scroll;
    overflow-x: hidden;
  }

  .logo span {
    font-size: 0.9rem;
    max-width: 9.5rem;
    line-height: 1.2;
  }

  @media (max-width: 380px) {
    .logo span {
      display: none;
    }
  }

  .hero {
    min-height: 0;
    padding-top: calc(var(--header-height) + 0.75rem);
    padding-bottom: 1.5rem;
    align-items: flex-end;
  }

  .hero-content {
    padding: 0.5rem 0 0;
  }

  .hero-badge {
    margin-bottom: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
  }

  .hero-title {
    font-size: 1.625rem;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
    line-height: 1.55;
  }

  .hero-features {
    margin-top: 1rem;
    gap: 0.5rem 1rem;
  }

  .hero-feature {
    font-size: var(--font-size-xs);
  }

  .btn-group {
    gap: 0.625rem;
  }

  .btn-group .btn {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 0;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-sm);
  }

  .section-title {
    font-size: 1.375rem;
  }

  .section-label {
    font-size: var(--font-size-xs);
  }

  .section-desc {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  .service-card--home .service-icon {
    display: none;
  }

  .service-card--home h3 {
    grid-column: 2;
    font-size: 1rem;
    margin-bottom: 0;
    align-self: center;
  }

  .service-card--home p {
    grid-column: 1 / -1;
    margin-bottom: 0.625rem;
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .service-card--home .service-link {
    grid-column: 1 / -1;
  }

  .showcase-split__content p {
    margin-bottom: 1.25rem;
    line-height: 1.6;
  }

  .showcase-features {
    margin-bottom: 1rem;
  }

  .why-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .stat-number {
    font-size: 1.625rem;
  }

  .stat-label {
    font-size: var(--font-size-xs);
  }

  .areas-grid {
    gap: 0.5rem;
  }

  .area-tag {
    padding: 0.5rem 0.625rem;
    font-size: var(--font-size-xs);
  }

  .faq-question {
    font-size: var(--font-size-sm);
  }

  .stats-section::before {
    opacity: 0.5;
  }

  .emergency-banner h2 {
    font-size: 1.375rem;
  }

  .emergency-banner p {
    font-size: var(--font-size-base);
  }

  .fab-container {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: 1rem;
  }

  .hero--premium {
    min-height: 0;
    align-items: flex-end;
  }

  .photo-gallery {
    grid-template-columns: 1fr !important;
    gap: 0.875rem;
  }

  .photo-gallery__item--wide {
    grid-column: span 1;
  }

  .services-index-grid {
    grid-template-columns: 1fr !important;
  }

  .trust-images {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }

  .brand-showcase {
    gap: 1rem;
  }

  .google-business-grid {
    gap: 1rem;
  }

  .google-profile-card {
    padding: 1.25rem;
  }

  .showcase-split__media img {
    aspect-ratio: 16 / 10;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-cta {
    display: none;
  }

  .hamburger {
    display: flex !important;
  }

  .nav-desktop {
    display: none !important;
  }

  body.nav-open .fab-container {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .hero-banner-img {
    max-height: none;
    object-fit: contain;
  }

  .hero-cta-bar {
    padding: 1rem 0 1.25rem;
  }

  .hero-phones a {
    font-size: var(--font-size-base);
  }

  .brand-badge {
    font-size: var(--font-size-xs);
    padding: 0.375rem 0.75rem;
  }

  .hover-lift {
    transform: none !important;
  }
}

/* Small devices (576px+) */
@media (min-width: 576px) {
  .areas-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet — keep hamburger menu until desktop breakpoint */
@media (min-width: 768px) and (max-width: 991px) {
  .nav-desktop,
  .header-cta {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }

  .logo span {
    max-width: 12rem;
  }
}

/* Medium devices (768px+) — layout only; nav stays mobile until 992px */
@media (min-width: 768px) {
  :root {
    --header-height: 80px;
  }

  h1 { font-size: var(--font-size-4xl); }
  h2, .section-title { font-size: var(--font-size-3xl); }

  .hero-title {
    font-size: var(--font-size-4xl);
  }

  .page-hero h1 {
    font-size: var(--font-size-4xl);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat-number {
    font-size: var(--font-size-4xl);
  }

  .financing-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-detail-grid.reverse .service-detail-image {
    order: 0;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1.2fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .areas-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .fab-container {
    bottom: 2rem;
    right: 2rem;
  }
}

/* Large devices (992px+) — desktop navigation */
@media (min-width: 992px) {
  .nav-desktop {
    display: block;
  }

  .header-end {
    gap: 0.75rem;
  }

  .header-cta {
    display: block;
  }

  .hamburger {
    display: none !important;
  }

  .mobile-nav,
  .mobile-nav-overlay {
    display: none !important;
  }

  .logo span {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
  }

  .nav-desktop > ul {
    gap: 1.5rem;
  }

  .nav-desktop a {
    font-size: var(--font-size-sm);
  }

  .hero-title {
    font-size: var(--font-size-5xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-xl);
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 52px;
  }

  .service-card:hover,
  .team-card:hover {
    transform: none;
  }

  .hover-lift:hover {
    transform: none;
  }
}

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

  .hero {
    min-height: auto;
    page-break-after: avoid;
  }

  body {
    color: #000;
  }
}
