/* ============================================
   JSR Balcony Safety Nets — Responsive
   Exact Reference Site Match
   ============================================ */

/* ── TABLET (max 1024px) ── */
@media (max-width: 1024px) {
  .trust-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .trust-image { max-width: 550px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonial-card { min-width: calc(50% - 16px); }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
  .hero-slide h1 { max-width: 60%; }
  .ticker-item { width: 220px; }
  .ticker-item img { height: 280px; }
}

/* ── MOBILE (max 768px) ── */
@media (max-width: 768px) {
  :root {
    --header-secondary-height: 0px;
    --header-main-height: 85px;
    --section-padding: clamp(2rem, 5vw, 3rem);
  }

  .top-bar { display: none; }

  .navbar {
    top: 0;
    height: 85px;
  }

  .navbar.scrolled {
    height: 75px;
  }

  .navbar .nav-menu,
  .navbar .nav-cta { display: none; }

  .hamburger { display: flex; }

  /* CRITICAL FIX: Mobile menu must be rendered but off-screen.
     Use visibility + right:-100% to hide, NOT display:none.
     The overlay must be invisible & non-interactive until .active */
  .mobile-menu {
    display: block;
  }

  .mobile-menu-overlay {
    display: block;
    opacity: 0;
    pointer-events: none;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Logo - increased size on mobile too */
  .navbar-brand img { 
    height: 70px; 
    width: 160px;
    margin-top: 5px; 
  }

  /* Hero */
  .hero {
    height: 250px; /* Shorter height so 3 columns look proportionate on mobile */
    min-height: 200px;
    max-height: 350px;
    margin-top: 60px;
  }
  


  .hero-slide .hero-text-overlay h1 {
    max-width: 80%;
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  /* Welcome */
  .welcome-section { padding: 15px 0; }

  /* Trust */
  .trust-grid { grid-template-columns: 1fr; }
  .trust-cards-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .trust-card { padding: var(--space-3); }
  .trust-card h3 { font-size: 13px; }
  .trust-card i { font-size: 20px; }

  /* CTA Strip */
  .cta-strip { padding: 15px 0 30px; }
  .cta-strip h2 { font-size: var(--fs-h3); }
  .cta-strip h3 { font-size: var(--fs-body); }
  .cta-marquee-item { font-size: 14px; padding: 6px 20px; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .service-card-image { height: 200px; }

  .service-card-buttons { flex-direction: column; gap: var(--space-2); }
  .btn-read-more, .btn-call-card { width: 100%; justify-content: center; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; gap: var(--space-4); }

  .feature-card {
    display: flex;
    text-align: left;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .feature-card .feature-icon { margin: 0; flex-shrink: 0; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }

  /* Testimonials */
  .testimonial-card { min-width: calc(100% - 16px); padding: var(--space-5); }

  /* Ticker */
  .ticker-item { width: 180px; }
  .ticker-item img { height: 240px; }

  /* About */
  .about-features { grid-template-columns: 1fr; }

  /* Contact */
  .contact-form-wrapper { padding: var(--space-5); }
  .contact-info-card { padding: var(--space-5); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer-owner-photo { max-width: 180px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Page Banner */
  .page-banner {
    padding-top: calc(60px + var(--space-10));
    padding-bottom: var(--space-8);
  }

  /* Mobile CTA */
  .mobile-cta { display: block; }

  /* Floating buttons: show on mobile too, above the CTA bar */
  .floating-buttons {
    bottom: 80px;
    top: auto;
    transform: none;
    right: 12px;
  }

  .float-btn {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  body { padding-bottom: 65px; }

  /* Locations */
  .locations-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── SMALL MOBILE (max 480px) ── */
@media (max-width: 480px) {
  .hero { height: 45vh; min-height: 260px; }
  .hero-slide h1 { max-width: 90%; font-size: 1.3rem; }

  .trust-cards-grid { grid-template-columns: 1fr; }

  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .locations-grid { grid-template-columns: 1fr; }

  .cta-buttons { flex-direction: column; align-items: stretch; }
  .cta-buttons a { width: 100%; justify-content: center; }
}

/* ── LARGE SCREENS (min 1440px) ── */
@media (min-width: 1440px) {
  .container { max-width: 1280px; }
}
