/* Variabili globali */
:root {
    --primary-color: #dcb36d; 
    --bg-dark: #0c0c0c; 
    --text-light: #ffffff;
    --text-muted: #e0e0e0;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

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

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* =======================================
   ACCESSIBILITA E GESTIONE TOCCO (MOBILE)
   ======================================= */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* Disabilita il "doppio tap per zoomare" sui pulsanti e rende il touch istantaneo */
a, button {
    touch-action: manipulation;
}

#open_preferences_center {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(220, 179, 109, 0.4);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

#open_preferences_center:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

/* Reset pulsanti nativi usati per accessibilità */
.current-lang, .menu-toggle {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* =======================================
   SFONDO GLOBALE FISSO
   ======================================= */
.global-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('assets/forno.webp') center/cover no-repeat;
    z-index: -10;
}

@media (max-width: 768px) {
    .global-bg {
        background: url('assets/forno_verticale.webp') center/cover no-repeat;
    }
}

.global-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 8, 8, 0.4); 
    z-index: -9;
}

/* =======================================
   ANIMAZIONI DINAMICHE
   ======================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* =======================================
   HEADER E MENU (GLASSMORPHISM SCURO FISSO)
   ======================================= */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(8, 8, 8, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: padding 0.3s ease, background 0.3s ease;
}

header.scrolled {
    padding: 12px 5%;
    background: rgba(5, 5, 5, 0.95);
    box-shadow: 0 4px 25px rgba(0,0,0,0.8);
}

.logo-container {
    display: flex;
    align-items: center;
    z-index: 1001; 
}

.site-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header-right-controls {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
    margin-right: 30px; 
}

/* =======================================
   SELETTORE LINGUE
   ======================================= */
.lang-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1002;
}

.current-lang {
    display: flex;
    align-items: center;
    padding: 5px;
    z-index: 2; 
}

.current-lang img {
    width: 24px;
    height: auto;
    border-radius: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.lang-dropdown:hover .current-lang img,
.lang-dropdown.active .current-lang img {
    transform: scale(1.1);
}

.lang-options {
    display: flex;
    gap: 12px;
    align-items: center;
    position: absolute;
    right: 100%; 
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    padding: 10px 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    background: rgba(15, 15, 15, 0.45); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.lang-dropdown:hover .lang-options,
.lang-dropdown.active .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-10px);
}

.lang-options a { display: flex; }
.lang-options img {
    width: 24px;
    height: auto;
    border-radius: 2px;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.lang-options a:hover img {
    opacity: 1;
    transform: scale(1.15);
}

/* MENU OVERLAY */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 998;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-toggle {
    display: none;
    color: var(--text-light);
    font-size: 1.8rem;
    z-index: 1001;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px; 
    font-weight: 600; 
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.4s;
}

nav a:hover {
    color: var(--primary-color);
}

.btn-menu-nav {
    background: var(--primary-color);
    color: var(--bg-dark) !important; 
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 2px;
    font-weight: 700;
}

.btn-menu-nav:hover {
    background: transparent;
    color: var(--primary-color) !important;
}

/* =======================================
   HERO 
   ======================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    padding-left: 10%;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin-top: 80px; 
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-weight: 700; 
    font-size: clamp(3rem, 5vw, 4.5rem); 
    margin-bottom: 25px;
    letter-spacing: -1px; 
    line-height: 1.1;
    text-transform: uppercase; 
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 45px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-color);
}

.btn-main {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 16px 45px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.4s ease;
    cursor: pointer;
    text-shadow: none;
}

.btn-main:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

/* =======================================
   EFFETTO VETRO E LAYOUT A GRIGLIA
   ======================================= */
.section {
    padding: 60px 20px; 
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.glass-panel {
    background: rgba(15, 15, 15, 0.45); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    padding: 60px 50px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08); 
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.solid-glass {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(25px); 
    -webkit-backdrop-filter: blur(25px);
}

.glass-title {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: clamp(1.6rem, 2.2vw, 2.2rem); 
    color: var(--primary-color);
    text-transform: uppercase; 
    text-align: center !important; 
    margin-bottom: 25px;
    line-height: 1.3;
}

.glass-title.left-align,
.editorial-text.left-align {
    text-align: left !important;
}

.panel-center {
    max-width: 1100px;
    margin: 0 auto; 
}

.editorial-text {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.9;
    text-align: center; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); 
}

/* SPLIT LAYOUT */
.glass-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.glass-split .glass-text,
.glass-split .glass-image {
    min-width: 0; 
}

.glass-split.reverse .glass-text { order: 2; }
.glass-split.reverse .glass-image { order: 1; }

.glass-image img,
.glass-image video {
    width: 100%;
    height: auto; 
    display: block;
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =======================================
   CAROSELLI - BLOCCATO ZOOM INVOLONTARIO
   ======================================= */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding-bottom: 50px;
    /* FIX MOBILE ZOOM: Permette lo scroll in giù/su ma blocca doppio-tap e pinch-zoom qui dentro */
    touch-action: pan-y; 
}

.carousel-track-container {
    overflow: hidden;
    flex: 1; 
    /* Rinforzo per sicurezza contro lo zoom */
    touch-action: pan-y; 
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-out;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6));
    user-select: none; 
    -webkit-user-drag: none;
}

