/* RESET */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/*Animazioni*/
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    
    background-image: linear-gradient(
        135deg,
        rgba(255, 0, 0, 0.4)
        rgba(255, 255, 255, 0.4),
        rgba(38, 0, 255, 0.4)
    );
    
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    pointer-events: none;
    
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.page-transition-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all; 
}

/* Animazione per il caricamento iniziale (Fade-in) */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* FONT */
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

/* GENERALI */
body {
    height: 100vh;
    width: 100vw;
    background-image: url(./images/fazzolettone.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    animation: fadeIn 0.8s ease-in-out;
}

.container {
    flex: 1;
}

.collegamenti {
    text-decoration: none;
    color: #2600ff;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease-in-out;
}

.collegamenti:hover {
    color: #ff0000;
    border-bottom: 2px solid #ff0000;
}

a.download-link {
    background-color: #2600ff;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s;
    box-shadow: 0 4px #00185a;
}

a.download-link:hover {
    background-color: #ff0000;
    box-shadow: 0 4px #c40000;
}

a.download-link:active {
    box-shadow: 0 1px #00185a;
    transform: translateY(3px); 
}

a.download-link i {
    margin-right: 8px;
}

.text {
    max-width: 500px;
    margin: 24px auto;
    margin-left: 25%;
    background-color: #af020236;
    color: #ffffff;
    border-radius: 24px;
    padding: 16px;
}

.blog {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #03030342;
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 8px;
}

.image {
    width: 25%;
    margin: 0 10px;
    border-radius: 50%;
}

.text-h1 {
    color: rgb(66, 60, 60);
    text-align: center;
    width: 100%;
    padding: 8px;
}

.text-admin {
    width: 100%;
    margin-top: 24px;
    background-color: #af020236;
    color: #000000;
    border-radius: 24px;
    padding: 16px;
    align-items: center;
    text-align: center;
}

hr {
    margin: 30px 0;
    border: 0;
    height: 1px;
    background: #ccc;
}

.main {
    max-width: 800px;
    margin: auto;
    background-image: linear-gradient(rgba(21, 0, 255, 0.348), rgba(250, 249, 249, 0.194),rgba(255, 0, 0, 0.202));
    padding: 32px;
    border-radius: 24px;
    margin-bottom: 16px;
    margin-top: 16px;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px, 16px;
    width: 100%;
}
/* LOGO */
.logo {
    display: flex;
}

.scritta {
    font-size: 50px;
    color: #ffffff;
    margin-top: 20px;
}

.scritta.red {
    text-shadow: 3px 2px 3px #ff0000;
}

.scritta.blu {
    text-shadow: 3px 2px 3px #2600ff;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;         /* o 0 se proprio in alto */
    right: 20px;      /* distanza dal bordo destro */
    left: auto;       /* non serve ma va bene esplicitarlo */
    transform: none;  /* elimina il centramento */
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(220, 218, 218, 0.9));
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border-radius: 8px;
    width: auto;
    z-index: 1000;
}

.navbar ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar li {
    margin: 0 8px;
}

.navbar a {
    text-transform: uppercase;
    font-size: 20px;
    font-weight: 600;
    color: #00185a;
    text-decoration: none;
    transition: all 0.4s ease;
}

.navbar ul li a:hover {
    background-image: linear-gradient(#ff0000, #2600ff);
    color: #ffffff;
}

a.current {
    color: #2600ff;
}

/* FOOTER */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    padding: 8px 0;
    letter-spacing: 1px;
    border: 1px solid #ff0000;
    background-image: radial-gradient(rgba(21, 0, 255, 0.202), rgba(255, 0, 0, 0.053));
    font-size: 24px;
    border-radius: 24px;
    width: calc(100% - 1px);
}
.footer-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* LOGO */
.logo-footer {
    width: 100%;
    height: auto;
}

/* SCRITTA CON BACKGROUND */
.address {
    background-color: #2600ff;
    padding: 8px 16px;
    border-radius: 16px;
}

.address a {
    color: #fff;
    text-decoration: none;
}

.address p {
    margin: 2px 0;
}

/* CONTATTI */ 
.contatti {
    width: 80%;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
    background-image: linear-gradient(rgb(255, 255, 255), rgb(207, 207, 207));
    max-width: 800px;
}

