/* ==========================================================================
   1. EB GARAMOND
   ========================================================================== */

/* EB Garamond - 500 Italic (Hero Home) */
@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/eb-garamond-v32-latin-500italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* EB Garamond - 400 Regular (Testi e Input) */
@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/eb-garamond-v32-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* EB Garamond - 500 Medium (Enfasi e Titoli minori) */
@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/eb-garamond-v32-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* EB Garamond - 400 Italic (Descrizioni e Citazioni) */
@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/eb-garamond-v32-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   2. PLAYFAIR DISPLAY
   ========================================================================== */


/* Playfair Display - 400 Regular */
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-v40-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Playfair Display - 400 Italic */
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-v40-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Playfair Display - 500 Medium */
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-v40-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Playfair Display - 600 SemiBold */
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-v40-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   3. CINZEL
   ========================================================================== */
@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/cinzel-v26-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/cinzel-v26-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   4. CORMORANT SC
   ========================================================================== */

@font-face {
  font-family: 'Cormorant SC';
  src: url('/fonts/cormorant-sc-v19-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant SC';
  src: url('/fonts/cormorant-sc-v19-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant SC';
  src: url('/fonts/cormorant-sc-v19-latin-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   5. CORMORANT GARAMOND
   ========================================================================== */

/* Cormorant Garamond - 300 Light (Identity Page / Testi secondari) */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-v21-latin-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Cormorant Garamond - 400 Regular (Dialoghi / Corpo del testo) */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-v21-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Cormorant Garamond - 400 Italic (Enfasi / Poet Dogma) */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-v21-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}


html {
    -webkit-text-size-adjust: 100%;
}
/*BARRA SUPERIORE*/

.top-bar {
  top: 0;
  left: 0;
  width: 100%;
  /* Altezza adattiva: leggermente più bassa su mobile per non rubare spazio */
  height: clamp(60px, 8vh, 75px); 
  
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  
  /* Estetica: Nero profondo ma con una leggera trasparenza e sfocatura */
  backdrop-filter: blur(10px); /* Effetto vetro smerigliato premium */
  -webkit-backdrop-filter: blur(10px); /* Supporto Safari */
  
  border-bottom: 1px solid rgba(165, 128, 25, 0.15); /* Linea dorata impercettibile */
  
  pointer-events: none; 
  padding: 0 15px;
  box-sizing: border-box;
}


.top-bar, .navbar { 
    position: fixed; /* o relative/absolute, purché sia definito */
    z-index: 1000 !important; 
    background-color: rgba(0, 0, 0, 0.85);  /* Deve essere coprente per nascondere il menu che sta "sotto" */
}



.navbar {
  top: 0;
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: center; /* Cambiato per allineare tutto rispetto al centro */
  align-items: center;

  padding: 0 20px;
  box-sizing: border-box;
}

.nav-section {
  display: flex;
  /* Corretto: gap di 30px su desktop che scende a 15px su schermi piccoli */
  gap: clamp(15px, 2vw, 30px); 
  pointer-events: auto;
  transition: transform 0.8s ease, opacity 0.8s ease;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.nav-left {
  /* Si ancora a sinistra del centro (50%) più lo spazio per il logo */
  right: calc(50% + clamp(50px, 8vw, 80px)); 
}

.nav-right {
  /* Si ancora a destra del centro (50%) più lo spazio per il logo */
  left: calc(50% + clamp(50px, 8vw, 80px));
}

.nav-section a {
  color: #a58019;
  text-decoration: none;
  font-family: 'Cormorant SC', serif !important; /* Cambiato 'sans-serif' in 'serif' per coerenza */
  -webkit-font-smoothing: antialiased; /* Forza il rendering fluido su iOS */
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400; /* Assicurati di dichiarare il peso esplicitamente */
  font-style: normal;
  /* Font leggermente più grande su mobile per leggibilità (min 12px) */
  font-size: clamp(12px, 1.2vw, 14px);
  letter-spacing: 2px;
  transition: opacity 0.3s, letter-spacing 0.3s;
  white-space: nowrap; /* Impedisce al testo di andare a capo */
}





/* Logo centrato assolutamente */
.logo-container {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -47%);
  height: clamp(100px, 20vw, 120px);
  width: clamp(100px, 20vw, 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
  transition: transform 0.6s ease-in-out;
  overflow: hidden;
  pointer-events: none;
}

.logo-wrapper {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 93px;
  height: 93px;
  overflow: hidden;
  border-radius: 50%;
  pointer-events: auto;
  z-index: 10;
  cursor: pointer;
}


.logo-glow {
  position: relative;
  width: 100%;
  height: 100%;
}

.logo-container svg {
  overflow: hidden;
  display: block;
  max-width: 100%;
  pointer-events: none;
  
}

.logo {
  width: 100%;
  height: 100%;
  z-index: 2;
  position: relative;
  
}

.shine {
  position: absolute;
  top: 0;
  left: -150%;
  width: 300%;
  height: 100%;
  background: linear-gradient(
    120deg, 
    transparent, 
    rgba(255, 255, 255, 0.15), /* Ridotto leggermente per eleganza */
    transparent
  );
  /* Utilizziamo will-change per attivare l'accelerazione hardware */
  will-change: transform;
  animation: shine 4s infinite linear;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

.top-bar {
  position: fixed; /* O absolute, a seconda del tuo design */
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.6s ease, padding 0.3s ease;
  /* Importante per il lusso: impedisce che il testo vada sotto il notch degli iPhone */
  padding-top: env(safe-area-inset-top); 
}


/* Icona menu */
.menu-btn {
  position: fixed;
  top: 28px;
  left: clamp(8px, 2vw, 15px);
  transform: translateY(-50%);
  z-index: 2000;
  
  /* Dimensione identica alla lingua */
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

/* Hover bilanciato con il tuo translateY */
.menu-btn:hover {
  transform: translateY(-50%) scale(1.1);
  background: rgba(255, 255, 255, 0.05);
}

/* Stato quando il menu è aperto (Icona ruotata) */
.menu-btn.is-open {
  transform: translateY(-50%) rotate(90deg);
}

/* Hover quando è aperto (mantiene rotazione e scala) */
.menu-btn.is-open:hover {
  transform: translateY(-50%) rotate(90deg) scale(1.1);
}

.menu-btn svg {
  /* Dimensione icona proporzionale al contenitore */
  width: 60%;
  height: 60%;
  fill: white;
  pointer-events: none;
}

/* --- LA TENDINA (Verifica i nomi) --- */
#fullScreenMenu {
    position: fixed;
    top: 60px; /* Altezza della tua barra */
    left: 0;
    width: 100vw;
    height: auto;
    background-color: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(10px); /* Effetto vetro satinato modernissimo */
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid #d4af37;
    padding: 20px 0;
    
    /* LIVELLO INFERIORE ALLA TOP-BAR */
    z-index: 999 !important; 

    /* EFFETTO TRANSIZIONE (SCIVOLAMENTO) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%); /* Lo sposta tutto verso l'alto, dietro la barra */
    transition: transform 0.5s ease, opacity 0.4s ease;
}

/* Quando il menu è attivo */
#fullScreenMenu.active {
    display: flex !important; /* Deve essere sempre flex o block se lo avevi così */
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Torna nella sua posizione naturale scivolando giù */
}

#fullScreenMenu.active {
    display: block !important; /* Lo mostra al click */
}


/* Sistemiamo i link che ora sono giganti e a sinistra */
#fullScreenMenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    width: 100%;
}

#fullScreenMenu ul li {
    margin: 15px 0; /* Spazio tra le voci */
}

#fullScreenMenu ul li a {
    color: #d4af37 !important; /* Oro */
    text-decoration: none;
    font-size: 1.5rem; /* Dimensione umana, non gigante */
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: serif;
}

