﻿/* ── Base ── */
.bando-hero {
    background: #00325D;
    padding: 2.5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

    .bando-hero::after {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 50% 100% at 100% 50%, rgba(163,197,233,.1) 0%, transparent 65%);
        pointer-events: none;
    }

    .bando-hero h1 {
        font-family: 'Cormorant Garamond', serif;
        font-size: clamp(1.5rem, 5vw, 2.8rem);
        font-weight: 300;
        color: #fff;
        line-height: 1.2;
    }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(163,197,233,.13);
    border: 1px solid rgba(163,197,233,.32);
    border-radius: 100px;
    padding: .3rem 1rem;
    font-size: .7rem;
    color: #A3C5E9;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.stato-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 100px;
    padding: .3rem .9rem;
    font-size: .78rem;
    font-weight: 600;
}

.stato-aperto {
    background: rgba(163,197,233,.16);
    border: 1px solid rgba(163,197,233,.4);
    color: #A3C5E9;
}

.stato-scaduto {
    background: rgba(202,17,20,.16);
    border: 1px solid rgba(202,17,20,.4);
    color: #ff8899;
}

/* Meta chips — si wrappano su mobile */
.meta-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.2rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 4px;
    padding: .35rem .8rem;
    font-size: .8rem;
    color: rgba(255,255,255,.88);
    white-space: nowrap;
}

    .meta-chip i {
        color: #A3C5E9;
        font-size: .75rem;
    }

.deadline-bar-wrap {
    background: rgba(255,255,255,.06);
    border-radius: 4px;
    height: 6px;
    margin-top: .4rem;
    overflow: hidden;
}

.deadline-bar {
    background: #A3C5E9;
    height: 100%;
    border-radius: 4px;
}

/* ── Sidebar mobile: appare PRIMA del contenuto su mobile ── */
.bando-sidebar-mobile {
    display: none;
}

/* Banner scadenza compatto per mobile */
.mobile-scadenza-banner {
    background: #00325D;
    border-bottom: 3px solid #CA1114;
    padding: .85rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

    .mobile-scadenza-banner .label {
        font-size: .72rem;
        color: rgba(255,255,255,.6);
        text-transform: uppercase;
        letter-spacing: .1em;
    }

    .mobile-scadenza-banner .val {
        font-size: 1rem;
        font-weight: 600;
        color: #fff;
    }

.mobile-cta-strip {
    padding: 1rem;
    background: #EEF4FB;
    border-bottom: 1px solid rgba(0,50,93,.12);
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

/* ── Cards ── */
.content-card {
    background: #fff;
    border: 1px solid rgba(0,50,93,.12);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

    .content-card h2 {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.4rem;
        font-weight: 400;
        color: #00325D;
        border-bottom: 1px solid rgba(0,50,93,.12);
        padding-bottom: .6rem;
        margin-bottom: 1rem;
    }

    .content-card p, .content-card li {
        font-size: .9rem;
        color: #1A3A52;
        line-height: 1.8;
    }

    /* Tabelle nel bodyText */
    .content-card table {
        width: 100%;
        border-collapse: collapse;
        font-size: .88rem;
    }

        .content-card table td, .content-card table th {
            padding: .6rem .8rem;
            border: 1px solid rgba(0,50,93,.15);
        }

        .content-card table tr:nth-child(even) td {
            background: #EEF4FB;
        }

    /* Overflow tabelle su mobile */
    .content-card .table-responsive-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

/* ── Sidebar desktop ── */
.sidebar-card {
    background: #fff;
    border: 1px solid rgba(0,50,93,.12);
    overflow: hidden;
    margin-bottom: 1.2rem;
    border-radius: 4px;
}

.sidebar-header {
    background: #00325D;
    padding: .85rem 1.3rem;
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #A3C5E9;
}

.sidebar-body {
    padding: 1.2rem 1.4rem;
}

.s-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(0,50,93,.08);
    font-size: .85rem;
}

    .s-row:last-child {
        border: none;
    }

.s-label {
    color: #3C5A73;
    font-size: .78rem;
    flex-shrink: 0;
}

.s-val {
    color: #00325D;
    font-weight: 500;
    text-align: right;
}

.countdown-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 600;
    color: #CA1114;
    line-height: 1;
}

.countdown-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #3C5A73;
}

/* ── Buttons ── */
.btn-apply {
    display: block;
    width: 100%;
    background: #CA1114;
    color: #fff;
    text-align: center;
    padding: .9rem;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 3px;
    transition: opacity .2s;
}

    .btn-apply:hover {
        opacity: .85;
        color: #fff;
    }

.btn-outline-unm {
    display: block;
    width: 100%;
    background: transparent;
    color: #00325D;
    text-align: center;
    padding: .72rem;
    font-size: .85rem;
    border: 1px solid #00325D;
    text-decoration: none;
    margin-top: .6rem;
    border-radius: 3px;
    transition: background .2s, color .2s;
}

    .btn-outline-unm:hover {
        background: #00325D;
        color: #fff;
    }

/* Alert intro */
.norm-alert {
    background: rgba(0,50,93,.05);
    border: 1px solid rgba(0,50,93,.15);
    border-left: 4px solid #00325D;
    padding: 1rem 1.2rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1.5rem;
}

    .norm-alert p {
        font-size: .9rem;
        color: #1A3A52;
        margin: 0;
    }

/* ── RESPONSIVE ── */
@@media (max-width: 991px) {
    /* Sidebar desktop nascosta, mobile visibile */
    .bando-sidebar-desktop {
        display: none !important;
    }

    .bando-sidebar-mobile {
        display: block;
    }

    .bando-hero {
        padding: 1.8rem 0 1.5rem;
    }

    .hero-badge {
        font-size: .65rem;
        padding: .25rem .8rem;
    }

    .meta-chip {
        font-size: .75rem;
        padding: .3rem .7rem;
    }

    .content-card {
        padding: 1.2rem;
    }

        .content-card h2 {
            font-size: 1.2rem;
        }
}

@@media (max-width: 575px) {
    .bando-hero h1 {
        font-size: 1.4rem;
    }

    .meta-chip {
        font-size: .72rem;
    }
    /* Bottoni mobile a piena larghezza */
    .mobile-cta-strip .btn-apply,
    .mobile-cta-strip .btn-outline-unm {
        margin-top: 0;
        flex: 1;
        min-width: 140px;
        text-align: center;
    }

    .mobile-cta-strip {
        flex-direction: column;
    }

        .mobile-cta-strip a {
            width: 100%;
        }
    /* Condividi inline su mobile */
    .share-row {
        flex-wrap: wrap;
        gap: .75rem;
    }
}
