/* --- STILI BASE E RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}
body {
    background-color: #f8fafc;
    color: #334155;
    overflow-x: hidden;
}

/* --- MENÙ DI NAVIGAZIONE --- */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0));
}
.nav-logo-container {
    display: flex;
    align-items: center;
    height: 60px;
}
.nav-brand-logo {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.3));
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

/* --- QUI C'È LA CORREZIONE --- */
.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* Hover: diventa rosso quando ci passi sopra */
.nav-links a:hover {
    color: #d9383a;
}

/* Active: rimane rosso se ha la classe active */
.nav-links a.active {
    color: #d9383a !important;
    text-decoration: underline;
    text-underline-offset: 8px;
}
/* --------------------------- */

.btn-riservata {
    background-color: #d9383a;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s ease !important;
}
.btn-riservata:hover {
    background-color: #b9282a;
    color: #fff !important;
}

/* --- HERO SECTION --- */
.hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    background-color: #0f4c81;
}
.hero-side {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 1s ease-in-out;
}
.image-side {
    left: -100%; 
    width: 55%;
    z-index: 1;
    background-color: #0b3a60;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%);
    animation: slideInLeft 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.text-side {
    right: -100%; 
    width: 55%;
    left: auto;
    background-color: #0f4c81; 
    z-index: 2;
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    animation: slideInRight 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s;
}
.slogan-content {
    color: #ffffff;
    text-align: center;
    width: 80%;
    padding-right: 5%; 
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-logo {
    width: 420px;       
    max-width: 90%;     
    height: auto;
    margin-bottom: 2rem;
    display: block;
    filter: drop-shadow(0px 6px 12px rgba(0,0,0,0.35));
}
.slogan-content h1 {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.4);
}
.slogan-content .sub-title {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
.slogan {
    font-style: italic;
    font-size: 2.3rem;
    font-weight: bold;
    color: #d9383a; 
    text-shadow: 0px 2px 4px rgba(0,0,0,0.3);
}

/* --- CONTENUTO PRINCIPALE --- */
.main-content {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    color: #0f4c81;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #d9383a;
}

/* --- NEWS --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}
.news-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #d9383a;
    display: flex;
    flex-direction: column;
    height: 420px;
}
.news-thumb {
    width: 100%;
    height: 180px;
    background-color: #cbd5e1;
    background-size: cover;
    background-position: center;
}
.news-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.news-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.4rem;
    font-weight: bold;
}
.news-card h3 {
    color: #0f4c81;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-preview-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-leggi-tutto {
    margin-top: auto; 
    background: none;
    border: none;
    color: #d9383a;
    font-weight: bold;
    cursor: pointer;
    text-align: left;
    padding: 0;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.btn-leggi-tutto:hover {
    color: #0f4c81;
}

/* --- DIRETTIVO --- */
.direttivo-compatto {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 4px solid #0f4c81;
    margin-bottom: 5rem;
}
.direttivo-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
}
.direttivo-group h4 {
    color: #0f4c81;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.2rem;
}
.direttivo-group p {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* --- ADMIN --- */
.admin-section {
    background: #1e293b;
    color: #f8fafc;
    padding: 3rem 2rem;
    border-radius: 8px;
}
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.admin-form input, .admin-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #475569;
    background-color: #334155;
    color: #fff;
}
.admin-form button {
    background-color: #d9383a;
    color: white;
    border: none;
    padding: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
}
.admin-form button:hover { background-color: #b9282a; }

/* --- FOOTER --- */
.info-footer {
    background-color: #0f4c81;
    color: #ffffff;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 8px;
}
.info-footer a { color: #fff; }

/* --- ANIMAZIONI --- */
@keyframes slideInLeft { to { left: 0; } }
@keyframes slideInRight { to { right: 0; } }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .navbar { padding: 1rem; flex-direction: column; gap: 1rem; background: #0f4c81;}
    .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .hero-container { flex-direction: column; height: auto; }
    .hero-side { position: relative; width: 100% !important; height: 45vh !important; left: 0 !important; right: 0 !important; clip-path: none !important; }
    .image-side, .text-side { animation: none; }
    .text-side { height: 55vh !important; justify-content: center; padding: 2rem 0; }
    .slogan-content { opacity: 1; transform: none; width: 100%; padding: 0; }
    .slogan { font-size: 1.8rem; }
    .direttivo-row { flex-direction: column; gap: 1rem; }
}