/* Stili Generali */
body {
    font-family: 'Open Sans', sans-serif;
    color: #343a40; /* Grigio scuro per il testo principale */
    background-color: #f8f9fa; /* Sfondo generale più chiaro */
    margin: 0;
    padding: 0;
    line-height: 1.6; /* Aumenta leggermente l'interlinea generale */
}

.tit1 {
  /*
    Minimo: 2rem (32px se 1rem = 16px)
    Preferito: cresce con il 5% della larghezza del viewport
    Massimo: 3rem (48px)
  */
  font-family: tahoma;
    color: red; /* Grigio scuro per il testo principale */
  font-size: clamp(1rem, 5vw, 5rem);
}

.tit2 {
  /*
    Minimo: 1.5rem (24px)
    Preferito: cresce con il 4% della larghezza del viewport
    Massimo: 2.25rem (36px)
  */
  font-size: clamp(0.5rem, 4vw, 0.5rem);
}

.container {
    max-width: 1200px;
}

/* Stili per le Sezioni Contenuto (generali per tutte le pagine di testo) */
.content-section {
    background-color: #ffffff;
    padding: 50px;
    margin-top: 40px;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.content-section h1, .content-section h2, .content-section h3, .content-section h4 {
    color: #0056b3;
    margin-bottom: 1rem;
    font-weight: 700;
}
.content-section h1 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.2;
    text-transform: none; /* Gestito manualmente nel markup */
}
.content-section h2 {
    font-size: 2.2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.75rem;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    color: #212529;
    text-transform: none; /* Gestito manualmente nel markup */
}
.content-section h3 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #007bff;
    text-transform: none; /* Gestito manualmente nel markup */
}
.content-section h4 {
    font-size: 1.4rem;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    color: #495057;
    text-transform: none; /* Gestito manualmente nel markup */
}
.content-section p {
    margin-bottom: 1rem;
}
.content-section ul, .content-section ol {
    margin-left: 20px;
    margin-bottom: 1.5rem;
}
.content-section ul li, .content-section ol li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}
.content-section hr {
    margin-top: 3rem;
    margin-bottom: 3rem;
    border-top: 1px solid #e9ecef;
}
.content-section a {
    color: #007bff;
    text-decoration: none;
}
.content-section a:hover {
    text-decoration: underline;
}

/* Stili specifici per le Card (usati nella home) */
.card-img-top {
    height: 180px;
    object-fit: cover;
}
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.card-title {
    color: #0056b3;
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Stili specifici per la Testata con Immagine di Sfondo e Parallasse (usati nella home) */
.hero-image-container {
    position: relative;
    width: 100%;
    height: 600px; /* Altezza fissa della testata */
    background-image: url('/res/img/testata80.jpg'); /* La tua immagine come sfondo */
    background-attachment: fixed; /* Questo crea l'effetto parallasse CSS */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    z-index: 1;
}

/* Contenitore per il testo della testata */
.hero-text-overlay {
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    transition: opacity 0.3s ease-out; /* Per far sparire gradualmente il testo */
    max-width: 80%;
}

.hero-text-overlay h1 {
    font-size: 3rem; /* Alleggerito: ridotta dimensione */
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.2); /* Ulteriore alleggerimento dell'ombra */
    margin-bottom: 0.5rem;
}

.hero-text-overlay p {
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* Stili per il Footer (Comuni a tutte le pagine) */
.footer {
    background-color: #e9ecef;
    color: #6c757d;
    padding: 25px 0;
    margin-top: 60px;
    font-size: 0.9rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}

/* Stile specifico per l'immagine dell'albero genealogico (solo per gradi_parentela.html) */
.family-tree-diagram {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Stile per scurire i bordi dei campi del form in index.php */
.form-container .form-control,
.form-container .form-check-input {
    border-color: #adb5bd;
}

/* ========================================= */
/* STILI PER IL BOX ANNUNCI             */
/* ========================================= */

/* Stile per il contenitore dell'alert per dare spazio al bottone */
.alert-announcement {
    padding-top: 50px; /* Aggiunge spazio in alto per non sovrapporre il testo al bottone */
}

/* Stile per il bottone di chiusura personalizzato */
.announcement-close-btn {
    /* Posizionamento */
    position: absolute;
    top: 15px;
    right: 15px;

    /* Stile del pulsante */
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;

    /* Allineamento di icona e testo con Flexbox */
    display: flex;
    align-items: center;
    gap: 6px; /* Spazio tra la 'x' e la scritta 'Chiudi' */
}

/* Effetto al passaggio del mouse */
.announcement-close-btn:hover {
    opacity: 1;
}

/* Stile per il testo "Chiudi" */
.announcement-close-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Stile specifico per l'icona 'x' (&times;) */
.announcement-close-btn span[aria-hidden="true"] {
    font-size: 1.5rem; /* Rende la 'x' più grande */
    line-height: 1;    /* Migliora l'allineamento verticale */
    font-weight: 400;
}

/* Usa questa regola per nascondere il box degli annunci 
#announcementBox {
    display: none;
}
*/