/* CSS estratto identico dall'originale index-futuro.html */

  /* ═══════════════════════════════════════
     RESET E VARIABILI GLOBALI
  ═══════════════════════════════════════ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --nero:       #0a0a0a;   /* Sfondo principale */
    --scuro:      #111111;   /* Sfondo secondario (nav drawer, footer) */
    --verde:      #2ecc71;   /* Colore primario brand */
    --verde-dim:  #1a7a44;   /* Verde attenuato per effetti */
    --rosso:      #e74c3c;   /* Accento rosso brand */
    --bianco:     #f5f5f0;   /* Testo principale */
    --grigio:     #888;      /* Testo secondario */

    /* Altezza del banner lingua — usata per spostare l'header */
    --banner-h:   40px;
  }

  html { scroll-behavior: smooth; }

  body {
    background: var(--nero);
    color: var(--bianco);
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
  }

  /* ═══════════════════════════════════════
     TEXTURE NOISE DI SFONDO
     Aggiunge grana visiva per profondità
  ═══════════════════════════════════════ */
  body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
  }

  /* ═══════════════════════════════════════
     BANNER LINGUA
     Appare sopra l'header dopo 800ms.
     Su mobile: compatto, una riga, non
     sovrappone l'header grazie a z-index
     e alla classe .with-banner sull'header.
  ═══════════════════════════════════════ */
  #lang-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 400; /* Sopra l'header (z-index 100) */
    background: rgba(12,12,12,0.95);
    border-bottom: 1px solid rgba(46,204,113,0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0 1rem;
    height: var(--banner-h);
    font-size: 0.8rem;
    flex-wrap: nowrap; /* Evita il wrapping che causa overlap su mobile */
    /* Banner nascosto inizialmente — scivola dall'alto */
    transform: translateY(-110%);
    transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
    overflow: hidden;
  }
  #lang-banner.visibile { transform: translateY(0); }

  #lang-banner-testo {
    color: rgba(245,245,240,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
  }

  .lang-btn-gruppo { display: flex; gap: 0.35rem; flex-shrink: 0; }

  /* Pulsanti per cambio lingua nel banner */
  .lang-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--bianco);
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    font-size: 0.75rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    line-height: 1.5;
    white-space: nowrap;
  }
  .lang-btn:hover  { background: var(--verde); border-color: var(--verde); color: #000; }
  .lang-btn.attivo { background: var(--verde); border-color: var(--verde); color: #000; font-weight: 600; }

  /* Pulsante chiudi banner */
  #lang-banner-chiudi {
    background: none; border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer; font-size: 1rem;
    padding: 0.2rem 0.3rem;
    transition: color 0.2s;
    flex-shrink: 0;
    line-height: 1;
  }
  #lang-banner-chiudi:hover { color: var(--bianco); }

  /* Su mobile piccolo nascondo il testo per non sovraffollare */
  @media (max-width: 480px) {
    #lang-banner-testo { display: none; }
    #lang-banner { justify-content: space-between; padding: 0 0.8rem; }
  }

  /* ═══════════════════════════════════════
     HEADER
     Fixed in cima. Quando il banner è
     visibile, si sposta sotto di esso
     tramite la classe .con-banner.
  ═══════════════════════════════════════ */
  header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 2.5rem;
    background: rgba(10,10,10,0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(46,204,113,0.15);
    /* La transizione su "top" permette lo scivolamento fluido sotto il banner */
    transition: padding 0.3s ease, top 0.5s cubic-bezier(0.22,1,0.36,1);
  }
  /* Quando il banner è visibile, l'header scende sotto di esso */
  header.con-banner { top: var(--banner-h); }
  /* Versione compatta dopo lo scroll */
  header.scrolled   { padding: 0.6rem 2.5rem; }

  /* ── LOGO SVG NELL'HEADER ── */
  .logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
  }
  /* Il logo SVG nell'header è alto 44px su desktop */
  .logo-link svg { height: 44px; width: auto; transition: opacity 0.2s; }
  .logo-link:hover svg { opacity: 0.82; }

  /* ─────────────────────────────────────────
     LOGO SVG — ISTRUZIONI PER LA SOSTITUZIONE
     ─────────────────────────────────────────
     Il logo attuale è generato come SVG inline (testo + forme).
     Per sostituirlo con il tuo file logo reale hai due opzioni:

     OPZIONE A — File SVG esterno:
       Sostituisci l'intero <svg>...</svg> con:
       <img src="logo.svg" alt="BigBag Smart" width="auto" height="44">

     OPZIONE B — File PNG/WebP:
       <img src="logo.png" alt="BigBag Smart" height="44"
            style="height:44px;width:auto;">

     Usa height="44" nell'header e height="36" nel footer.
     ───────────────────────────────────────── -->

  /* ═══════════════════════════════════════
     BURGER MENU
     Le 3 linee si trasformano in X quando
     il menu è aperto
  ═══════════════════════════════════════ */
  .burger {
    width: 36px; height: 24px;
    display: flex; flex-direction: column; justify-content: space-between;
    cursor: pointer; background: none; border: none;
    padding: 0; z-index: 200;
  }
  .burger span {
    display: block; height: 2px; background: var(--bianco);
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.35s ease, background 0.3s;
  }
  .burger:hover span { background: var(--verde); }
  /* Animazione X quando aperto */
  .burger.aperto span:nth-child(1) { transform: translateY(11px) rotate(45deg);  background: var(--rosso); }
  .burger.aperto span:nth-child(2) { opacity: 0; }
  .burger.aperto span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); background: var(--rosso); }

  /* ═══════════════════════════════════════
     NAV DRAWER (menu laterale)
     Scivola da destra. L'overlay scuro
     chiude il menu al click fuori.
  ═══════════════════════════════════════ */
  .nav-drawer {
    position: fixed; top: 0; right: -100%;
    width: min(340px, 100vw); height: 100vh;
    background: var(--scuro);
    border-left: 1px solid rgba(46,204,113,0.2);
    z-index: 150;
    display: flex; flex-direction: column; justify-content: center;
    padding: 4rem 3rem;
    transition: right 0.45s cubic-bezier(0.77,0,0.18,1);
  }
  .nav-drawer.aperto { right: 0; }

  /* Overlay semitrasparente dietro il drawer */
  .nav-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 140;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-overlay.aperto { opacity: 1; pointer-events: all; }

  /* Logo nel drawer */
  .nav-drawer .logo-nav {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-drawer .logo-nav svg { height: 36px; width: auto; }

  /* Voci di menu nel drawer */
  .nav-drawer a {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem; letter-spacing: 0.1em;
    color: var(--bianco); text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s, padding-left 0.25s;
  }
  .nav-drawer a:hover { color: var(--verde); padding-left: 0.6rem; }

  /* ═══════════════════════════════════════
     HERO SECTION
  ═══════════════════════════════════════ */
  .hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; text-align: center;
    padding: 9rem 2rem 5rem;
    position: relative; overflow: hidden;
  }

  /* Sfondo con gradienti radiali animati */
  .hero-bg {
    position: absolute; inset: 0;
    background:
      radial-gradient(ellipse 60% 50% at 50% 60%, rgba(46,204,113,0.07) 0%, transparent 70%),
      radial-gradient(ellipse 40% 30% at 80% 20%, rgba(231,76,60,0.06) 0%, transparent 60%);
    animation: respira 8s ease-in-out infinite;
  }
  @keyframes respira {
    0%,100% { opacity: 0.7; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.04); }
  }

  /* Etichetta soprattitolo */
  .hero-etichetta {
    font-size: 0.75rem; letter-spacing: 0.35em;
    text-transform: uppercase; color: var(--verde);
    margin-bottom: 1.5rem;
    opacity: 0; animation: saliSu 0.8s 0.2s ease forwards;
  }

  /* Titolo principale H1 */
  .hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 9vw, 7rem);
    line-height: 0.92; letter-spacing: 0.04em;
    color: var(--bianco); margin-bottom: 2.5rem;
    opacity: 0; animation: saliSu 0.8s 0.4s ease forwards;
  }
  .hero h1 em     { font-style: normal; color: var(--verde); }
  .hero h1 strong { font-weight: 400;   color: var(--rosso); }

  /* ═══════════════════════════════════════
     VETRINA PRODOTTO
     Contenitore dell'immagine del porta big bag.
     L'immagine reale viene ridimensionata con
     object-fit: cover mantenendo le proporzioni.
  ═══════════════════════════════════════ */
  .prodotto-vetrina {
    position: relative;
    /* Larghezza massima 420px, adattabile al viewport */
    width: min(420px, 88vw);
    margin: 0 auto 3.5rem;
    opacity: 0; animation: saliSu 0.9s 0.65s ease forwards;
  }

  /* Alone verde sotto il prodotto (effetto luce) */
  .prodotto-vetrina::after {
    content: '';
    position: absolute;
    bottom: -22px; left: 12%; right: 12%;
    height: 44px;
    background: radial-gradient(ellipse, rgba(46,204,113,0.2) 0%, transparent 70%);
    filter: blur(12px);
    z-index: 0;
    pointer-events: none;
  }

  /* Cornice dell'immagine */
  .prodotto-cornice {
    position: relative; z-index: 1;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(46,204,113,0.22);
    background: rgba(20,20,20,0.6);
    /* Proporzione quadrata per immagine 1080x1080 */
    aspect-ratio: 1 / 1;
    /* Dimensioni fisse per forzare il contenimento dell'immagine */
    width: 100%;
    transition: transform 0.65s cubic-bezier(0.34,1.2,0.64,1), border-color 0.4s;
  }
  .prodotto-cornice:hover {
    transform: scale(1.025) translateY(-7px);
    border-color: rgba(46,204,113,0.45);
  }

  /* ─────────────────────────────────────────
     IMMAGINE REALE DEL PRODOTTO
     L'img deve avere width e height al 100%
     con object-fit: cover per riempire la
     cornice senza deformarsi.
     Quando hai più immagini da far ruotare,
     vedi la sezione SLIDESHOW più in basso.
  ─────────────────────────────────────────── */
  .prodotto-cornice img {
    display: block;
    width: 100%;       /* Occupa tutta la larghezza della cornice */
    height: 100%;      /* Occupa tutta l'altezza della cornice */
    object-fit: cover; /* Ritaglia mantenendo le proporzioni — non deforma */
    object-position: center;
  }

  /* ─────────────────────────────────────────
     SLIDESHOW AUTOMATICO — COMMENTATO
     Per attivarlo in futuro:
     1. Rimuovi i commenti da questo blocco CSS
     2. Aggiungi le immagini nell'HTML con classe .slide
     3. Rimuovi i commenti dal blocco JS "SLIDESHOW"
     ─────────────────────────────────────────

  .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.9s ease-in-out;
    display: block;
  }
  .slide.attiva {
    opacity: 1;
  }
  .prodotto-cornice {
    position: relative;
  }

  ─────────────────────────────────────────── */

  /* Badge brevetto sovrapposto all'immagine */
  .brevetto-badge {
    position: absolute; top: 13px; right: 13px;
    background: rgba(8,8,8,0.8);
    border: 1px solid rgba(46,204,113,0.5);
    border-radius: 999px;
    padding: 0.3rem 0.78rem;
    font-size: 0.66rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--verde);
    backdrop-filter: blur(6px); z-index: 2;
  }

  /* Freccia animata in basso nella hero */
  .hero-freccia {
    position: absolute; bottom: 2.5rem; left: 50%;
    transform: translateX(-50%);
    width: 1px; height: 60px;
    background: linear-gradient(to bottom, transparent, var(--verde));
    animation: frecciaPolso 2s ease-in-out infinite;
  }
  @keyframes frecciaPolso {
    0%,100% { opacity: 0.3; transform: translateX(-50%) scaleY(1); }
    50%      { opacity: 1;   transform: translateX(-50%) scaleY(1.15); }
  }
  @keyframes saliSu {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ═══════════════════════════════════════
     SEZIONE BANDIERE
  ═══════════════════════════════════════ */
  .sezione-bandiere {
    padding: 6rem 2rem;
    text-align: center;
    position: relative; z-index: 1;
  }
  .etichetta-sezione {
    font-size: 0.72rem; letter-spacing: 0.35em;
    text-transform: uppercase; color: var(--verde); margin-bottom: 1rem;
  }
  .sezione-bandiere h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.08em; margin-bottom: 1rem; color: var(--bianco);
  }
  .sezione-bandiere .sottotitolo {
    color: rgba(245,245,240,0.5); font-size: 1rem; margin-bottom: 4rem;
  }

  /* Griglia delle card bandiere — auto-adattiva */
  .griglia-bandiere {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem; max-width: 960px; margin: 0 auto;
  }

  /* Card singola bandiera */
  .card-bandiera {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--bianco);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px; padding: 2.5rem 1.5rem 2rem;
    transition:
      transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
      border-color 0.3s, background 0.3s, box-shadow 0.3s;
    position: relative; overflow: hidden; cursor: pointer;
  }
  /* Barra colorata in basso che appare all'hover */
  .card-bandiera::before {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; transform: scaleX(0); transition: transform 0.35s ease;
  }
  .card-bandiera:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  }
  .card-bandiera:hover::before { transform: scaleX(1); }

  /* Card della lingua rilevata — evidenziata con bordo verde */
  .card-bandiera.rilevata {
    border-color: rgba(46,204,113,0.45);
    background: rgba(46,204,113,0.05);
    box-shadow: 0 0 0 2px rgba(46,204,113,0.12), 0 16px 50px rgba(0,0,0,0.35);
  }

  /* Colori della barra per ogni nazione */
  .card-bandiera.it::before { background: linear-gradient(90deg, #009246, #ffffff, #ce2b37); }
  .card-bandiera.en::before { background: linear-gradient(90deg, #012169, #ffffff, #c8102e); }
  .card-bandiera.ru::before { background: linear-gradient(90deg, #ffffff, #0039A6, #D52B1E); }
  .card-bandiera.zh::before { background: linear-gradient(90deg, #DE2910, #FFDE00, #DE2910); }

  /* Badge "La tua lingua" sulla card rilevata */
  .badge-rilevato {
    position: absolute; top: 12px; left: 12px;
    background: var(--verde); color: #000;
    font-size: 0.6rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase;
    padding: 0.22rem 0.6rem; border-radius: 999px;
    opacity: 0; transform: scale(0.8);
    transition: opacity 0.4s 0.2s, transform 0.4s 0.2s;
  }
  .card-bandiera.rilevata .badge-rilevato { opacity: 1; transform: scale(1); }

  /* Emoji bandiera */
  .emoji-bandiera {
    font-size: 5rem; line-height: 1; margin-bottom: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
    display: block;
  }
  .card-bandiera:hover .emoji-bandiera { transform: scale(1.18) rotate(-3deg); }

  .nome-lingua {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem; letter-spacing: 0.1em; margin-bottom: 0.3rem;
  }
  .desc-lingua { font-size: 0.82rem; color: rgba(245,245,240,0.45); letter-spacing: 0.05em; }

  /* Testo "Guarda il video →" che appare all'hover */
  .cta-card {
    margin-top: 1.2rem; font-size: 0.75rem; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--verde);
    display: flex; align-items: center; gap: 0.4rem;
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.3s, transform 0.3s;
  }
  .card-bandiera:hover .cta-card { opacity: 1; transform: translateY(0); }
  .cta-card::after { content: '→'; transition: transform 0.2s; }
  .card-bandiera:hover .cta-card::after { transform: translateX(4px); }

  /* ═══════════════════════════════════════
     DIVISORE DECORATIVO
  ═══════════════════════════════════════ */
  .divisore {
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(46,204,113,0.3), rgba(231,76,60,0.3), transparent);
    margin: 0 auto; max-width: 800px;
  }

  /* ═══════════════════════════════════════
     FOOTER
  ═══════════════════════════════════════ */
  footer {
    position: relative; z-index: 1;
    background: #0d0d0d;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 4rem 2rem 2.5rem;
  }
  .footer-interno {
    max-width: 1000px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3rem;
  }

  /* Colonna brand nel footer con logo SVG */
  .footer-brand svg { height: 36px; width: auto; margin-bottom: 1rem; display: block; }
  .footer-brand p {
    font-size: 0.85rem; line-height: 1.75;
    color: rgba(245,245,240,0.42); max-width: 240px;
  }

  /* Colonne info e contatti */
  .footer-col h4 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem; letter-spacing: 0.2em; color: var(--verde); margin-bottom: 1rem;
  }
  .footer-col p, .footer-col a {
    font-size: 0.85rem; line-height: 2;
    color: rgba(245,245,240,0.45);
    text-decoration: none; display: block; transition: color 0.2s;
  }
  .footer-col a:hover { color: var(--bianco); }

  /* Barra copyright in fondo */
  .footer-fondo {
    max-width: 1000px; margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.75rem; color: rgba(245,245,240,0.22);
    flex-wrap: wrap; gap: 0.5rem;
  }
  .footer-fondo .cuore { color: var(--rosso); }

  /* ═══════════════════════════════════════
     RESPONSIVE — TABLET E MOBILE
  ═══════════════════════════════════════ */
  @media (max-width: 768px) {
    header { padding: 0.8rem 1.5rem; }
    .griglia-bandiere { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .footer-interno { grid-template-columns: 1fr; gap: 2rem; }
    .footer-fondo { flex-direction: column; align-items: flex-start; }
    .card-bandiera { padding: 2rem 1rem 1.5rem; }
    .emoji-bandiera { font-size: 3.5rem; }
    /* Immagine prodotto più compatta su mobile */
    .prodotto-vetrina { width: min(340px, 92vw); }
  }
  @media (max-width: 420px) {
    .griglia-bandiere { grid-template-columns: 1fr; }
  }

  /* ═══════════════════════════════════════
     ANIMAZIONI SCROLL REVEAL
     Gli elementi con classe .rivela
     diventano visibili quando entrano
     nel viewport (IntersectionObserver)
  ═══════════════════════════════════════ */
  .rivela {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .rivela.visibile { opacity: 1; transform: translateY(0); }
  .rivela:nth-child(2) { transition-delay: 0.1s; }
  .rivela:nth-child(3) { transition-delay: 0.2s; }
  .rivela:nth-child(4) { transition-delay: 0.3s; }

