/* Toscana Noleggi — vetrina statica. Palette reale del brand (dal CSS del
   sito originale): navy #223A5E primario, giallo #DDC600 accento. */

:root {
  --navy: #223a5e;
  --navy-dark: #182a44;
  --yellow: #ddc600;
  --yellow-dark: #c4b000;
  --ink: #1f2430;
  --muted: #5b6472;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --border: #e2e6ec;
  --radius: 6px;
  --max-width: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--yellow-dark); }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4, h5, h6 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--muted); }

/* Nel tema originale TUTTI i bottoni (.tt_button) sono arrotondati a
   pillola: regola globale via Customizer, border-radius: 30px — non 0 come
   il default statico del tema, quello viene sempre sovrascritto. */
.btn {
  display: inline-block;
  padding: .7em 1.6em;
  border-radius: 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .85rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--yellow); color: var(--navy-dark); }
.btn-primary:hover { background: var(--yellow-dark); color: var(--navy-dark); }
/* Bottone navy — usato dove il primary giallo sparirebbe su sfondo giallo
   (es. il banner "Ti serve aiuto..." in home, confermato blu/navy
   sull'originale, non giallo). */
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--bg); color: var(--bg); }
.btn-outline:hover { background: rgba(255,255,255,.15); color: var(--bg); }

/* Header — bianco con testo scuro nel sito reale (non navy: .navbar-shrink
   .menubar {background:#FFFFFF}, link a colore #1a1a1a, navy solo su
   hover/attivo — .navbar-nav .active>a {color:#223A5E}), niente
   transparent-navigation applicata sul body. */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; }
