/* BODY & RESET BASE */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: #0a0a0a;
    color: white;
    margin: 0;
    overflow-x: hidden;
}

/* HEADER CON NAVBAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid #222;
}

/* Titolo */
.nomepg {
    margin: 0;
    font-size: 62px;
    letter-spacing: 4px;
    font-family: 'Cinzel', serif;
}

/* NAVBAR */
.navbar {
    display: flex;
    gap: 25px;
    font-family: 'Montserrat', sans-serif;
}

.navbar a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 2px;
    transition: 0.3s;
    position: relative;
}

.navbar a:hover {
    color: white;
}

/* Sottolineatura elegante hover */
.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0%;
    height: 1px;
    background: white;
    transition: 0.3s;
}

.navbar a:hover::after {
    width: 100%;
}

.testo {
    color: #bbb;
    line-height: 1.6;
    font-size: 20px;
    font-family: 'Montserrat', sans-serif;
}

.info-container,
.info-container * {
    text-transform: none !important;
}

/* CONTAINER */
.info-container {
    width: 88%;
    max-width: 1100px;
    margin: 100px auto 140px auto;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 140px;
}

.info-row .testo {
    flex: 1;
}

.info-row .image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

img {
    width: 70%;
}

/* LISTE */
.info-section ul {
    padding-left: 20px;
    margin-top: 25px;
    margin-bottom: 35px;
}

.info-section li {
    color: #d6d6d6;
    margin-bottom: 14px;
    font-size: 18px;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

.info-sectiondx {
    margin-bottom: 140px;
    padding-right: 0;
}

/* TITOLI */
.info-sectiondx h2 {
    font-size: 40px;
    letter-spacing: 4px;
    margin-bottom: 40px;
    font-family: 'Cinzel', serif;
    font-weight: 400;
    color: white;
    text-align: left;
}

.info-sectiondx h3 {
    font-size: 18px;
    letter-spacing: 3px;
    margin-top: 45px;
    margin-bottom: 20px;
    font-family: 'Cinzel', serif;
    color: #d0d0d0;
}

/* TESTI */
.info-sectiondx p {
    color: #b8b8b8;
    line-height: 2;
    font-size: 18px;
    font-family: 'Montserrat', sans-serif;
}

/* LISTE */
.info-sectiondx ul {
    padding-left: 20px;
    margin-top: 25px;
    margin-bottom: 35px;
}

.info-sectiondx li {
    color: #d6d6d6;
    margin-bottom: 14px;
    font-size: 18px;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

/* BOTTONI */
.open-form-btn,
.submit-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 30px auto 0 auto;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    color: white;
    padding: 18px 32px;
    font-size: 14px;
    letter-spacing: 3px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.35s ease;
    text-align: center;
}

.open-form-btn:hover,
.submit-btn:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
}

/* LINK PAGINA */
.abbonamenti-link {
    text-align: center;
    text-decoration: underline;
}

/* LINK */
.linkpg {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 30px;
    letter-spacing: 3px;
    font-family: 'Cinzel', serif;
    transition: all 0.3s ease;
}

.linkpg:hover {
    color: white;
    transform: translateX(6px);
}

/* POPUP OVERLAY */
.popup-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.94);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
    overflow-y: auto; 
}

/* POPUP CONTENT */
.popup-content {
    width: 100%;
    max-width: 650px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 40px;
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    animation: popupFade 0.35s ease;
    margin: auto;
}

/* ANIMAZIONE */
@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TITOLO POPUP */
.popup-content h2 {
    font-size: 34px;
    letter-spacing: 4px;
    margin-bottom: 35px;
    font-family: 'Cinzel', serif;
    font-weight: 400;
    text-align: center;
}

/* FORM */
.popup-content form {
    display: flex;
    flex-direction: column;
}

/* INPUT */
.popup-content input,
.popup-content textarea,
.popup-content select {
    background: #0f0f0f;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 16px;
    margin-bottom: 20px;
    color: white;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    transition: 0.3s;
    width: 100%; /* Allinea gli input nativamente al 100% */
}

.popup-content input:focus,
.popup-content textarea:focus,
.popup-content select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.25);
}