.contatto {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 10px;
    background-image: linear-gradient(rgb(255, 255, 255), rgb(210, 209, 209));
    box-shadow: 0 0 10px rgba(0, 0, 255, 0.1);
    border-radius: 5px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.contatto:hover,
.section-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.foto-contatto {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #000000;
}

.info-contatto h2 {
    margin: 0;
    font-size: 1.4em;
    color: #333;
}

.info-contatto h3 {
    margin: 5px 0 0;
    font-size: 1em;
    color: #777;
}

.social_contatti {
    text-decoration: none;
}

/* LISTA */
 ol {
    padding-left: 20px;
}

ol li {
    margin: 8px 0;
    font-size: 1.1em;
    background: #eaf4f4;
    padding: 8px 16px;
    border-radius: 16px;
    transition: background 0.3s;
}

ol li:hover {
    background: #d0ebeb;
}

/* SECTION BOX */
.section-box {
    background: #b3acab72;
    border: 2px solid #cbcde4;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.section-box h2, h3 {
    text-align: center;
}

.section-box p {
    font-size: 24px;
}

.branca-image {
    width: 15%;
    height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    position: absolute;
    top: 20px;
    right: 20px;
}

.branca {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #f9fdfd;
    border: 2px solid #cbe4e4;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start; 
    margin-top: 16px;
}

.section-images {
    width: 32%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.section-images:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

iframe {
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.input-file {
    display: flex;
    width: 100%;
    padding: 8px;
    border: 1px solid #777;
    border-radius: 8px;
}

.input-file label {
    display: flex;
}
.input-file label:hover {
    cursor: pointer;
}

.menu-toggle {
    display: none;
    font-size: 30px;
    color: #00185a;
    cursor: pointer;
    padding: 10px;
}


/* 
    =========================================
    MEDIA QUERIES PER MOBILE (RESPONSIVE)
    ========================================= 
*/

@media screen and (max-width: 820px) {

    /* --- GENERALE --- */
    body {
        background-attachment: scroll; 
    }

    .main {
        width: 95%;
        padding: 15px;
        margin-top: 10px;
    }

    .text {
        width: 100%;
        margin-left: 0;
    }

    /* --- HEADER E LOGO --- */
    header {
        flex-direction: column;
        justify-content: center;
    }

    .logo {
        justify-content: center;
        margin-bottom: 10px;
        transform: scale(0.8); 
    }

    .scritta {
        font-size: 35px;
    }

    /* --- NAVIGAZIONE (MENU) --- */
    .nav {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .navbar {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin: 0;
        background-image: radial-gradient(rgba(21, 0, 255, 0.202), rgba(255, 0, 0, 0.053));
        border-radius: 0;
        box-shadow: none;
        padding: 10px 0;
    }

    .navbar ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .navbar li {
        margin: 8px 0;
        width: 100%;
        text-align: center;
    }
    
    .navbar a {
        display: block;
        padding: 10px;
        font-size: 18px; 
    }

    /* --- SEZIONI E BRANCHE (Info) --- */
    .branca {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .branca-image {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-width: 250px;
        height: auto;
        margin-top: 15px;
        margin-bottom: 10px;
    }

    /* --- IMMAGINI GALLERIA --- */
    .images {
        justify-content: center;
    }

    .section-images {
        width: 100%;
        margin-bottom: 15px;
    }

    /* --- MAPPE E CALENDARI (IFRAME) --- */
    iframe {
        width: 100% !important;
        max-width: 100%;
        height: 300px;
    }

    /* --- PAGINA CONTATTI --- */
    .contatti {
        width: 95%;
        padding: 10px;
    }

    .contatto {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .foto-contatto {
        margin-right: 0;
        margin-bottom: 10px;
        width: 80px;
        height: 80px;
    }

    .info-contatto h2 {
        font-size: 1.2em;
    }

    /* --- FOOTER --- */
    footer {
        flex-direction: column;
        text-align: center;
        font-size: 18px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-footer {
        width: 100px; 
    }

    .menu-toggle {
        display: block;
        text-align: center;
        z-index: 1001;
        cursor: pointer;
    }

    .navbar ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    .navbar ul.active {
        display: flex !important;
        animation: fadeIn 0.5s;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
} 

:focus {
    outline: 2px solid #2600ff;
    outline-offset: 2px;
    border-radius: 3px;
}