#fullScreenMenu ul li a:hover {
    color: #ff0000; /* Colore al passaggio del mouse */
}

/* Gestione dei link: da Verticali a Orizzontali */
.menu-content {
    display: flex;
    flex-direction: row; /* Orizzontale su Desktop */
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 90%; /* Evita che i link tocchino i bordi */
    margin: 0 auto;
}

.menu-content a {
    color: #d4af37 !important;
    text-decoration: none;
    font-size: 0.9rem !important; /* Più piccolo è più sofisticato */
    text-transform: uppercase;
    letter-spacing: 5px; /* Molto spazio tra le lettere */
    font-family: 'Cormorant SC', serif;
    font-weight: 300; /* Tratto sottile */
    white-space: nowrap;
    transition: all 0.3s ease;
}

.menu-content a:hover {
    color: #ffffff !important;
    transform: translateY(-2px); /* Piccolo movimento verso l'alto al passaggio */
}

.menu-btn:hover svg {
    transform: scale(1.2); /* L'icona cresce... */
    transition: transform 0.3s ease;
}

.menu-btn {
    /* Lascia qui i tuoi stili che posizionano l'icona */
    border: none;
    background: transparent;
    cursor: pointer;
}




/* Contenitore principale della lingua */

.language-switcher {
  position: fixed;
  top: 28px; /* Allineato al tema */
  right: clamp(8px, 2vw, 15px); /* Speculare al tema */
  
  /* Usiamo lo stesso clamp del tema */
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  
  z-index: 2000;
  cursor: pointer;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  transform: translateY(-50%);
  pointer-events: auto;
}


