/* ============================================================
   EVENTI / NEWS — STILE UNIFICATO NWR&V
============================================================ */

.page-news {
    background: #f5f7f9;
}

/* ============================
   HERO
============================ */

.page-hero {
    padding: 35px 0 25px 0;
    background: #e6eef1;
    color: #23333a;
    text-align: center;
    border-bottom: 3px solid #4d798b20;
    border-top: 2px solid #d3dde2;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #355866;
}

.page-subtitle {
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* CONTAINER */
.page-container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* GRID */
.news-section {
    padding: 0 0 30px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    justify-items: center;
}

/* CARD */
.news-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 35px;
    position: relative;
    text-align: center;

    /* FIX SOVRAPPOSIZIONE MOBILE ORIZZONTALE */
    width: 100%;
    max-width: 450px;

    transition: box-shadow 0.35s ease;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        0 10px 25px rgba(0, 0, 0, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.10);
}

/* Ombra dinamica premium */
.news-card:hover {
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.12),
        0 25px 45px rgba(0, 0, 0, 0.18),
        0 40px 65px rgba(0, 0, 0, 0.22);
}

/* Bordo animato */
.news-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 2px;
    background: linear-gradient(135deg, #4d798b, #355866, #4d798b);
    opacity: 0;
    transition: opacity 0.35s ease;

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    pointer-events: none;
}

.news-card:hover::before {
    opacity: 1;
    filter: drop-shadow(0 0 12px #4d798b60);
}

/* ICONA */
.news-icon i {
    font-size: 4rem;
    color: #355866;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.news-card:hover .news-icon i {
    transform: scale(1.08);
    filter: drop-shadow(0 0 6px #35586680);
}

/* TESTI */
.news-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #355866;
    margin-top: 40px;
}

.news-desc {
    font-size: 1rem;
    color: #23333a;
    margin: 15px 0 25px 0;
}

/* BUTTON */
.news-btn {
    display: inline-block;
    background: #4d798b;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease;
}

.news-btn:hover {
    background: #355866;
}

.hidden-thumb {
    display: none;
}

/* BOX NESSUNA GARA - BORDO SFUMATO PREMIUM */
.no-gare-box {
    margin-top: 20px;
    padding: 28px;

    /* Sfondo elegante */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(245, 245, 245, 0.9));

    /* Bordo sfumato premium */
    border: 3px solid transparent;
    border-radius: 18px;
    background-image:
        linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(245, 245, 245, 0.9)),
        linear-gradient(135deg, #53717d, #7fa1ad);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    /* Effetto 3D */
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.12),
        inset 0 0 12px rgba(255, 255, 255, 0.6),
        0 0 14px rgba(83, 113, 125, 0.35);
    /* glow del bordo */

    text-align: center;
    color: #333;

    /* Animazione */
    animation: fadeSlideIn 0.45s ease-out;
}

/* Icona */
.no-gare-box i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    color: #53717d;
    /* colore tema */
    text-shadow: 0 2px 4px rgba(83, 113, 125, 0.35);
}

/* Titolo */
.no-gare-box h4 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #222;
}

/* ==================================
   CARD GARA REGIONALE
====================================*/
.gare-box {
    margin-top: 20px;
    padding: 28px;

    /* Sfondo elegante */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(245, 245, 245, 0.9));

    /* Bordo sfumato premium */
    border: 3px solid transparent;
    border-radius: 18px;
    background-image:
        linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(245, 245, 245, 0.9)),
        linear-gradient(135deg, #53717d, #7fa1ad);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    /* Effetto 3D */
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.12),
        inset 0 0 12px rgba(255, 255, 255, 0.6),
        0 0 14px rgba(83, 113, 125, 0.35);
    /* glow del bordo */

    text-align: center;
    color: #333;

    /* Animazione */
    animation: fadeSlideIn 0.45s ease-out;
}

/* ==================================
   ICONA CALENDARIO CON NUMERO DINAMICO
====================================*/
.calendar-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;

    /* stesso bordo sfumato premium del tuo box */
    border: 3px solid transparent;
    background-image:
        linear-gradient(135deg, #ffffff, #f5f5f5),
        linear-gradient(135deg, #53717d, #7fa1ad);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    /* ombre identiche */
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.12),
        inset 0 0 12px rgba(255, 255, 255, 0.6),
        0 0 14px rgba(83, 113, 125, 0.35);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 32px;
    font-weight: 800;
    color: #53717d;
    text-shadow: 0 2px 4px rgba(83, 113, 125, 0.35);

    margin: 0 auto 14px auto;
}

/* ==================================
   TITOLO
====================================*/
.gare-box h4 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #222;
}

/* Animazione */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   MOBILE — EVENTI / NEWS
====================================== */

@media (max-width: 768px) {

    .page-hero {
        padding: 70px 0 20px 0;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .news-grid {
        gap: 25px;
    }

    .news-card {
        max-width: 100%;
        padding: 25px;
        border-radius: 14px;
    }

    .news-icon i {
        font-size: 3rem;
    }

    .news-title {
        font-size: 1.2rem;
        margin-top: 25px;
    }

    .news-desc {
        font-size: 0.95rem;
        margin: 12px 0 20px 0;
    }

    .news-btn {
        display: flex;
        flex-direction: column;
        gap: 12px;
        /* distanza perfetta */
    }

    .news-btn a {
        width: 100%;
    }
}

@media (max-width: 768px),
(max-height: 600px) {

    /* Pulsanti regionali + nazionali */
    #btn-locandine-regionali,
    #btn-iscrizioni-regionali,
    #btn-locandine-nazionali,
    #btn-iscrizioni-nazionali {
        display: flex !important;
        /* blocco vero SOLO in mobile */
        width: 100% !important;
        justify-content: center;
        margin-bottom: 12px;
    }

    /* Rimuove l’ultimo margine */
    #btn-iscrizioni-regionali,
    #btn-iscrizioni-nazionali {
        margin-bottom: 0;
    }

    /* Neutralizza inline-flex di carosello.css */
    .news-btn {
        display: flex !important;
        width: 100% !important;
        justify-content: center;
    }
}