/* =========================================
   VR81 — Responsive (Tablet & Mobile)
   ========================================= */

/* --- Desktop stretto: nasconde il bottone secondario Area TM --- */
@media (max-width: 1250px) {
  .header-tm { display: none; }
}

/* --- Tablet (max 1024px) --- */
@media (max-width: 1024px) {
  :root { --section-pad: 80px; }

  .squadre-grid { grid-template-columns: repeat(2, 1fr); }
  .squadre-grid .squadra-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid .news-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

/* --- Mobile Large (max 768px) --- */
@media (max-width: 768px) {
  :root {
    --section-pad: 60px;
    --header-height: 60px;
  }

  /* Header */
  .main-nav { display: none; }
  .header-cta { display: none; }
  .header-tm { display: none; }
  .hamburger { display: block; }
  .logo-text { display: none; }
  .logo-omino { height: 30px; }

  /* Hero */
  .hero-title { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .hero-subtitle { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: center; gap: 12px; }
  .hero-actions .btn { width: 100%; max-width: 300px; }
  .hero-scroll { display: none; }

  /* Match Center → stacked */
  .match-layout {
    grid-template-columns: 1fr;
  }
  .match-filters {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .filter-btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  .match-card { padding: 20px; }
  .match-classifica { order: -1; }

  /* Squads → single column */
  .squadre-grid {
    grid-template-columns: 1fr;
  }
  .squadre-grid .squadra-card:last-child {
    max-width: 100%;
    grid-column: auto;
  }
  .squadra-img { height: 160px; }

  /* News → single column with horizontal scroll */
  .news-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }
  .news-grid::-webkit-scrollbar { display: none; }
  .news-card {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }
  .news-grid .news-card:last-child { max-width: 85%; }

  /* CTA */
  .cta-box { padding: 40px 20px; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  /* Mobile CTA */
  .mobile-cta { display: flex; }
  body { padding-bottom: 64px; }
}

/* --- Mobile Small (max 480px) --- */
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-badge { font-size: 0.7rem; }

  .match-score .score { font-size: 1.6rem; }
  .match-team { min-width: 55px; }
  .team-logo-placeholder { width: 40px; height: 40px; font-size: 0.8rem; }
  .team-name { font-size: 0.7rem; }

  .squadra-body { padding: 16px; }
  .section-title { font-size: 1.6rem; }
  .section-desc { font-size: 0.9rem; }

  .news-card { flex: 0 0 90%; }

  .cta-title { font-size: 1.4rem; }
  .cta-desc { font-size: 0.95rem; }
}

/* --- Sponsor page --- */
@media (max-width: 1024px) {
  .sponsor-page-grid { grid-template-columns: repeat(2, 1fr); }
  .join-box { padding: 40px 28px; }
}

@media (max-width: 640px) {
  .sponsor-page-grid { grid-template-columns: 1fr; }
  .join-form { grid-template-columns: 1fr; }
  .join-title { font-size: 1.5rem; }
}

@media (max-width: 768px) {
  .lightbox { padding: 16px; }
  .lightbox-photo { max-height: 60vh; }
  .lightbox-nav { font-size: 1.4rem; padding: 10px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 8px; right: 12px; }
  .lightbox-dl { font-size: 0.8rem; padding: 7px 12px; }
  .lightbox-album-detail { padding: 0.6rem; }
}
