/* ==========================================================================
   SCHOOL SETUP - RESPONSIVE STYLESHEET
   Mobile-first, Tablet, and Desktop Breakpoint Rules
   ========================================================================== */

/* Tablets and Small Desktops (max-width: 1080px) */
@media (max-width: 1080px) {
  .site-header {
    --header-height: 74px;
  }

  /* Switch 9-item nav to mobile drawer at <= 1080px */
  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .header-actions .btn-quote {
    display: inline-flex;
    padding: 0.5rem 0.95rem;
    font-size: 0.825rem;
  }

  .footer-grid,
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-media {
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
    min-height: auto;
    justify-content: flex-start;
  }

  .hero-image-wrapper img {
    height: 400px;
  }

  /* Trust Strip: Continuous Horizontal Train Marquee to save vertical space */
  .trust-strip {
    padding: 0.65rem 0;
  }

  .trust-container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .trust-train-wrapper {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
  }

  .trust-train-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: trustTrainScroll 26s linear infinite;
  }

  .trust-train-track:hover,
  .trust-train-track:active,
  .trust-train-track.is-paused {
    animation-play-state: paused;
  }

  .trust-train-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 1rem;
    width: auto;
    flex-shrink: 0;
  }

  .trust-train-clone {
    display: flex;
  }

  .trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
  }

  .trust-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.18);
  }

  .trust-icon svg {
    width: 15px;
    height: 15px;
  }

  .trust-label {
    font-size: 0.825rem;
    font-weight: 700;
  }

  .products-grid,
  .products-grid-4,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

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

  .setup-card.setup-featured {
    grid-column: span 2;
  }

  .cities-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

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

  .quote-form-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .conversion-box {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .conversion-guarantees {
    justify-content: center;
  }

  .local-areas-grid,
  .related-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets and Large Phones (max-width: 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 64px; /* Space for mobile sticky CTA bar */
  }

  .topbar {
    display: none; /* Hide topbar on mobile to save vertical space */
  }

  .site-header {
    --header-height: 68px;
  }

  .header-actions .btn-quote {
    display: none; /* Accessible in mobile drawer and bottom sticky bar */
  }

  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .hero-home {
    padding: 1.75rem 0 2rem 0;
    min-height: auto;
    background-image: 
      linear-gradient(180deg, 
        rgba(255, 255, 255, 0.97) 0%, 
        rgba(255, 255, 255, 0.94) 75%, 
        rgba(255, 255, 255, 0.90) 100%),
      url('../assets/images/hero.webp');
    background-size: cover;
    background-position: center 20%;
  }

  .hero-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
  }

  .hero-location-badge {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
  }

  .hero-badge-row .section-tag {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
  }

  .hero-h1 {
    font-size: clamp(1.75rem, 6.5vw, 2.15rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
  }

  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.15rem;
    color: var(--text-body);
  }

  .hero-cta-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    white-space: nowrap;
    border-radius: var(--radius-md);
  }

  .hero-cta-group .btn-whatsapp svg {
    width: 17px;
    height: 17px;
  }

  .hero-trust-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    flex-wrap: nowrap;
    margin-bottom: 0;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(10, 76, 149, 0.12);
    border-radius: var(--radius-md);
  }

  .hero-trust-pill {
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.3rem;
    color: var(--text-dark);
  }

  .hero-trust-pill svg {
    width: 13px;
    height: 13px;
  }

  /* Desktop-only secondary CTA blocks hidden on mobile to declutter hero */
  .hero-bulk-box,
  .hero-media {
    display: none;
  }

  .category-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-card-media {
    height: 220px;
  }

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

  .setup-card.setup-featured {
    grid-column: span 1;
  }

  .products-grid,
  .products-grid-4,
  .projects-grid,
  .cities-grid,
  .value-props-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .quote-form-card {
    padding: 1.5rem;
  }

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

  .local-areas-grid,
  .related-links-grid {
    grid-template-columns: 1fr;
  }

  /* On mobile with sticky dock active, hide the floating circular WhatsApp button to prevent clutter */
  .floating-whatsapp {
    display: none;
  }

  /* Show Mobile Sticky CTA Dock */
  .mobile-sticky-cta {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    box-sizing: border-box;
  }

  .footer-grid,
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom-links,
  .footer-legal-links {
    margin-right: 0;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding-right: 0;
    padding-bottom: 3.5rem; /* Clearance for sticky bottom mobile CTA dock */
  }
}

/* Small SmartPhones (max-width: 480px) */
@media (max-width: 480px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .container {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .hero-h1 {
    font-size: 1.75rem;
  }

  .hero-badge-row {
    margin-bottom: 1rem;
  }

  .hero-location-badge {
    font-size: 0.775rem;
    padding: 0.3rem 0.75rem;
  }

  .product-card-actions {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .faq-header {
    padding: 1rem 1.15rem;
    font-size: 0.95rem;
  }

  .faq-body {
    padding: 0 1.15rem 1.15rem 1.15rem;
  }

  /* Modal Mobile Optimization */
  .modal-overlay {
    padding: 0.75rem !important;
    align-items: center;
  }

  .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 1rem 1.15rem;
  }

  .modal-header h3 {
    font-size: 1.15rem;
  }

  .modal-body {
    padding: 1.25rem 0.85rem;
  }

  .modal-body .form-success-banner {
    padding: 1.5rem 0.85rem;
    box-sizing: border-box;
  }

  .modal-body .form-success-banner .form-success-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.65rem;
  }

  .modal-body .form-success-banner .form-success-icon svg {
    width: 24px;
    height: 24px;
  }

  .modal-body .form-success-banner .form-success-text h4 {
    font-size: 1.2rem;
  }

  .modal-body .form-success-banner .form-success-text p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  .modal-body .form-success-actions {
    width: 100%;
    max-width: 100%;
  }

  .modal-body .form-success-banner .btn {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.875rem;
    padding: 0.75rem 0.65rem;
  }
}

/* Ultra Small Screens (max-width: 360px) */
@media (max-width: 360px) {
  .site-logo img {
    height: 36px;
  }

  .hero-h1 {
    font-size: 1.55rem;
  }

  .hero-cta-group .btn {
    font-size: 0.775rem;
    padding: 0.65rem 0.35rem;
  }

  .hero-trust-bar {
    padding: 0.5rem 0.65rem;
  }

  .hero-trust-pill {
    font-size: 0.685rem;
  }

  .mobile-cta-btn {
    font-size: 0.65rem;
    padding: 0.45rem 0.2rem;
  }

  .mobile-cta-btn svg {
    width: 15px;
    height: 15px;
  }
}

/* ==========================================================================
   TRUST STRIP HORIZONTAL TRAIN ANIMATION
   ========================================================================== */
@keyframes trustTrainScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trust-train-track {
    animation: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 0 1rem;
    scrollbar-width: none;
  }
  .trust-train-track::-webkit-scrollbar {
    display: none;
  }
  .trust-train-clone {
    display: none;
  }
}
