/* Caricamento Font Personalizzati Abrade con percorsi relativi corretti (../font/) */
@font-face {
    font-family: 'Abrade Bold';
    src: url('../font/Abrade-Bold.woff2') format('woff2'),
         url('../font/Abrade-Bold.woff') format('woff'),
         url('../font/Abrade-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Abrade Book';
    src: url('../font/Abrade-Light.woff2') format('woff2'),
         url('../font/Abrade-Light.woff') format('woff'),
         url('../font/Abrade-Light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Abrade Medium';
    src: url('../font/Abrade-Medium.woff2') format('woff2'),
         url('../font/Abrade-Medium.woff') format('woff'),
         url('../font/Abrade-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}
html, body {
    overflow-x: hidden; /* Impedisce la comparsa di qualsiasi scrollbar orizzontale */
    width: 100%;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Abrade Book', 'Georgia', serif;
    background-color: #FDFFF0;
    color: #660000;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Abrade Bold', 'Georgia', serif;
    font-weight: bold;
}

p {
    font-size: 14pt;
    margin-top: 0;
    margin-bottom: 20px;
}

p a {
    color: #FDFFF0;
    text-decoration: none;
}
p a:hover {
    color: #FFFFFF;
}

p strong {
    font-family: 'Abrade Medium', sans-serif;
    font-weight: 500;
}

/* Helper di colore testo */
.text-red { color: #660000; }
.text-black { color: #000000; }

/* Sticky Header Navigation con Gradient da su a giù */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 20px 35px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1000;
}

.header-logo img {
    transition: opacity 0.4s ease-in-out;
}

.header-nav {
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 15px;
    display: flex;
    align-items: center;
}

/* Bandiere cambio lingua */
.flag-icon {
    width: 24px;
    height: auto;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

/* Componente Bottoni */
.btn {
    font-family: 'Abrade Bold', sans-serif;
    font-weight: bold;
    font-size: 13pt;
    line-height: 13pt;
    letter-spacing: 1px;
    padding: 14px 22px 10px 22px;
    text-decoration: none;
    border-radius: 50px;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-yellow {
    background-color: #FDFFF0;
    color: #660000;
    border: 2px solid #FDFFF0;
}
.btn-yellow:hover {
    background-color: #660000;
    color: #FDFFF0;
    border-color: #660000;
}

.btn-yellow-outline {
    background-color: transparent;
    color: #FDFFF0;
    border: 2px solid #FDFFF0;
}
.btn-yellow-outline:hover {
    background-color: #FDFFF0;
    color: #660000;
}

.btn-red-outline {
    background-color: transparent;
    color: #FDFFF0;
    border: 2px solid #FDFFF0;
}
.btn-red-outline:hover {
    background-color: #FDFFF0;
    color: #660000;
}

/* Layout Sezione Hero Slider (Effetto Fade) */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    text-align: center;
    overflow: hidden;
    background-color: #000;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-inner {
    position: absolute;
    bottom: 110px;
    left: 0;
    width: 100%;
    padding: 0 20px;
    z-index: 10;
}

.hero h1 {
    color: #FDFFF0;
    font-size: 35pt;
    line-height: 38pt;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    margin: 0;
    max-width: 800px;
    display: inline-block;
    opacity: 0;
    animation: fadeInUpHero 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInUpHero {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigazione a pallini */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(253, 255, 240, 0.4);
    border: 1px solid #FDFFF0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot.active, .slider-dots .dot:hover {
    background-color: #FDFFF0;
    transform: scale(1.15);
}

/* Layout a Righe e Colonne (Table Layout) */
.section-row {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.col-55 {
    display: table-cell;
    width: 55%;
    vertical-align: middle;
    position: relative;
}
.col-45 {
    display: table-cell;
    width: 45%;
    vertical-align: middle;
    position: relative;
}
.col-60 {
    display: table-cell;
    width: 60%;
    vertical-align: middle;
    position: relative;
}
.col-40 {
    display: table-cell;
    width: 40%;
    vertical-align: middle;
    position: relative;
}

.bg-red {
    background-color: #660000;
    color: #FDFFF0;
}
.bg-yellow {
    background-color: #FDFFF0;
    color: #660000;
}

.text-container {
    padding: 100px 90px;
}
.text-container h2 {
    font-size: 30pt;
    margin-bottom: 25px;
    line-height: 35pt;
}
.image-container {
    background-size: cover;
    background-position: center;
    height: 100%;
    min-height: 750px;
}

.btn-group {
    margin-top: 30px;
}
.btn-group .btn {
    margin-right: 15px;
}

/* Footer Section */
footer {
    background-image: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('../img/img_footer.jpg');
    background-size: cover;
    background-position: center;
    color: #FDFFF0;
    padding: 50px 40px 40px 40px;
}
.footer-row {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-bottom: 40px;
}
.footer-col {
    display: table-cell;
    vertical-align: top;
}
.footer-col.right {
    text-align: left;
}
.footer-col p {
    font-size: 13pt;
    line-height: 20pt;
    margin: 0;
}
.social-icon {
    width: 26px;
    height: auto;
}
.footer-bottom {
    padding-top: 0px;
    text-align: center;
    font-size: 10pt;
    color: rgba(253, 255, 240, 0.6);
}

/* SMARTPHONE (Sotto i 640px di larghezza) */
@media (max-width: 640px) {
    h1, .hero h1 {
        font-size: 22pt;
        line-height: 26pt;
    }
    .text-container h2 {
        font-size: 22pt;
        line-height: 26pt;
    }
    p {
        font-size: 12pt;
    }
    
    header {
        padding: 10px 15px 25px 15px;
    }
    .header-logo img {
        width: 80px;
    }
    .nav-item {
        margin-left: 10px;
    }
    .btn {
        font-size: 9pt;
        padding: 7px 8px 5px 8px;
    }
    
    .hero-inner {
        bottom: 60px;
    }
    .slider-dots {
        bottom: 25px;
    }
    .text-container {
        padding: 40px 20px;
    }
    .image-container {
        height: 600px;
        min-height: 600px;
    }

    /* 1. Ripristiniamo esattamente il tuo fido layout a blocchi originale per tutto il sito */
    .section-row, .col-55, .col-45, .col-60, .col-40, .footer-row, .footer-col {
        display: block !important;
        width: 100% !important;
    }
    
    /* 2. Trasformiamo in FLEX isolato solo la sezione Atmosfera di Casa per capovolgere foto e testo */
    body > section:nth-of-type(3) {
        display: flex !important;
        flex-direction: column-reverse !important;
    }

    .footer-col {
        text-align: center !important;
        margin-bottom: 30px;
    }
    .footer-col.right {
        text-align: center !important;
    }
    .footer-col p {
        text-align: center !important;
    }
}

/* ==========================================================================
   5. EFFETTI DINAMICI DI SCROLL (INTERSECTION OBSERVER CSS)
   ========================================================================== */
.scroll-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-zoom {
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.scroll-zoom.visible {
    opacity: 1;
    transform: scale(1);
}