/* ═══════════════════════════════════════════════════════════════
   WRC — Mobile-first baseline (sito principale + sottodomini)
   Sorgente unica. Caricato da inc/template.php e accodato da
   tools/extract_chrome_css.py a assets/wrc-chrome.css (hotels, travel).
   Regole generiche e prudenti: i base-style sono per smartphone, le
   estensioni desktop stanno in min-width / (hover:hover).
   ═══════════════════════════════════════════════════════════════ */

/* ── Base ── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { overflow-x: clip; -webkit-tap-highlight-color: transparent; }
img, video, canvas, iframe, svg:not([width]) { max-width: 100%; }
img, video { height: auto; }
iframe { border: 0; }
table { max-width: 100%; }
@media (max-width: 767px) {
  table:not([class*="leaflet"]) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
p, li, h1, h2, h3, h4, a { overflow-wrap: break-word; }
pre, code { overflow-x: auto; max-width: 100%; }

/* ── Header fisso: area sicura (notch) e menu a tutta altezza reale ── */
.topbar { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
.topbar-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.menu-panel { height: 100dvh; max-height: 100dvh; padding-bottom: max(20px, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.hamburger, .topbar-search-toggle, .menu-close { min-width: 44px; min-height: 44px; }

/* ── Tocco: bersagli ≥ 44px, niente zoom iOS sui campi ── */
a.wrc-btn, .wrc-btn, button, [role="button"], input[type="submit"], .mb, .lp-btn, .section-nav a { min-height: 44px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; max-width: 100%; }
.wrc-footer-column a, .wrc-footer-policies a, .menu-footer-links a { display: inline-block; padding-block: 6px; }

/* ── Footer: colonne impilate su mobile ── */
.wrc-footer-container { gap: 32px; }
.wrc-footer-columns { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 48px; width: 100%; }
.wrc-footer-logos { justify-content: center; }
.wrc-footer-policies { text-align: center; line-height: 2; }
@media (min-width: 900px) { .wrc-footer-columns { gap: 24px 64px; } }

/* ── Griglie contenuto: 1 colonna → 2 → 3 ── */
.wrc-grid, .wrc-services { grid-template-columns: 1fr; }
@media (min-width: 640px) { .wrc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .wrc-grid, .wrc-services { grid-template-columns: repeat(3, 1fr); } }
.wrc-card { aspect-ratio: 4 / 3; }

/* ── Hero: padding e titoli fluidi pensati per schermo piccolo ── */
.wrc-hero__inner { grid-template-columns: 1fr; padding-inline: 16px; }
@media (min-width: 900px) { .wrc-hero__inner { grid-template-columns: 1fr auto; } }
.wrc-hero__cta, .lp-btn, .mb { width: 100%; }
@media (min-width: 640px) { .wrc-hero__cta, .lp-btn, .mb { width: auto; } }
.wrc-weather { width: 100%; }
@media (min-width: 900px) { .wrc-weather { width: auto; } }

/* ── Colonne a blocchi (articoli): impilate finché non c'è spazio ── */
@media (max-width: 781px) {
  .wrc-columns { flex-wrap: wrap !important; }
  .wrc-columns:not(.wrc-is-not-stacked-on-mobile) > .wrc-column { flex-basis: 100% !important; }
  .wrc-media-text.wrc-is-stacked-on-mobile { grid-template-columns: 100% !important; }
}

/* ── Mappe e embed ── */
.leaflet-container, [id*="map"] iframe, iframe[src*="google.com/maps"] { max-width: 100%; }
@media (max-width: 640px) { iframe[src*="google.com/maps"] { min-height: 280px; } }

/* ── Hover solo dove esiste (niente "hover appiccicoso" sul touch) ── */
@media (hover: none) {
  .wrc-card:hover, .wrc-btn:hover, .wrc-service:hover, .block:hover, .wrc-weather:hover,
  .wrc-hero__cta:hover, .mb:hover, .lp-btn:hover { transform: none; }
  .wrc-card:hover .wrc-card__img { transform: none; }
}

/* ── Movimento ridotto ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