.language-switcher:hover {
  /* Manteniamo il centramento verticale E aggiungiamo l'ingrandimento */
  transform: translateY(-50%) scale(1.1);
}

.language-switcher svg {
  width: 70%;
  height: 70%;
  fill: white;
  display: block;
}

/* MODIFICA: Il menu a tendina */
.language-menu {
  display: none; /* Nasconde di base */
  position: absolute;
  /* Lo spostiamo sotto l'icona */
  top: 110%; 
  right: 0;
  
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #a58019;
  border-radius: 10px;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
  min-width: 140px; /* Un po' più largo per l'eleganza */
  overflow: hidden; /* Taglia i bordi dei div interni per rispettare il border-radius */
}

.language-menu.show {
  display: block !important;
}

/* Ottimizzazione voci menu */
.language-menu div {
  padding: 12px 20px;
  color: white;
  font-family: 'Cormorant SC', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center; /* Più ordinato */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-menu div:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #a58019; /* Una sottile lama d'oro a sinistra */
  padding-left: 17px; /* Compensa lo spessore del bordo per non muovere il testo */
  color: #a58019;
}

.language-menu div:first-child {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.language-menu div:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.universal-footer {
    padding: 60px 20px 40px; /* Aggiunto 20px ai lati per non far toccare i bordi su mobile */
    text-align: center;
    background: transparent;
    width: 100%;
    box-sizing: border-box; /* Essenziale per calcolare correttamente il padding */
}

.universal-footer p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1.8; /* Aumentato per dare respiro se il testo va su due righe */
    margin: 0;
    display: inline-block; /* Permette una gestione migliore dello spazio */
}



/* ============================================================
   9. RESPONSIVE DESIGN (UNIFICATO & OTTIMIZZATO)
   ============================================================ */

/* --- TABLET E SCHERMI MEDI (Sotto 1100px / 992px) --- */
@media (max-width: 1100px) {
    .luxury-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .tech-specs {
        border-left: none;
        border-top: 1px solid rgba(212, 175, 55, 0.15);
        padding-left: 0;
        padding-top: 40px;
    }
    .philosophy-block {
        column-count: 1;
    }
}

@media (max-width: 992px) {
    .menu-content {
        gap: 20px;
    }
}

