/* --- Variabili e Base --- */
body { 
    background: #f5fbf8; 
    color: #1f3729; 
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --- Navbar Modern (Glassmorphism) --- */
.navbar {
    background: rgba(14, 39, 15, 0.8) !important; 
    -webkit-backdrop-filter: blur(10px); /* Supporto Safari */
    backdrop-filter: blur(10px); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
}

.navbar .nav-link { 
    color: rgba(255, 255, 255, 0.9) !important; 
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover { 
    color: #d4f5dd !important; 
}

/* --- Hero Home --- */
.hero-home {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: url("../images/frog-butterfly_r.jpg") center center / cover no-repeat !important;
}

/* --- Hero Pagine Interne --- */
.hero-page {
    position: relative;
    padding: 10rem 0 6rem; 
    background-color: #0e270f; 
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 25, 10, 0.55) 0%, rgba(0, 35, 15, 0.35) 45%, rgba(0, 25, 10, 0.55) 100%),
                linear-gradient(180deg, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.35) 100%);
    z-index: 1;
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    width: 100%; 
}

.hero-text { 
    max-width: 860px; 
    margin: 0 auto; 
    padding: 7rem 0 6rem; 
}

.hero-kicker {
    margin-left: 450px; 
    text-align: left; 
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 1px;
}

/* --- Cards e Componenti --- */
.card-modern { 
    border: 0; 
    border-radius: 1rem; 
    box-shadow: 0 10px 30px rgba(0,0,0,.08); 
    padding-top: 20px; 
    background: #fff;
    transition: transform 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-5px);
}

.research-card {
    border: 0; 
    border-radius: 1rem; 
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: all .25s ease;
    background: #fff;
}

.research-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 35px rgba(0,0,0,.12);
}

/* --- Staff Section --- */

.staff-bio {
    font-size: 0.95rem;
    line-height: 1.7;         /* Interlinea aumentata per leggibilità */
    color: #555;
    text-align: justify;       /* Allineamento a destra come richiesto */
    margin: 15px 0;
    padding-right: 10px;     /* Spazio dal bordo destro */
    border-right: 3px solid #d4f5dd; /* Un dettaglio elegante che richiama il tema verde */
    font-style: italic;      /* Spesso le bio stanno bene in corsivo */
}
.card-modern {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-modern:hover {
    transform: translateY(-5px); /* Effetto sollevamento al passaggio del mouse */
}
.staff-card { 
    text-align: center; 
    padding: 30px 20px; 
}

.staff-avatar { 
    display: flex; 
    justify-content: center; 
    margin-bottom: 20px; 
}

.staff-avatar img {
    width: 180px; 
    height: 180px; 
    border-radius: 50%; 
    object-fit: cover;
    border: 6px solid #d4f5dd;
}

/* --- Separatore Immagine Ottimizzato --- */
.image-separator img {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}


.card-modern {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-modern:hover {
    transform: translateY(-5px); /* Effetto sollevamento al passaggio del mouse */
}
/* --- Footer Modern Style --- */
.footer-university {
    background-color: #0e270f !important; 
    background: linear-gradient(180deg, #0e270f 0%, #051406 100%) !important;
    -webkit-backdrop-filter: blur(10px); /* Supporto Safari */
    backdrop-filter: blur(10px);
    
    color: #d4f5dd !important; 
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

footer.footer-university {
    display: block !important;
    background-color: #0e270f !important; 
    background: linear-gradient(180deg, #0e270f 0%, #051406 100%) !important;
    color: #ffffff !important;
    padding: 20px 0 !important; 
    margin-top: 0 !important;
    clear: both;
}

.footer-university h5 {
    color: #ffffff !important; 
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-university p {
    font-size: 0.95rem;
    opacity: 0.9;
    color: #d4f5dd !important;
}

.footer-university strong {
    color: #ffffff !important;
}

/* --- Media Queries (Responsività) --- */
@media (max-width: 991px) {
    .hero-text {
        padding: 5rem 1rem 4rem;
    }
    .hero-kicker {
        margin-left: 0;
        text-align: center;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    .footer-university {
        text-align: center;
    }
    .footer-university .text-md-end {
        text-align: center !important;
        margin-top: 1.5rem;
    }
}
/* --- Background specifico per Hero Facilities --- */


/* Ottimizzazione card facilities per uniformarle allo staff */
.facility-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.facility-card:hover {
    transform: translateY(-5px);
}
/* Stili per lo sfondo della parte inferiore della pagina */
.lower-page-background {
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Opzionale: crea un effetto parallax */
    position: relative; /* Necessario per l'overlay */
    width: 100%;
}

/* Overlay per garantire la leggibilità del testo sullo sfondo */
.lower-page-background .background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Regola l'opacità (0.5 è 50%) */
    z-index: 1; /* Mette l'overlay sopra lo sfondo */
}

/* Assicura che il contenuto sia sopra l'overlay */
.lower-page-background .content-wrapper {
    position: relative;
    z-index: 2;
    color: white; /* Rende il testo bianco per contrasto, se necessario */
}

/* Assicura che i titoli e altri elementi siano leggibili */
.lower-page-background .section-title,
.lower-page-background h2,
.lower-page-background h3,
.lower-page-background h4,
.lower-page-background p,
.lower-page-background .text-muted,
.lower-page-background strong,
.lower-page-background em {
    color: white !important; /* Forza il testo bianco all'interno di questo contenitore */
}

/* Regola i colori dei link all'interno del contenitore */
.lower-page-background a {
    color: #007bff; /* Colore link predefinito (es. blu) */
}

.lower-page-background a:hover {
    color: #0056b3; /* Colore link al passaggio del mouse */
}

/* Regola le card per contrastare con lo sfondo */
.lower-page-background .research-card,
.lower-page-background .card-modern,
.lower-page-background .content-box {
    background-color: rgba(255, 255, 255, 0.9); /* Sfondo card semi-trasparente bianco */
    color: #333; /* Colore testo scuro per le card */
    border: none;
}

/* Assicura che il testo all'interno delle card sia scuro */
.lower-page-background .card-body p,
.lower-page-background .card-body h3,
.lower-page-background .card-body h4,
.lower-page-background .card-body .text-muted {
    color: #333 !important;
}
