/* =============================================
   GARAGEFIX – Responsive Styles
   ============================================= */

/* Hide nav-logo on desktop (it lives inside the drawer; on desktop the header logo is used instead) */
@media (min-width: 921px) {
  .nav-logo { display: none; }
}

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid      { grid-template-columns: repeat(2, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-grid    { grid-template-columns: repeat(3, 1fr); }
  .stat-item:nth-child(3) { border-right: none; }
  .stat-item:nth-child(4),
  .stat-item:nth-child(5) { border-top: 1px solid rgba(255,255,255,.2); }
  .stat-item:nth-child(5) { border-right: none; }
}

@media (max-width: 1200px) and (min-width: 901px) {
  .reviews-grid     { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid--2  { grid-template-columns: repeat(2, 1fr); }
  .review-card--wide { grid-template-columns: 1fr; }
  .review-card--wide .review-photo { min-height: 260px; }
  .review-card--wide .review-photo img { min-height: 260px; }
}

/* Photo collage — stack vertically for all tablet sizes (769–1200px) */
@media (max-width: 1200px) and (min-width: 769px) {
  /* Repair section */
  .photo-collage-section .container > div  { flex-direction: column; gap: 32px; }
  .photo-collage-outer    { padding: 80px 60px !important; }
  .photo-top              { top: -75px !important; left: -55px !important; width: 50% !important; }
  .photo-top img          { height: 160px !important; }
  .photo-bottom           { bottom: -75px !important; right: -55px !important; width: 50% !important; }
  .photo-bottom img       { height: 160px !important; }
  .photo-main             { height: 320px !important; }

  /* Installations section */
  .photo-collage-section2 .container > div { flex-direction: column; gap: 32px; }
  .photo-collage-outer2   { padding: 80px 60px !important; }
  .photo-top2             { top: -75px !important; left: -55px !important; width: 50% !important; }
  .photo-top2 img         { height: 160px !important; }
  .photo-bottom2          { bottom: -75px !important; right: -55px !important; width: 50% !important; }
  .photo-bottom2 img      { height: 160px !important; }
  .photo-main2            { height: 320px !important; }
}

@media (max-width: 900px) {
  .services-circle-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
  .reviews-grid--2 { grid-template-columns: 1fr; }
  .review-card--wide { grid-template-columns: 1fr; }
  .review-card--wide .review-photo { min-height: 200px; }
  .two-col          { grid-template-columns: 1fr; gap: 40px; }
  .two-col--reverse { direction: ltr; }
  .areas-grid       { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid     { grid-template-columns: 1fr; }
  .review-card--featured { transform: scale(1); }
  .contact-wrap     { gap: 20px; }
}

@media (max-width: 900px) {
  .about-split { flex-direction: column; gap: 36px; align-items: stretch; }
  .about-split-img { flex: none; max-width: 100%; width: 100%; }
  .about-split-text { width: 100%; }
  .about-btns { flex-direction: column; }
  .about-btns .btn { width: 100%; justify-content: center; }
  .hero-left { flex: 0 0 100%; max-width: 100%; }
  .wide-split { flex-direction: column; gap: 36px; }
  .wide-split-left, .wide-split-right { flex: none; max-width: 100%; width: 100%; margin-left: 0; }
  .photo-stack { height: 260px; }
  .articles-grid { grid-template-columns: 1fr; }
}

/* =============================================
   TABLET + MOBILE NAV (≤ 920px)
   ============================================= */
@media (max-width: 920px) {
  /* Topbar */
  .topbar-inner { padding: 0 16px; }
  .topbar-badge { display: none; }
  .topbar { display: none !important; }

  /* Collapse header — floating burger takes over */
  .header, .header.scrolled {
    height: 0 !important; min-height: 0 !important;
    overflow: hidden !important; padding: 0 !important;
    border: none !important; background: transparent !important;
    box-shadow: none !important;
  }
  .header-inner { height: 0 !important; min-height: 0 !important; overflow: hidden !important; }

  /* Floating hamburger button */
  .mobile-burger {
    display: flex !important;
    position: fixed; top: 14px; right: 16px; z-index: 201;
    background: rgba(10,22,40,.75); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.18); border-radius: 10px;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    cursor: pointer; flex-direction: column; gap: 5px; padding: 0;
  }
  .mobile-burger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all .3s; }
  .mobile-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-burger.active span:nth-child(2) { opacity: 0; }
  .mobile-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Logo lives inside nav drawer */
  .header .logo { display: none; }

  /* Page banner */
  .page-banner { padding: 56px 20px 52px; }

  /* Services submenu — always visible in drawer */
  .nav-item .nav-dropdown {
    position: static !important;
    opacity: 1 !important; visibility: visible !important;
    transform: none !important; pointer-events: all !important;
    padding-top: 0 !important; min-width: auto !important;
    display: block !important;
  }
  .nav-item .nav-dropdown-inner {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0;
  }
  .nav-item .nav-dropdown-inner::before { display: none !important; }
  .nav-item .nav-dropdown a {
    display: flex !important;
    grid-template-columns: unset !important;
    align-items: center;
    gap: 10px;
    padding: 11px 24px 11px 40px !important;
    border-radius: 0 !important;
    color: rgba(255,255,255,.55) !important;
    font-size: .88rem !important;
    border-bottom: 1px solid rgba(255,255,255,.05) !important;
  }
  .nav-item .nav-dropdown a:hover { color: #fff !important; background: rgba(255,255,255,.05) !important; }
  .nav-item .nav-dropdown a::after { display: none !important; }
  .nav-item .nav-dropdown-divider { display: none !important; }
  .nav-item .dd-icon { width: 26px !important; height: 26px !important; font-size: .78rem !important; flex-shrink: 0; }
  .nav-item .dd-sub { display: none !important; }
  .nav-link--has-dropdown::after { display: none !important; }

  /* Nav drawer */
  .nav {
    position: fixed;
    top: 0; right: 0;
    width: min(300px, 82vw);
    height: 100vh;
    background: #111827;
    padding: 0;
    box-shadow: -6px 0 40px rgba(0,0,0,.5);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    z-index: 99;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .nav.open { transform: translateX(0); }

  .nav-logo {
    display: flex;
    align-items: center;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 8px;
  }
  .nav-logo img { height: 40px; width: auto; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 0 32px;
  }
  .nav-list li { border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav-link {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    font-size: .97rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: rgba(255,255,255,.85) !important;
    border-radius: 0;
    letter-spacing: .01em;
    transition: background .2s, color .2s;
  }
  .nav-link:hover,
  .nav-link:active,
  .nav-link:focus { color: #fff !important; background: rgba(3,169,244,.15) !important; outline: none; }
  * { -webkit-tap-highlight-color: transparent; }

  .nav-link--cta {
    margin: 16px 20px 0;
    background: #f59e0b;
    color: #0a1628 !important;
    border-radius: 10px;
    justify-content: center;
    font-weight: 800;
    letter-spacing: .02em;
    padding: 15px 20px;
  }
  .nav-link--cta:hover { background: #fbbf24; color: #0a1628 !important; }

  .burger { display: flex; z-index: 100; }

  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 98; backdrop-filter: blur(2px); }
  .nav-overlay.open { display: block; }

  /* Hero — full width text on tablet */
  .hero-left { flex: 0 0 100%; max-width: 100%; }
  .lp-hero { padding-top: 80px !important; }
}

/* =============================================
   MOBILE ONLY (≤ 768px)
   ============================================= */
@media (max-width: 768px) {
  .topbar-link--secondary { display: none; }

  /* Hero — shorter slider on mobile + wave bottom edge */
  .hero {
    background-attachment: scroll;
    height: 62vh !important;
    min-height: 360px !important;
    position: relative;
    overflow: hidden;
  }
  .hero-slides { height: 100%; }
  .hero-slide  { height: 100%; }
  /* Gradient fade at bottom — photo dissolves into the section below */
  .hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 110px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,.96) 100%);
    z-index: 4;
    pointer-events: none;
  }
  .hero-content { padding: 0 16px; z-index: 3; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  /* Hide scroll chevrons — wave does the job */
  .hero-scroll { display: none !important; }
  /* Hero dots: lift above the wave */
  .hero-dots { bottom: 68px; z-index: 5; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(3) { border-right: 1px solid rgba(255,255,255,.2); border-top: 1px solid rgba(255,255,255,.2); }
  .stat-item:nth-child(4) { border-right: none; border-top: 1px solid rgba(255,255,255,.2); }
  .stat-item:nth-child(5) { grid-column: span 2; border-top: 1px solid rgba(255,255,255,.2); border-right: none; }

  /* Sections */
  .section-pad { padding: 36px 0; }
  .section-header { margin-bottom: 28px; }
  .section-title { margin-bottom: 10px; }
  .section-body  { margin-bottom: 12px; }
  .about-split   { gap: 20px; }
  .about-btns    { margin-top: 16px; }
  .container   { padding: 0 12px; }
  .footer .container { max-width: 100% !important; padding: 0 16px !important; }

  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .why-grid      { grid-template-columns: 1fr; }
  .areas-grid    { grid-template-columns: 1fr 1fr; }
  .items-grid    { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Review cards: full width, single column */
  .reviews-grid,
  .reviews-grid--2 {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .review-card { width: 100%; box-sizing: border-box; }

  .contact-form .form-row { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 24px 18px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-main { padding: 40px 0 28px; }

  .float-call { display: flex; }

  .media-grid { grid-template-columns: 1fr; }
  .media-card { display: none; }
  .media-card--tall { display: block; }
  .media-card--tall .media-placeholder { min-height: 220px; }

  /* Inner pages contact wrap */
  .contact-wrap[style] { padding: 32px 20px !important; }
}

@media (max-width: 480px) {
  .hero-title    { font-size: 2.2rem; }
  .section-title { font-size: 1.5rem; }
  .btn-lg        { padding: 14px 22px; font-size: .9rem; }
  .areas-grid    { grid-template-columns: 1fr; }
  .urgency-badge { flex-direction: column; text-align: center; }
  .urgency-time  { font-size: 1.3rem; }
  .topbar-contacts { gap: 10px; }
  .topbar-link--secondary, .topbar-link--email { display: none; }
  .hero-dots     { bottom: 60px; }
}

@media (min-width: 375px) and (max-width: 400px) {
  .container { max-width: 94vw !important; }
}
