:root {
    --accent-color: #d4af37; /* Oro */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Roboto', sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: var(--font-secondary);
    background-color: #000;
}

main {
    height: 100vh;
    overflow-y: auto; /* Permette lo scroll su mobile */
    overflow-x: hidden;
}

#hero {
    width: 100%;
    min-height: 100vh; /* Usa min-height per permettere al contenuto di espandersi */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Mantiene l'effetto parallasse dove possibile */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    box-sizing: border-box;
}

#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-text h1 {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    margin: 0;
    color: var(--accent-color);
}

.help-link {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: rgba(212, 175, 55, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.help-link:hover {
    background: rgba(212, 175, 55, 1);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* WRAPPER PER CENTRARE TESTO E BOTTONE */
.presentation-wrapper {
    position: relative;
    z-index: 2;
    text-align: center; /* Centra il bottone */
    max-width: 800px;
    margin: 1rem auto;
}

#presentation-container {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.15); /* Sfondo con trasparenza al 15% */
    backdrop-filter: blur(6px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f0f0f0;
    margin-bottom: 2rem; /* Spazio tra il box e il bottone sotto */
}

#presentation-text {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
    margin: 0;
}

#presentation-text::after {
    content: '▋';
    display: var(--display-cursor, inline-block);
    margin-left: 2px;
    animation: blink 1s infinite;
    color: var(--accent-color);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* STILE BOTTONE */
.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: #111;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

.cta-button:hover {
    background-color: #fff;
    transform: scale(1.05);
}

.visit-paths-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    flex-wrap: wrap; /* Permette alle categorie di andare a capo */
    gap: 2rem; /* Spazio tra le categorie */
}

/* STILE LINK CATEGORIE */
.path-link {
    text-decoration: none; /* Rimuove la sottolineatura */
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.path-link:hover {
    transform: translateY(-10px); /* Effetto hover sull'intera categoria */
}

.path {
    text-align: center;
}

.path h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 4px #000;
    /* MODIFICA RICHIESTA: Colore impostato su bianco */
    color: #ffffff;
}

.image-gallery {
    position: relative;
    width: 200px;
    height: 160px;
    margin: 0 auto;
    cursor: pointer;
}

.gallery-item {
    width: 200px;
    aspect-ratio: 3 / 2;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 8px;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-gallery:hover .gallery-item {
    transform: rotate(0) translateY(-10px) scale(1.05);
}

.gallery-item:nth-child(1) { transform: rotate(-10deg); z-index: 1; }
.gallery-item:nth-child(2) { transform: rotate(-5deg); z-index: 2; }
.gallery-item:nth-child(3) { transform: rotate(5deg); z-index: 3; }
.gallery-item:nth-child(4) { transform: rotate(10deg); z-index: 4; }

.image-gallery .gallery-item:hover {
    transform: translateY(-20px) scale(1.15) !important;
    z-index: 5;
}

/* =================================== */
/* --- REGOLE PER IL RESPONSIVE --- */
/* =================================== */

/* Tablet (fino a 1024px) */
@media (max-width: 1024px) {
    .visit-paths-container {
        flex-direction: row;
        justify-content: center;
        gap: 3rem; /* Aumenta lo spazio */
    }
    .path-link {
        width: 40%; /* Due categorie per riga */
    }
    .presentation-wrapper {
        max-width: 90%;
    }
}

/* Smartphone (fino a 768px) */
@media (max-width: 768px) {
    #hero {
        padding: 1rem;
        justify-content: flex-start; /* Allinea dall'alto */
        background-attachment: scroll; /* Disattiva parallasse per performance */
    }
    main {
        height: auto; /* Altezza automatica per lo scroll */
    }
    .hero-text {
        margin-top: 2rem;
    }
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .presentation-wrapper {
        margin-top: 2rem;
    }
    #presentation-text {
        font-size: 1rem;
    }
    .visit-paths-container {
        flex-direction: column; /* Una categoria per riga */
        align-items: center;
        margin-top: 3rem;
        gap: 3rem;
    }
    .path-link {
        width: 80%; /* Occupa più spazio in larghezza */
    }
    .path-link:hover {
        transform: none; /* Disabilita l'effetto hover su mobile */
    }
}