/* =======================================================
   Officine Negro — brand override per GeneratePress + blocchi nativi
   Stessi token colore/tipografia della webapp gestionale
   ======================================================= */

:root {
    --on-brand: #1598cf;
    --on-brand-strong: #144391;
    --on-hero-start: #0f4c81;
    --on-hero-mid: #1476a6;
    --on-hero-end: #19a0c5;
    --on-text: #333333;
    --on-font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

/* Nasconde il titolo pagina automatico su tutte le pagine: ogni pagina ha
   il proprio banner con titolo incluso (hero foto in Home, banner colorato
   nelle altre), quindi il titolo generato dal tema sarebbe duplicato. */
.page .entry-header {
    display: none;
}

/* Dimensione corretta del logo in header (l'immagine originale e' 512x512px) */
.site-logo img {
    max-height: 46px;
    width: auto;
    height: auto;
}

/* Elimina lo spazio vuoto tra header e il banner/hero a piena larghezza di ogni pagina */
.page .site-main,
.page .entry-content,
.page .inside-article {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ---------- Tipografia ---------- */
body,
button,
input,
select,
textarea {
    font-family: var(--on-font) !important;
    color: var(--on-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--on-font) !important;
    font-weight: 800 !important;
    letter-spacing: 0.1px;
}

/* ---------- Link ---------- */
a {
    color: var(--on-brand-strong);
}

a:hover {
    color: var(--on-brand);
}

/* ---------- Pulsanti a pillola (blocco Bottoni nativo) ---------- */
.wp-block-button__link {
    font-family: var(--on-font) !important;
    font-weight: 700 !important;
    transition: transform 0.08s ease, background-color 0.2s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-1px);
}

/* ---------- Card servizi ---------- */
.on-card {
    background: #ffffff;
    border: 1px solid #dbe5ee;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 76, 129, 0.08);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

/* Solo nella riga delle 3 statistiche (Home, sotto "Chi siamo"): le card
   si allungano tutte alla stessa altezza e centrano il contenuto.
   Scoperto: applicare questo comportamento a .on-card ovunque rompeva
   il layout della pagina Contatti, che riusa la stessa classe .on-card
   per il box indirizzo e il box orari (non deve diventare una riga). */
.on-stats-row.wp-block-columns {
    align-items: stretch;
}

.on-stats-row > .wp-block-column {
    display: flex;
}

.on-stats-row .on-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Banner colorato in cima a Servizi/Contatti: definito qui (non nel
   contenuto della pagina) perche' lo stile in linea con il gradiente
   a volte viene perso al salvataggio in WordPress. */
.wp-block-group.on-hero {
    background: linear-gradient(135deg, var(--on-hero-start) 0%, var(--on-hero-mid) 55%, var(--on-hero-end) 100%);
}

/* ---------- Hero Home: slideshow fotografico a dissolvenza ---------- */
.on-hero-slideshow {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
}

.on-hero-slideshow__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.on-hero-slideshow__slide.is-active {
    opacity: 1;
}

.on-hero-slideshow__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.on-hero-slideshow__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.on-hero-slideshow__content h1,
.on-hero-slideshow__content p {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.on-hero-slideshow__eyebrow {
    display: inline-block;
    color: #bfe6f8;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.on-hero-slideshow__content h1 {
    color: #ffffff;
    font-size: 2.6rem;
    margin: 0 0 1rem;
}

.on-hero-slideshow__content p {
    color: #f0f6fb;
    font-size: 1.15rem;
    max-width: 640px;
    margin: 0 0 1.5rem;
}

.on-hero-slideshow__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.on-hero-slideshow__actions a {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.08s ease, background-color 0.2s ease;
}

.on-hero-slideshow__actions a:hover {
    transform: translateY(-1px);
}

.on-hero-slideshow__actions .is-solid {
    background: var(--on-brand);
    color: #ffffff !important;
}

.on-hero-slideshow__actions .is-solid:hover {
    background: var(--on-brand-strong);
}

.on-hero-slideshow__actions .is-outline {
    background: transparent;
    border: 1.5px solid #ffffff;
    color: #ffffff !important;
}

@media (max-width: 600px) {
    .on-hero-slideshow {
        min-height: 460px;
    }
    .on-hero-slideshow__content h1 {
        font-size: 1.9rem;
    }
}

.on-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(21, 152, 207, 0.18);
}

/* ---------- Striscia loghi partner: scala di grigi con colore all'hover ---------- */
.on-partner-logo img {
    filter: grayscale(1) opacity(0.6);
    transition: filter 0.2s ease;
}

.on-partner-logo img:hover {
    filter: grayscale(0) opacity(1);
}

/* ---------- Hero: leggibilita' testo su foto ---------- */
.on-hero h1,
.on-hero p {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* ---------- Callout centrato (Centro Revisioni) ---------- */
.on-callout {
    background: #f4f8fc;
    border: 1px solid #dbe5ee;
    border-radius: 14px;
}

/* ---------- Sezione scura (footer-like) ---------- */
.on-dark-section {
    background-color: #0f1720 !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.on-dark-section a {
    color: rgba(255, 255, 255, 0.85);
}

.on-dark-section a:hover {
    color: #ffffff;
}
