/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY BASE */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================================================
   HEADER
   Il colore di brand arriva da header.php tramite la custom
   property --site-brand impostata sull'elemento <header>, cosi'
   ogni sito del network (MCTV / Il Barese / CalcioBarese) puo'
   avere una propria identita' visiva pur condividendo lo stesso
   markup e lo stesso CSS. Se la variabile non e' definita si
   ricade su un blu di sistema.
   =========================================================== */
.site-header {
    --brand: var(--site-brand, #2352d9);

    background: #fff;
    border-bottom: 1px solid #e8e8ec;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    margin-bottom: 40px;
    padding: 22px 0;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-header__identity {
    min-width: max-content;
}

.site-header__brand {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    color: #14161a;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: normal;
    padding: 5px;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.site-header__brand::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-right: 10px;
    border-radius: 3px;
    background: var(--brand);
    flex: none;
}

.site-header__brand:hover {
    color: var(--brand);
}

.site-header__tagline {
    display: none;
    margin-top: 2px;
    padding-left: 25px;
    font-size: 0.85rem;
    color: #6b7280;
}

@media (min-width: 640px) {
    .site-header__tagline {
        display: block;
    }
}

.site-header__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.site-header__nav-link {
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.site-header__nav-link:hover {
    background: #f3f4f6;
    color: #14161a;
}

.site-header__nav-link.is-current {
    background: color-mix(in srgb, var(--brand) 12%, white);
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 25%, white);
}

.site-header__brand:focus-visible,
.site-header__nav-link:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}


/* MAIN */
main {
    min-height: calc(100vh - 280px);
    padding-bottom: 60px;
}

/* FOOTER */
footer {
    background: #fff;
    border-top: 1px solid #e8e8ec;
    padding: 24px 0;
    margin-top: 60px;
    text-align: center;
}

footer p {
    color: #6b7280;
    font-size: 0.9rem;
    text-decoration: none;
}


/* RESPONSIVE HEADER */
@media (max-width: 768px) {
    .site-header {
        padding: 18px 0;
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .site-header__brand {
        font-size: 1.5rem;
    }

    .site-header__nav {
        justify-content: flex-start;
        width: 100%;
        gap: 8px;
    }

    .site-header__nav-link {
        flex: none;
        padding: 7px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .site-header__nav {
        gap: 6px;
    }

    .site-header__nav-link {
        padding: 6px 12px;
    }
}