.carousel-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 15px;
    z-index: 10;
    transition: transform 0.3s ease, color 0.3s ease;
}

.carousel-btn:hover {
    transform: scale(1.2);
    color: #ffffff;
}

.carousel-dots {
    position: absolute;
    bottom: 0; 
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.mini-carousel {
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0; 
}

.mini-carousel .carousel-slide {
    padding: 0; 
}

.mini-carousel .carousel-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 500px;
    border: none; 
    box-shadow: none;
    border-radius: 0;
}

.mini-carousel .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    padding: 10px 15px;
    background: rgba(0,0,0,0.5); 
    border-radius: 50%;
    color: var(--primary-color);
}

.mini-carousel .prev-btn { left: 10px; }
.mini-carousel .next-btn { right: 10px; }

.mini-carousel .carousel-dots {
    bottom: 15px; 
}

/* =======================================
   RICONOSCIMENTI PREMIUM 
   ======================================= */
.reviews-editorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: start;
}

.review-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(15, 15, 15, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 179, 109, 0.2); 
    border-radius: 12px;
    padding: 40px 30px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(220, 179, 109, 0.15);
}

.review-logo-wrapper {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    width: 100%;
}

.logo-gambero-fixed {
    width: 130px; 
    max-height: 100%; 
    object-fit: contain;
}

.quote-text-small {
    font-family: var(--font-body); 
    font-size: 1.15rem; 
    font-style: italic;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 30px;
}

.quote-text-small strong {
    font-weight: 700;
    color: var(--primary-color);
}

.quote-author-small {
    margin-top: auto; 
    font-size: 0.85rem; 
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.quote-author-small strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* =======================================
   BOX TV 
   ======================================= */
.tv-feature-block {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.tv-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; 
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tv-title-text {
    margin-bottom: 0 !important; 
}

.tv-logo {
    height: 140px; 
    width: auto;
    object-fit: contain;
}

.video-container {
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: flex;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* =======================================
   INFO E MAPPA
   ======================================= */
.info-editorial-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px; 
    align-items: stretch; 
}

.info-text-side {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-block {
    border-left: 1px solid var(--primary-color);
    padding-left: 20px;
}

.info-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.info-block p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.highlight {
    color: #ffffff !important;
    font-style: italic;
    margin-top: 5px;
}

.nav-apps {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.social-links-integrated {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.social-links-integrated a {
    color: var(--text-light);
    font-size: 1.4rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links-integrated a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.map-side {
    width: 100%;
    min-height: 350px; 
    filter: grayscale(80%) invert(100%) contrast(90%) hue-rotate(180deg);
    transform: translateZ(0); 
    will-change: filter;
    opacity: 0.8;
    transition: opacity 0.4s;
    border-radius: 8px;
    overflow: hidden; 
}

.map-side:hover {
    opacity: 1;
}

/* =======================================
   FOOTER 
   ======================================= */
footer p {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888888;
}

/* =======================================
   RESPONSIVE (SMARTPHONE E TABLET)
   ======================================= */
@media (max-width: 900px) {
    .glass-split {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .glass-title.left-align,
    .editorial-text.left-align {
        text-align: center !important;
    }
    
    .glass-split .glass-text { order: 2; }
    .glass-split .glass-image { order: 1; }
    .glass-split.reverse .glass-text { order: 2; }
    .glass-split.reverse .glass-image { order: 1; }

    .info-editorial-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .info-block {
        border-left: none;
        border-top: 1px solid var(--primary-color);
        padding-left: 0;
        padding-top: 20px;
        text-align: center;
    }

    .nav-apps, .social-links-integrated { justify-content: center; }
    .header-right-controls { margin-right: 0; }
}

@media (max-width: 768px) {
    .carousel-wrapper:not(.mini-carousel) .carousel-btn { display: none; }

    .lang-options {
        right: -5px;
        top: 100%; 
        margin-top: 20px;
        transform: translateY(-15px) translateX(0);
    }

    .lang-dropdown:hover .lang-options,
    .lang-dropdown.active .lang-options {
        transform: translateY(0) translateX(0);
    }

    .hero {
        padding-left: 20px;
        justify-content: center;
    }

    .hero-content { text-align: center; margin-top: 0; }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content p { font-size: 1rem; }
    .section { padding: 50px 15px; }
    .glass-panel { padding: 30px 15px; }
    
    .menu-toggle { display: block; }

    nav ul {
        position: absolute;
        top: 0;
        left: -100%; 
        width: 80%; 
        height: 100vh;
        background-color: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        justify-content: center;
        padding: 30px 0;
        gap: 25px;
        transition: left 0.4s ease;
        z-index: 999;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    nav ul.nav-active { left: 0; }
    
    .map-side { height: 300px; }
    .carousel-wrapper { flex-wrap: wrap; justify-content: center; }
    .carousel-track-container { order: 1; margin-bottom: 15px; }
    .tv-logo { height: 90px; }
}

@media (max-width: 375px) {
    .header-right-controls { gap: 15px; }
}
