/* ============================================
   RESET & REGOLE DI BASE
   Resetta i margini nativi dei browser per
   garantire coerenza tra le diverse piattaforme.
============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   HEADER / BARRA DI NAVIGAZIONE
   Mantiene la navigazione fissa in alto con un 
   effetto sfocato (backdrop-filter) per un look premium.
============================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

header.scrolled .logo img {
    max-height: 55px; /* Logo si rimpicciolisce allo scroll */
}

header.scrolled .header-inner {
    padding: 10px 30px;
    gap: 10px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    flex-direction: column; /* Layout verticale: Logo sopra, Menu sotto */
    align-items: center;
    gap: 15px;
}

/* Wrapper per raggruppare i link e lo switch lingua sotto il logo */
.nav-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    height: auto;
    width: auto;
    max-height: 75px;
    transition: max-height 0.4s ease;
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #2c2c2c;
    letter-spacing: 1px;
}

.logo-text span {
    display: block;
    font-size: 0.65rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #8a7968;
    margin-top: -2px;
}

/* Navigazione principale */
nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #555;
    position: relative;
    padding: 5px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #8a7968;
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: #8a7968;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Menu Hamburger (all'interno del wrapper) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    position: absolute;
    right: 0;
}

.hamburger span {
    width: 28px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Selettore Lingua */
.lang-switch {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 20px;
}

.lang-switch a {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    padding: 3px 6px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.lang-switch a.active,
.lang-switch a:hover {
    color: #8a7968;
    background: rgba(138, 121, 104, 0.1);
}

/* ============================================
   HERO SLIDER (FULLSCREEN)
   Slider a tutto schermo con effetto Ken Burns
   (zoom lento e progressivo delle immagini).
============================================ */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin-top: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1); /* Stato iniziale */
}

/* Animazione Ken Burns per lo zoom lento */
@keyframes kenBurnsEffect {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.15);
    }
}

/* Quando la slide è attiva o in uscita, esegue l'animazione zoom */
.slide.active img,
.slide.exiting img {
    animation: kenBurnsEffect 7.2s ease-out forwards;
}

/* Overlay sfumato per migliorare la leggibilità del testo */
.slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    z-index: 3;
}

/* Testo in sovrapposizione allo slider */
.hero-overlay {
    position: absolute;
    bottom: 80px;
    left: 60px;
    z-index: 10;
    color: #fff;
    max-width: 600px;
}

.hero-overlay h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.hero-overlay p {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.9;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* Indicatori di posizione del carosello (Puntini) */
.slider-dots {
    position: absolute;
    bottom: 30px;
    right: 60px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.slider-dots .dot.active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.1);
}

.slider-dots .dot:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.5);
}

/* Frecce di navigazione */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.slider-arrow.prev {
    left: 25px;
}

.slider-arrow.next {
    right: 25px;
}

/* Indicatore di scorrimento (Mouse/Freccia) */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 1.2rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-8px);
    }

    60% {
        transform: translateX(-50%) translateY(-4px);
    }
}

/* ============================================
   SEZIONI GENERICHE E ANIMAZIONI COMPARSATA
============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Sezione Chi Sono (Profilo) */
.section {
    padding: 100px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 15px;
    color: #2c2c2c;
}

.section-subtitle {
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #8a7968;
    margin-bottom: 50px;
}

.section-line {
    width: 60px;
    height: 1.5px;
    background: #8a7968;
    margin: 0 auto 50px;
}

/* Griglia profilo */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.about-image:hover img {
    transform: scale(1.03);
}

.about-text h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #2c2c2c;
}

.about-text p {
    font-size: 0.95rem;
    line-height: 1.9;
    color: #666;
    margin-bottom: 15px;
}

.about-text blockquote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: #8a7968;
    border-left: 3px solid #8a7968;
    padding-left: 20px;
    margin: 25px 0;
    line-height: 1.6;
}

.btn-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8a7968;
    border-bottom: 1.5px solid #8a7968;
    padding-bottom: 3px;
    transition: all 0.3s ease;
}

.btn-link:hover {
    color: #6b5d4e;
    border-color: #6b5d4e;
}

/* ============================================
   GALLERIA (ANTEPRIMA OPERE)
============================================ */
.gallery-section {
    background: #f8f6f3;
    padding: 100px 30px;
}

.gallery-section .section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    padding-bottom: 100%; /* Fallback 1:1 per browser senza aspect-ratio */
    cursor: pointer;
}

@supports (aspect-ratio: 1 / 1) {
    .gallery-item {
        padding-bottom: 0;
        aspect-ratio: 1 / 1;
    }
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
    z-index: 2;
}

.gallery-item:hover::before {
    background: rgba(0, 0, 0, 0.25);
}

.gallery-item .gallery-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 3;
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-overlay span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Sezioni genericamente configurate per la griglia */

/* ============================================
   INVITO ALL'AZIONE (CTA) / CONTATTI
============================================ */
.cta-section {
    padding: 100px 30px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #2c2c2c;
}

.cta-section p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 14px 40px;
    background: #8a7968;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #6b5d4e;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(138, 121, 104, 0.3);
}

/* ============================================
   FOOTER
============================================ */
footer {
    background: #2c2c2c;
    color: #ccc;
    padding: 60px 30px 30px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 400;
}

.footer-col p,
.footer-col a {
    font-size: 0.85rem;
    line-height: 1.8;
    color: #aaa;
}

.footer-col a:hover {
    color: #d4c5b3;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #aaa;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: #fff;
    border-color: #8a7968;
    background: #8a7968;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.75rem;
    color: #777;
}

/* ============================================
   RESPONSIVE (ADATTAMENTO MOBILE)
============================================ */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }


    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .hero-overlay h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s ease;
    }

    nav ul.open {
        right: 0;
    }

    nav ul li a {
        font-size: 1rem;
    }

    .header-inner {
        padding: 10px 20px;
        gap: 10px;
    }

    .logo img {
        max-height: 50px; /* Ridotto su mobile, si ridimensiona proporzionalmente */
    }

    .nav-wrapper {
        justify-content: center;
    }

    .hamburger {
        display: flex;
        position: absolute; /* Rimosso static per tornare a absolute */
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .lang-switch {
        display: none;
    }

    .hero-overlay {
        left: 30px;
        right: 30px;
        bottom: 60px;
    }

    .hero-overlay h1 {
        font-size: 2rem;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
    }

    .slider-arrow.prev {
        left: 10px;
    }

    .slider-arrow.next {
        right: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}