.logo img { display: block; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { color: #6d6d6d; padding: 10px 12px; border-radius: var(--radius); font-size: .95rem; font-weight: 700; }
.main-nav a:hover, .main-nav a.active { background: var(--bg-alt); color: var(--navy); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .header-inner { flex-wrap: wrap; }
}

/* Hero */
.hero {
  /* Immagine reale della sezione (.riga-cerca nel sito originale, non
     sede.jpg): s1.jpg, con padding: 300px 0 nel CSS del tema — quasi a
     piena pagina, non una banda sottile. */
  background-image: linear-gradient(180deg, rgba(24,42,68,.72), rgba(24,42,68,.85)), url("/assets/img/s1.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 260px 0;
  text-align: center;
}
.hero h1, .hero h2 { color: #fff; }
.hero p { color: #dbe2ee; max-width: 640px; margin-left: auto; margin-right: auto; }
@media (max-width: 700px) { .hero { padding: 140px 0; } }
/* Il campo di ricerca originale (plugin Ajax Search Lite) è un'unica
   pillola bianca con la lente d'ingrandimento integrata a destra, non un
   input + bottone "Cerca" separati. */
.search-box { position: relative; max-width: 560px; margin: 28px auto 0; }
.search-box input {
  width: 100%; padding: .9em 3.2em .9em 1.4em; border-radius: 999px; border: none; font-size: 1rem;
}
.search-box button {
  position: absolute; top: 0; right: 0; bottom: 0; width: 54px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--navy); cursor: pointer;
}
.hero-links { margin-top: 18px; }
.hero-links strong { color: #fff; }

/* Page header (pagine interne senza hero grande) */
.page-header { background: var(--navy); color: #fff; padding: 48px 0; text-align: center; }
.page-header h1 { color: #fff; margin-bottom: .3em; }
.page-header p { color: #cfd8e6; max-width: 700px; margin: 0 auto; }

/* Header di catalogo/categoria/prodotto — grigio chiaro nell'originale
   (.entry-header/.blog-header {background-color:#f5f5f5}), allineato a
   sinistra, con breadcrumb (non navy come .page-header, quello è solo per
   le pagine "single-page" tipo /noleggio/, /vendita/ ecc. che hanno
   davvero style="background-color:#223A5E" inline). */
.archive-header { background: #f5f5f5; padding: 56px 0 40px; }
.archive-header h1 { margin-bottom: .3em; }
.archive-header .breadcrumb-trail { font-size: .85rem; color: var(--muted); margin: 0; }
.archive-header .breadcrumb-trail a { color: var(--muted); text-decoration: underline; }

/* Sezioni generiche */
section { padding: 48px 0; }
section.alt { background: var(--bg-alt); }
/* Sezione "Toscana Noleggi" in home: sfondo navy nell'originale
   (.vc_custom_1666947423555/...372109 {background-color:#223a5e}), testo
   bianco (classe "testobianco"). */
section.navy-section { background: var(--navy); }
section.navy-section h2, section.navy-section h3 { color: #fff; }
section.navy-section p { color: #cfd8e6; }
.section-intro { max-width: 760px; }
.section-intro.center { margin: 0 auto; text-align: center; }

/* Griglie */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Card generiche (settori, servizi) */
/* Nel sito originale ogni card ha un'illustrazione a colori come sfondo
   (.cb-container.with-bg-img {background-size:cover}, non solo testo su
   bianco) e un effetto di sollevamento (ombra) al passaggio del mouse
   (.cb-container:hover {box-shadow: 0 44px 98px rgba(0,0,0,.12)}). */
.info-card {
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  border-radius: 7px;
  padding: 30px 24px 0;
  min-height: 320px;
  transition: box-shadow .2s, transform .2s;
}
.info-card:hover { box-shadow: 0 30px 60px rgba(0,0,0,.15); transform: translateY(-2px); }
.info-card h4 { margin-bottom: .4em; }
.info-card ul { margin: 0; padding-left: 1.1em; color: var(--ink); }
.info-card ul li { margin-bottom: .3em; }

/* Categoria (griglia su /noleggio/) */
.category-card {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  color: #fff; display: flex; align-items: flex-end;
}
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,42,68,0) 40%, rgba(24,42,68,.85)); z-index: 1; }
.category-card .cc-label { position: relative; z-index: 2; padding: 16px; width: 100%; }
.category-card h3 { color: #fff; margin: 0; font-size: 1.1rem; }
.category-card span { color: var(--yellow); font-size: .85rem; font-weight: 600; }

/* Prodotto card (catalogo, categoria) */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .product-grid { grid-template-columns: 1fr; } }
.product-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: 0 6px 18px rgba(34,58,94,.15); transform: translateY(-2px); }
.product-card img { aspect-ratio: 1/1; object-fit: cover; width: 100%; background: var(--bg-alt); }
.product-card-body { padding: 12px 14px 4px; }
.product-card-datasheet {
  display: block; margin: 10px 14px 14px; padding: .5em 1em; text-align: center;
  background: var(--yellow); color: #fff; border-radius: 30px;
  font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em;
}
.product-card-datasheet:hover { background: var(--yellow-dark); color: #fff; }
.product-cat { font-size: .75rem; color: var(--yellow-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.product-card h3 { font-size: .95rem; margin: .3em 0 0; }

/* Scheda prodotto singola */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin-bottom: 2.5em; }
@media (max-width: 800px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail img { border-radius: var(--radius); border: 1px solid var(--border); }

/* Galleria: fino a 2 immagini per prodotto nell'originale — miniature
   cliccabili sotto la foto principale (gestite da main.js). */
.product-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.product-thumb { width: 72px; height: 72px; object-fit: cover; cursor: pointer; opacity: .6; border: 2px solid transparent; }
.product-thumb:hover { opacity: .9; }
.product-thumb.active { opacity: 1; border-color: var(--navy); }

/* "Informazioni aggiuntive" (attributi WooCommerce) — sezione a parte sotto
   la scheda, la descrizione resta sempre accanto all'immagine. */
.product-additional { border-top: 1px solid var(--border); padding-top: 2em; }
.product-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.5em; }
.product-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.product-detail .breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1em; }
.product-detail .breadcrumb a { color: var(--muted); text-decoration: underline; }
.spec-table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .92rem; }
.spec-table th, .spec-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--navy); font-weight: 600; width: 55%; }
.spec-table td { color: var(--muted); }
.product-description p { margin-bottom: 1em; }

/* Filtro catalogo */
.catalog-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; align-items: center; }
.catalog-toolbar input[type=search] {
  flex: 1; min-width: 220px; padding: .7em 1em; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem;
}
.catalog-toolbar select { padding: .7em 1em; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; }
.catalog-count { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.no-results { display: none; text-align: center; padding: 40px 0; color: var(--muted); }

/* Filtri a sfaccettature nella pagina categoria (plugin WooCommerce AJAX
   Filters nell'originale — qui ricostruiti in puro JS lato client). */
.category-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
@media (max-width: 800px) { .category-layout { grid-template-columns: 1fr; } }
.category-filters { display: flex; flex-direction: column; gap: 24px; }
.filter-group h4 { font-size: 1rem; margin-bottom: .6em; }
.filter-check { display: block; font-size: .92rem; color: var(--ink); padding: .35em 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.filter-check input { margin-right: 8px; }

/* CTA banda gialla/navy */
.cta-band { background: var(--navy-dark); color: #fff; text-align: center; }
.cta-band h4 { color: #fff; max-width: 700px; margin: 0 auto .4em; }
.cta-band p { color: #cfd8e6; max-width: 620px; margin: 0 auto 1.2em; }

/* Banner giallo in home ("Ti serve aiuto...") — sfondo reale
   .vc_custom_1666948048031 {background-image: url(Raggruppa-248.png)},
   una foto virata in giallo, non un colore piatto. */
.cta-yellow-band {
  background-image: linear-gradient(rgba(221,198,0,.35), rgba(221,198,0,.35)), url("/assets/img/Raggruppa-248.png");
  background-size: cover;
  background-position: center;
  text-align: center;
}
.cta-yellow-band h4 { max-width: 720px; margin: 0 auto .5em; }
.cta-yellow-band p { max-width: 640px; margin: 0 auto 1.2em; color: var(--ink); }

/* Sedi */
.sedi-section { background: var(--bg-alt); }
.sedi-section h4 { text-align: center; }
.sedi-intro { max-width: 760px; margin: 0 auto 24px; text-align: center; }
.sedi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 800px) { .sedi-grid { grid-template-columns: 1fr; } }
.sede-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sede-card h5 { color: var(--navy); margin-bottom: .5em; font-size: .95rem; letter-spacing: .02em; }
.sede-card p { margin-bottom: .3em; font-size: .95rem; }

/* Partner brand */
.partner-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: center; }
.partner-grid img { max-height: 60px; width: auto; filter: grayscale(1); opacity: .75; transition: opacity .15s, filter .15s; }
.partner-grid img:hover { filter: none; opacity: 1; }

/* Form contatti */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }
form.contact-form { display: grid; gap: 14px; }
form.contact-form label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .3em; }
form.contact-form input, form.contact-form textarea {
  width: 100%; padding: .7em 1em; border: 1px solid var(--border); border-radius: var(--radius); font: inherit;
}
form.contact-form textarea { min-height: 140px; resize: vertical; }
.direct-contact { background: var(--bg-alt); border-radius: var(--radius); padding: 24px; }
.direct-contact a { font-weight: 600; }

/* Esito invio form (contatti + newsletter), popolato da main.js leggendo
   ?inviato=1 / ?errore=1 nella query string dopo il redirect del
   contact-mailer (stesso schema per entrambi i form, vedi README/contact-mailer). */
.form-alert:empty { display: none; }
.alert { padding: .8em 1.1em; border-radius: var(--radius); margin-bottom: 1em; font-size: .95rem; }
.alert-success { background: #e5f6ea; color: #1c6b31; border: 1px solid #b7e3c2; }
.alert-danger { background: #fdeceb; color: #a3271b; border: 1px solid #f3c1bc; }

/* Honeypot antispam (campo "website"): must-look-fillable per un bot ma
   invisibile/non raggiungibile da tastiera per una persona vera — niente
   display:none, i bot più furbi lo controllano. */
.form-field-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Form newsletter (sezione CTA in home e /corsi-di-formazione/) — stessi
   campi del form originale WooCommerce/Contact Form 7 (Nome+Email,
   Azienda+Telefono, accettazione privacy, poi il captcha), stesso backend
   e stesso meccanismo antispam del form /contatti/ qui sotto. Sfondo grigio
   scuro (#e2e2e2, valore esatto preso dal CSS custom dell'originale) e
   campi a pillola senza label visibile (solo placeholder, come CF7
   sull'originale) invece dello stile "label sopra + bordo" di .contact-form. */
.newsletter-section { background: #e2e2e2; }
.newsletter-form { max-width: 700px; margin: 24px auto 0; text-align: left; display: grid; gap: 16px; }
.newsletter-form .form-row-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .newsletter-form .form-row-pair { grid-template-columns: 1fr; } }
.newsletter-form input[type="text"], .newsletter-form input[type="email"], .newsletter-form input[type="tel"] {
  width: 100%; padding: .9em 1.4em; border: none; border-radius: 30px; background: #f7f7f7; color: var(--navy); font: inherit;
}
.newsletter-form input[type="text"]::placeholder, .newsletter-form input[type="email"]::placeholder,
.newsletter-form input[type="tel"]::placeholder { color: var(--navy); opacity: .85; }
.newsletter-form .form-field-checkbox { font-size: .95rem; }
.newsletter-form .form-field-checkbox label { font-weight: 400; display: flex; align-items: flex-start; gap: .6em; }
.newsletter-form .form-field-checkbox input[type="checkbox"] { margin-top: .3em; }
/* Il captcha "somma di due numeri" non c'è nell'originale (che usa un
   plugin diverso, icona da selezionare) — stile coerente con i campi a
   pillola qui sopra ma con la label visibile, serve contesto alla domanda. */
.newsletter-form .form-field-captcha label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .4em; color: var(--navy); }
.newsletter-form .form-field-captcha input[type="number"] {
  width: 140px; padding: .7em 1.2em; border: none; border-radius: 30px; background: #f7f7f7; color: var(--navy); font: inherit;
}
.newsletter-submit { width: 100%; text-align: center; }
.newsletter-section .form-alert { max-width: 700px; margin: 0 auto 1em; }

/* Footer */
.site-footer { margin-top: 40px; }
/* Due bande distinte, come nell'originale: sopra navy (.upper-footer),
   sotto chiara con testo nero (.lower-footer, .lower-footer a
   {color:#000000 !important}) — non un'unica banda navy come avevo fatto
   prima. */
.footer-upper { background: var(--navy); color: #cfd8e6; padding: 44px 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-upper h6 { color: #fff; font-size: .95rem; margin-bottom: .8em; }
.footer-upper p { color: #cfd8e6; margin-bottom: .3em; }
.footer-upper a { color: #cfd8e6; }
.footer-upper a:hover { color: var(--yellow); }
.footer-upper svg { fill: #fff; }
.footer-upper a:hover svg { fill: var(--yellow); }
.footer-lower { background: #fff; }
.copyright { padding: 16px 20px; text-align: center; font-size: .82rem; color: #000; }
.copyright a { color: #000; text-decoration: underline; }

/* Notice banner (contesto sito vetrina/temporaneo) */
.showcase-notice {
  background: var(--yellow);
  color: var(--navy-dark);
  text-align: center;
  font-size: .85rem;
  padding: 6px 12px;
}
.showcase-notice a { color: var(--navy-dark); text-decoration: underline; }