/* --- MOBILE GENERALE (Sotto 768px) --- */
@media (max-width: 768px) {
    
    /* 1. Struttura Immersiva & Video Background */
    .artwork-page-container {
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        background-color: #000;
        -webkit-overflow-scrolling: touch;
    }

    .video-background-layer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    /* 2. Top-Bar & Navbar (Il fix per le icone ferme) */
    .top-bar {
        background-color: rgba(0, 0, 0, 0.95) !important;
        height: 60px !important;
        padding: 10px 15px !important;
        position: fixed !important;
        z-index: 1000;
    }

    .navbar {
        height: 60px !important;
        padding: 0 5px !important;
    }

    /* Icone laterali bloccate con la tua formula originale */
    .menu-btn, .language-switcher {
        position: fixed !important;
        top: max(3.2%, 29px) !important; 
        width: 40px !important;
        height: 40px !important;
        background: rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: blur(4px) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 2000 !important;
    }

    .menu-btn { left: 10px !important; }
    .language-switcher { 
        right: 10px !important; 
        transform: translateY(-50%) !important; 
    }

    /* 3. Logo & Link (Fix per non far sparire le scritte) */
    .logo-container {
        height: 80px !important;
        width: 80px !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        position: absolute !important;
    }

    .logo-wrapper {
        width: 65px !important;
        height: 65px !important;
    }

    .nav-section {
        gap: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        display: flex !important;
    }

    .nav-left {
        right: calc(50% + 42px) !important; /* Spazio di sicurezza dal logo */
        left: auto !important;
    }

    .nav-right {
        left: calc(50% + 42px) !important;
        right: auto !important;
    }

    .nav-section a {
        font-size: 10px !important;
        letter-spacing: 1px !important;
        white-space: nowrap !important;
        color: #d4af37 !important;
    }

    /* 4. Menu Full Screen (Tendina) */
    #fullScreenMenu {
        top: 60px !important;
        padding: 40px 0 !important;
    }

    .menu-content {
        flex-direction: column !important;
        gap: 25px !important;
    }

    .menu-content a {
        font-size: 1.3rem !important;
        white-space: normal !important;
        text-align: center;
    }

    /* 5. Info Box & Dettagli Opera */
    .artwork-content-overlay {
        position: relative;
        z-index: 2;
        padding: 100px 20px 40px 20px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .info-box {
        display: block !important;
        width: 95% !important;
        margin: 0 auto 40px auto !important;
        padding: 25px;
        text-align: center;
        opacity: 1 !important;
        transform: none !important;
        border-left: none;
        border-bottom: 2px solid rgba(212, 175, 55, 0.4);
    }

    .luxury-details, .acquisition-section {
        position: relative;
        z-index: 2;
        padding: 60px 20px;
        background: #000;
    }
}

/* --- SMARTPHONE STRETTI (Sotto 430px / 390px) --- */
@media (max-width: 430px) {
    /* Avviciniamo ancora di più i link al logo per salvarli dai bordi icone */
    .nav-left { right: calc(50% + 38px) !important; }
    .nav-right { left: calc(50% + 38px) !important; }
    
    .nav-section a {
        font-size: 9px !important;
        letter-spacing: 0.5px !important;
    }
}

@media (max-width: 390px) {
    /* Su schermi minuscoli tipo iPhone SE, riduciamo le icone per non coprire i link */
    .menu-btn, .language-switcher {
        width: 35px !important;
        height: 35px !important;
    }
    .nav-section { gap: 5px !important; }
}

/* Ottimizzazione per Mobile */
@media (max-width: 600px) {
    .universal-footer {
        padding: 40px 15px 30px;
    }

    .universal-footer p {
        font-size: 0.6rem; /* Leggermente più piccolo per stare in una riga sola più a lungo */
        letter-spacing: 0.15em; /* Riduce l'espansione per guadagnare spazio orizzontale */
    }

    .universal-footer p span {
        display: block; /* Forza il "Tutti i diritti riservati" ad andare a capo su schermi molto piccoli */
        margin-top: 5px;
    }
}