/* TEXTAREA */
.popup-content textarea {
    min-height: 160px;
    resize: vertical;
}

/* CHECKBOX CONTAINER */
.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    color: #aaa;
    font-size: 14px;
    line-height: 1.4;
    width: 100%;
}

/* Sistemata la dimensione reale della checkbox */
.checkbox input {
    width: 18px !important; /* Ripristinato a dimensione normale, rimosso il 5px */
    height: 18px !important;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Sistemata l'estensione del testo del consenso */
.checkbox span {
    flex: 1 !important; /* Sfrutta tutto lo spazio rimanente invece di bloccarsi allo 0.2 */
    color: #bbb;
}

/* CHIUSURA POPUP */
.close-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    opacity: 0.7;
}

/* FOOTER */
.footer {
    background: #0a0a0a;
    color: #aaa;
    text-align: center;
    padding: 35px 20px;
    margin-top: 150px;
    font-family: 'Montserrat', sans-serif;
    border-top: 1px solid #222;
}

.footer-content p {
    margin: 5px 0;
    font-size: 14px;
    letter-spacing: 1px;
}

/* LOGO FOOTER */
.footer-logo img {
    width: 90px;
    height: auto;
    margin-bottom: 15px;
    opacity: 0.9;
    transition: 0.3s;
}

.footer-logo img:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* LINK FOOTER */
.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    margin: 0 10px;
    font-size: 13px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* ========================================================== */
/* SEZIONE MOBILE (RESPONSIVE) */
/* ========================================================== */
@media (max-width: 768px) {

    /* HEADER */
    .topbar {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
        text-align: center;
    }

    .nomepg {
        font-size: 34px;
        letter-spacing: 2px;
    }

    .navbar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .navbar a {
        font-size: 12px;
        letter-spacing: 1px;
    }

    /* TESTO GENERALE */
    .testo {
        font-size: 16px;
        line-height: 1.6;
        padding: 0 4%;
    }

    /* CONTAINER PRINCIPALE */
    .info-container {
        width: 95%;
        margin: 50px auto;
    }

    /* Struttura a colonna per il contenuto */
    .info-row {
        flex-direction: column;
        align-items: center;
        gap: 25px;
        margin-bottom: 60px;
    }

    .info-row .text {
        width: 100%;
        text-align: left;
    }

    /* IMMAGINI DEL CONTENUTO - Ridimensionate correttamente */
    .info-row .image {
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 15px auto;
    }

    .info-row .image img {
        width: 100%;
        max-width: 320px; /* Evita che la foto diventi gigante occupando tutto */
        height: auto;
        object-fit: cover;
    }

    /* TITOLI CORRETTI */
    .info-sectiondx h2 {
        font-size: 24px;
        text-align: left;
        margin-bottom: 20px;
    }

    .info-sectiondx h3 {
        font-size: 16px;
        text-align: left;
    }

    /* LISTE MOBILE */
    .info-section li,
    .info-sectiondx li {
        font-size: 15px;
    }

    /* BOTTONI */
    .open-form-btn,
    .submit-btn {
        width: 100%;
        font-size: 13px;
        padding: 15px 20px;
    }

    /* LINK */
    .linkpg {
        font-size: 20px;
    }

    /* POPUP INTERNO RESPONSIVE */
    .popup-overlay {
        padding: 10px;
        align-items: flex-start;
    }

    .popup-content {
        width: 100%;
        padding: 25px 20px; 
        max-height: calc(100vh - 20px); 
        overflow-y: auto;
    }

    .popup-content h2 {
        font-size: 24px; 
        margin-bottom: 25px;
    }

    .popup-content input,
    .popup-content textarea,
    .popup-content select {
        width: 100%; 
        padding: 12px; 
        font-size: 14px;
    }

    .checkbox {
        gap: 10px;
    }

    .checkbox input {
        width: 18px !important;
        height: 18px !important;
    }

    .checkbox span {
        flex: 1 !important;
        font-size: 13px;
    }

    /* FOOTER MOBILE */
    .footer {
        padding: 25px 15px;
        margin-top: 60px;
    }

    .footer-logo img {
        width: 65px;
    }
}