/* ==========================================================================
   1. RESET E IMPOSTAZIONI GLOBALI
   ========================================================================== */
@import url("general.css");

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    height: -webkit-fill-available;
}

body {
    min-height: 100%;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    overflow-x: hidden;
    /* Sfondo marrone scuro profondo */
    background: linear-gradient(135deg, #1a0f0d 0%, #0f0807 100%);
    color: #F5F5DC; 
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   2. SISTEMA DI ANIMAZIONE (Observer)
   ========================================================================== */

.container,
.container#menu > a {
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.4s ease-in, opacity 0.4s ease-in;
}

.container.reveal-up,
.container#menu > a.reveal-up {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   3. LAYOUT DELLE SEZIONI (Base)
   ========================================================================== */
.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
}

/* ==========================================================================
   4. HERO SECTION (1st child)
   ========================================================================== */
.container:nth-child(1) {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: transparent;
}

.container:nth-child(1) h1 {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 2rem;
    text-transform: uppercase;
    /* Rimosso il gradiente giallo: ora Panna solido ed elegante */
    color: #F5F5DC;
    background: none;
    -webkit-text-fill-color: initial;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.container:nth-child(1) a {
    text-decoration: none;
    /* Arancione bruciato/ruggine (meno acceso) */
    background-color: #C1661D; 
    color: #fff;
    font-weight: bold;
    padding: 18px 45px;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.container:nth-child(1) a:hover {
    transform: translateY(-5px);
    background-color: #E38533; /* Si accende leggermente in hover */
    box-shadow: 0 15px 30px rgba(227, 133, 51, 0.2);
}

/* ==========================================================================
   5. SEZIONE MENU (Cards)
   ========================================================================== */
.container#menu {
    justify-content: space-evenly;
    gap: 2rem;
}

.container#menu > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    border-radius: 30px;
    overflow: hidden;
    text-decoration: none;
    /* Bordo panna quasi invisibile */
    border: 1px solid rgba(245, 245, 220, 0.08);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                opacity 0.4s ease-in;
}

.container#menu > a img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5) contrast(1.1);
    transition: transform 0.6s ease;
}

.container#menu > a h1 {
    position: relative;
    z-index: 2;
    color: #F5F5DC;
    font-size: 2.5rem;
    text-transform: uppercase;
    font-weight: 800;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
}

.container#menu > a:hover { transform: scale(1.02); }
.container#menu > a:hover img { transform: scale(1.1); }

/* ==========================================================================
   6. SEZIONE STORIA (Grid)
   ========================================================================== */
.container:nth-child(3) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-content: center;
    grid-template-areas: 
        "title title title"
        "img1  img1  text1"
        "text2 img2  img2";
}

.container:nth-child(3) h1 {
    grid-area: title;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #F5F5DC; /* Titolo panna, non più arancione */
}

#img1 { grid-area: img1; }
#img2 { grid-area: img2; }
#text1 { grid-area: text1; }
#text2 { grid-area: text2; }

#img1, #img2 {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    /* Bordi con un tocco arancio bruciato molto sottile */
    border: 1px solid rgba(193, 102, 29, 0.2);
}

#text1, #text2 {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(245, 245, 220, 0.7); /* Panna soft */
    padding: 20px;
}

/* ==========================================================================
   7. SEZIONE MAPPA
   ========================================================================== */
.container:nth-child(4) {
    min-height: auto;
    align-items: center;
    gap: 30px;
}

.container:nth-child(4) iframe {
    width: 100%;
    max-width: 1000px;
    height: 450px;
    border-radius: 30px;
    /* Mappa con toni caldi ma scuri */
    filter: invert(90%) hue-rotate(10deg) brightness(0.7) contrast(1.2);
    border: 1px solid rgba(193, 102, 29, 0.15) !important;
}

/* ==========================================================================
   8. MEDIA QUERIES (Mobile)
   ========================================================================== */
@media (max-width: 480px) {
    .container:nth-child(3) {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    #img1, #img2 { height: 200px; }
    
    .container:nth-child(4) iframe {
        height: 300px;
    }
}
