/* ══════════════════════════════════════════════════
   AUTOSCUOLA EXPRESS — responsive.css
   Breakpoints aggiuntivi e utility responsive
   ══════════════════════════════════════════════════ */

/* ── Print ─────────────────────────────────────── */
@media print {
  .navbar, .whatsapp-float, .cookie-banner, .footer { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* ── Landscape mobile ───────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 5rem 0 3rem; }
  section { padding: 2.5rem 0; }
}

/* ── Tablet portrait (≤ 900px) ──────────────────── */
@media (max-width: 900px) {
  .hero__inner       { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .hero__cta         { justify-content: center; }
  .hero__badges      { justify-content: center; }
  .hero__float-card--1 { right: 5%; }
  .hero__float-card--2 { left: 5%; }
  .perche-noi__grid  { grid-template-columns: 1fr; }
  .perche-noi__badge-float { left: 5%; bottom: -10px; }
  .stats__grid       { grid-template-columns: repeat(2,1fr); }
  .servizi__grid     { grid-template-columns: repeat(2,1fr); }
  .patenti__grid     { grid-template-columns: repeat(2,1fr); }
  .testi__grid       { grid-template-columns: repeat(2,1fr); }
  .blog__grid        { grid-template-columns: repeat(2,1fr); }
  .footer__grid      { grid-template-columns: repeat(2,1fr); gap: 2rem; }
}

/* ── Mobile (≤ 768px) ───────────────────────────── */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; width: 100%; }
  h1 { font-size: 2.2rem !important; }
  h2 { font-size: 1.8rem !important; }

  /* Correzione dimensioni sezione Hero e background su mobile */
  .hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 3rem;
  }
  .hero__inner { padding-top: 1rem; gap: 2rem; }
  .hero__float-card { display: none; } /* Hide float cards on small mobiles to avoid clutter/overflow */

  /* Correzione dimensione immagine Perché Sceglierci su mobile */
  .perche-noi__img-wrap img {
    height: auto;
    max-height: 280px;
    object-position: top center;
  }

  .stats__grid       { grid-template-columns: 1fr; }
  .servizi__grid     { grid-template-columns: 1fr; }
  .patenti__grid     { grid-template-columns: 1fr; }
  .testi__grid       { grid-template-columns: 1fr; }
  .blog__grid        { grid-template-columns: 1fr; }
  .footer__grid      { grid-template-columns: 1fr; text-align: center; }
  .perche-noi__item  { flex-direction: column; align-items: center; text-align: center; }
}

/* ── Grandi schermi (≥ 1400px) ──────────────────── */
@media (min-width: 1400px) {
  .container { max-width: 1320px; }
  h1 { font-size: 4rem; }
}

/* ── Focus accessibilità ────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Utility display ────────────────────────────── */
.hide-mobile  { display: block; }
.show-mobile  { display: none; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block !important; }
}

/* ── Scrollbar personalizzata ───────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ── Selezione testo ────────────────────────────── */
::selection {
  background: var(--primary);
  color: white;
}