/*
 * Pubblico — allineato al tema chiaro del sito mirrorato (GeneratePress / WordPress).
 * Palette da ktec.digital: bianco, testo #3a3a3a, accento #1e73be.
 */
:root {
    --gp-contrast: #222;
    --gp-contrast-2: #575760;
    --gp-contrast-3: #b2b2be;
    --gp-base: #f0f0f0;
    --gp-base-2: #f7f8f9;
    --gp-base-3: #fff;
    --gp-accent: #1e73be;
    --gp-text: #3a3a3a;
    --gp-max: 1100px;
    --gp-font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --gp-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --gp-radius: 2px;
    --gp-border: #ddd;
    --gp-surface: #fff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.site {
    margin: 0;
    font-family: var(--gp-font);
    font-size: 17px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--gp-text);
    background-color: var(--gp-base-3);
    -webkit-font-smoothing: antialiased;
}

.sheet {
    max-width: var(--gp-max);
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

@media (max-width: 600px) {
    .sheet {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: 0.75rem 1rem;
    background: var(--gp-accent);
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Top bar (come “top-bar” GeneratePress) */
.site-topbar {
    background: var(--gp-base);
    color: var(--gp-contrast-2);
    font-size: 13px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-topbar__inner {
    padding-top: 10px;
    padding-bottom: 10px;
}
.site-topbar__text {
    display: block;
}

/* Header */
.site-header {
    background: var(--gp-base-3);
    box-shadow: var(--gp-shadow);
    position: relative;
}
.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}
.site-header__accent {
    height: 4px;
    background: linear-gradient(90deg, var(--gp-accent), #3d9ae8);
    width: 100%;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--gp-contrast);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}
.site-logo__mark {
    width: 40px;
    height: 40px;
    border-radius: var(--gp-radius);
    background: linear-gradient(145deg, var(--gp-accent), #155d99);
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.site-logo__img {
    display: block;
    height: 44px;
    width: auto;
    max-width: min(280px, 70vw);
    object-fit: contain;
}
.site-logo__accent {
    color: var(--gp-accent);
    font-weight: 800;
}

/* Nav */
.site-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}
.site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 1.35rem;
}
.site-nav__sub {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-top: 0.4rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--gp-base);
}
.site-nav__item {
    position: relative;
}
.site-nav__link {
    color: var(--gp-contrast-2);
    text-decoration: none;
    font-size: 15px;
    padding: 0.35rem 0;
    display: inline-block;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav__link:hover,
.site-nav__link:focus-visible {
    color: var(--gp-accent);
    border-bottom-color: rgba(30, 115, 190, 0.35);
    outline: none;
}

.site-nav__toggle {
    font: inherit;
    cursor: pointer;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--gp-base);
    border-radius: var(--gp-radius);
    background: var(--gp-base-2);
    color: var(--gp-contrast);
}
.site-nav__toggle:focus-visible {
    outline: 2px solid var(--gp-accent);
    outline-offset: 2px;
}

@media (max-width: 782px) {
    .site-nav__toggle:not([hidden]) {
        display: block;
    }
    .site-nav {
        flex: 1 1 100%;
        display: none;
        justify-content: flex-start;
    }
    .site-nav.site-nav--open {
        display: block;
    }
    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .site-nav__link {
        padding: 0.65rem 0;
        border-bottom: 1px solid var(--gp-base);
    }
}

@media (min-width: 783px) {
    .site-nav__toggle {
        display: none !important;
    }
}

/* Main content */
.site-main {
    min-height: 52vh;
    padding-top: 2.25rem;
    padding-bottom: 3rem;
    background: linear-gradient(180deg, var(--gp-base-2) 0%, var(--gp-base-3) 140px);
}
.site-content {
    background: var(--gp-base-3);
    padding: 2rem 2.25rem 2.5rem;
    border-radius: 4px;
    box-shadow: var(--gp-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
@media (max-width: 600px) {
    .site-content {
        padding: 1.5rem 1.25rem 2rem;
    }
}

/* Tipografia contenuti (compatibile con HTML da editor / ex-WordPress) */
.entry-content.prose {
    max-width: 100%;
}
.prose .lead {
    font-size: 1.15rem;
    color: var(--gp-contrast-2);
    margin-top: 0;
}
.prose > *:first-child {
    margin-top: 0;
}
.prose h1 {
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    line-height: 1.2;
    font-weight: 600;
    color: var(--gp-contrast);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}
.prose h2 {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--gp-contrast);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--gp-base);
}
.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gp-contrast);
    margin: 1.5rem 0 0.5rem;
}
.prose p {
    margin: 0 0 1.5em;
}
.prose a {
    color: var(--gp-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.prose a:hover {
    color: var(--gp-contrast);
}
.prose ul,
.prose ol {
    margin: 0 0 1.5em 1.25em;
    padding: 0;
}
.prose li {
    margin-bottom: 0.35em;
}
.prose blockquote {
    margin: 1.5em 0;
    padding: 0.5rem 0 0.5rem 1.25rem;
    border-left: 4px solid var(--gp-accent);
    background: var(--gp-base-2);
    color: var(--gp-contrast-2);
}
.prose img,
.prose video {
    max-width: 100%;
    height: auto;
    border-radius: var(--gp-radius);
}
.prose figure {
    margin: 1.5em 0;
}
.prose figcaption {
    font-size: 0.9rem;
    color: var(--gp-contrast-3);
    margin-top: 0.5em;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
}
.prose th,
.prose td {
    border: 1px solid var(--gp-base);
    padding: 0.65rem 0.85rem;
    text-align: left;
}
.prose th {
    background: var(--gp-base-2);
    font-weight: 600;
}
.prose hr {
    border: 0;
    border-top: 1px solid var(--gp-base);
    margin: 2rem 0;
}

/* Pulsanti tipo WordPress */
.button,
.prose a.button {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: var(--gp-radius);
    border: 2px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button--primary,
.prose a.button--primary {
    background: var(--gp-accent);
    color: #fff !important;
    border-color: var(--gp-accent);
}
.button--primary:hover,
.prose a.button--primary:hover {
    background: #155d99;
    border-color: #155d99;
    color: #fff !important;
}

/* Footer */
.site-footer {
    margin-top: 0;
    background: var(--gp-contrast);
    color: rgba(255, 255, 255, 0.88);
}
.site-footer__widgets {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem 3rem;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
}
@media (max-width: 700px) {
    .site-footer__widgets {
        grid-template-columns: 1fr;
    }
}
.site-footer__brand {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}
.site-footer__muted {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.72);
}
.site-footer__label {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
}
.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer__links a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
}
.site-footer__links a:hover {
    color: #fff;
    text-decoration: underline;
}
.site-footer__links--stack {
    margin-bottom: 0.75rem;
}
.site-footer__label--sub {
    margin-top: 0.75rem;
}
.site-footer__links--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.site-footer__bar {
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
}
.site-footer__bar-inner {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.site-main--404 .entry-content h1 {
    color: var(--gp-contrast);
}

/* Home: carousel immagini (URL da Impostazioni sito) */
.home-carousel {
    margin: 0 0 1.5rem;
    border: 1px solid var(--gp-border);
    border-radius: 2px;
    background: var(--gp-surface);
    overflow: hidden;
    position: relative;
}
.home-carousel__track {
    position: relative;
    width: 100%;
    min-height: 220px;
}
.home-carousel__slide {
    margin: 0;
    min-height: 220px;
    max-height: min(52vh, 420px);
    background: #f0f0f0;
}
.home-carousel.is-ready .home-carousel__track {
    min-height: min(52vh, 420px);
}
.home-carousel.is-ready .home-carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 520ms ease;
}
.home-carousel.is-ready .home-carousel__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}
.home-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: min(52vh, 420px);
    object-fit: cover;
}
.home-carousel__slide:first-child {
    display: block;
}
.home-carousel.is-ready .home-carousel__slide:first-child {
    display: block;
}
.home-carousel:not(.is-ready) .home-carousel__slide + .home-carousel__slide {
    display: none;
}
@media (min-width: 701px) {
    .site-footer__widgets {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}
