/* =========================================
   1. VARIABILI E RESET (NO BOUNCE FIX)
   ========================================= */
:root {
    --primary: #008C8C;
    --primary-dark: #006060;
    --dark: #1a1a1a;
    --light: #ffffff;
    --bg-page: #f8fcfc;
    --nav-h: 64px;
}

*, *::before, *::after{
  box-sizing: border-box;
}

html {
    width: 100%;
    /* Questo blocca il RIMBALZO, ma lascia lo scroll attivo! */
    overscroll-behavior-y: none; 
}

body {
    background-color: var(--bg-page);
    font-family: 'Inter', "SF Pro Display", sans-serif;
    margin: 0;
    padding: 0;
    color: var(--dark);
    
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto; /* Scroll sempre attivo */
    -webkit-overflow-scrolling: touch;
    
    /* Sicurezza extra per evitare il rimbalzo */
    overscroll-behavior-y: none;
}
/* =========================================
   2. NAVBAR (LAYOUT CORRETTO)
   ========================================= */
.navbar {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 140, 140, 0.15);
    height: var(--nav-h);
    padding: 0;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
    transform: translateZ(0);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* ✅ fluid: cresce su schermi grandi, resta ok su medi */
    width: min(96vw, 1600px);

    margin: 0 auto;
    position: relative;
}


/* --- BLOCCO SINISTRA --- */
.nav-left-block {
    display: flex;
    align-items: center;
}

.logo { height: 40px; display: block; }
.logo-link { display: flex; align-items: center; }

/* Social Desktop */
.header-socials-group {
    display: flex;
    align-items: center;
}

.header-socials-group a {
    text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.2s;
    padding: 0 4px;
}

/* Colori Ufficiali */
.header-socials-group .fa-instagram { color: #E1306C; }
.header-socials-group .fa-tiktok { color: #000000; }
.header-socials-group .fa-youtube { color: #FF0000; }
.header-socials-group .fa-facebook-f { color: #1877F2; }
.header-socials-group a:hover { transform: scale(1.2); }

/* --- DIVISORI --- */

/* Divider Grande (Separa Logo dai Social) */
.nav-divider-big {
    display: block; width: 1px; height: 24px;
    background-color: #ccc; /* Grigio chiaro per separare i blocchi */
    margin: 0 15px;
}

/* ✅ Divider Piccolo TRA LE ICONE (ACQUAGREEN) */
.icon-divider {
    display: block; width: 1px; height: 14px;
    background-color: var(--primary); /* ORA SONO ACQUAGREEN */
    margin: 0 5px;
    opacity: 0.6;
}

/* --- TITOLO TAP-SEARCH (LOGICA IBRIDA) --- */
.brand-text {
    font-weight: 900;
    letter-spacing: -0.3px;
    font-size: 1.2rem;
    white-space: nowrap;
    
    /* ✅ COLORE ACQUAGREEN SEMPRE */
    color: var(--primary); 
    
    /* ✅ DESKTOP: Spostato a destra delle icone (circa 10-12cm visivi) */
    margin-left: 120px; 
}

/* --- GRUPPO DESTRA --- */
.navbar-right { display: flex; align-items: center; }

.menu-toggle {
    display: none;
    align-items: center; gap: 10px;
    background: transparent; border: none;
    color: var(--dark); cursor: pointer;
    padding: 8px 12px; font-weight: 800;
}
.menu-label { font-size: 0.95rem; }

.nav-links-container { display: flex; gap: 10px; align-items: center; }

.nav-btn-simple {
    text-decoration: none; color: var(--dark);
    font-weight: 600; font-size: 0.9rem;
    padding: 8px 12px; border-radius: 8px; transition: 0.3s;
}
.nav-btn-simple:hover { background-color: #f0f0f0; color: var(--primary); }

/* Lingua */
.lang-switch { display: inline-flex; align-items: center; padding: 0; }
.lang-switch .lang-btn {
    background: transparent; border: none; cursor: pointer;
    font: inherit; font-weight: 600; color: var(--dark); padding: 5px;
}
.lang-switch .lang-divider { width: 1px; height: 14px; background: #ccc; margin: 0 5px; }
.lang-switch .lang-btn[aria-pressed="true"] { color: var(--primary); font-weight: 800; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 1000px) {
    /* Nascondi Social Desktop e Divider grandi */
    .header-socials-group, .nav-divider-big { display: none !important; }
    
    /* ✅ MOBILE FIX: Il titolo torna AL CENTRO ESATTO */
    .brand-text {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin-left: 0; /* Annulla il margine desktop */
        font-size: 1.1rem;
    }
    
    .menu-toggle { display: inline-flex; }
}

/* =========================================
   STILE SLOGAN NEL TITOLO (GRASSETTO)
   ========================================= */

/* Stile Desktop: Visibile e Grassetto */
.brand-slogan {
    font-weight: 700;       /* ✅ GRASSETTO (Bold) */
    font-size: 0.9rem;      /* Un filo più piccolo del titolo principale per eleganza */
    margin-left: 5px;       /* Spazio dopo "Tap-Search" */
    color: var(--primary);  /* Sempre Acquagreen */
}

/* --- MOBILE: NASCONDI LA FRASE LUNGA --- */
@media (max-width: 1200px) {
    /* Su schermi medi e piccoli nascondiamo lo slogan
       altrimenti si sovrappone al logo o al menu */
    .brand-slogan {
        display: none;
    }
}


/* =========================================
   3. HERO SECTION & STRUTTURA (ZERO GAP)
   ========================================= */
.main-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: auto;
    padding-top: calc(var(--nav-h) + 20px);
    
    padding-bottom: 0 !important; 
}

.main-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: var(--light);
    border: 2px solid var(--primary);
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0, 140, 140, 0.1);

    /* ✅ fluid: cresce su schermi grandi, resta elegante su medi */
    width: min(96vw, 1600px);                     
    padding: clamp(48px, 4vw, 80px) clamp(40px, 5vw, 96px);
    gap: clamp(28px, 4vw, 70px);

    /* ✅ come avevi già sistemato */
    margin: 30px auto 0 auto;

    position: relative;
}


/* INFO SECTION */
.info-section { flex: 1; z-index: 10; }

.slogan-badge {
    display: inline-block; background-color: #e0f2f2; color: var(--primary-dark);
    padding: 6px 14px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 20px;
}

.info-section h1 {
    font-size: 3.5rem; margin: 0 0 20px 0;
    line-height: 1.1; color: var(--dark); letter-spacing: -1px;
}

.brand-name {
    background: linear-gradient(135deg, #008C8C 0%, #004d4d 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    white-space: nowrap; display: inline-block;
}

.description { font-size: 1.1rem; color: #555; margin-bottom: 30px; line-height: 1.6; }

.features-list { list-style: none; padding: 0; }
.features-list li { margin-bottom: 12px; font-size: 1rem; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.features-list i { color: var(--primary); }

/* STORE BUTTONS DESKTOP */
.store-buttons-container { display: flex; gap: 15px; margin-top: 40px; }
.store-btn { display: inline-flex; align-items: center; transition: transform 0.2s ease; text-decoration: none; }
.store-btn:hover { transform: scale(1.05); }
.store-btn img {
    height: 48px; width: auto; display: block;
}

/* =========================================
   4. CAROSELLO (PC)
   ========================================= */
.carousel-container {
    flex: 1; display: flex; justify-content: center; position: relative;
    height: 600px; width: 100%;
}
.carousel {
    position: relative; width: 280px; height: 600px;
    perspective: 1200px; transform-style: preserve-3d;
}
.carousel-item {
    position: absolute; top: 0; left: 0;
    width: 100%; height: auto;
    border-radius: 40px; border: 4px solid var(--primary);
    background: #fff; transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}
.carousel-item.active { transform: translateX(0) scale(1); z-index: 3; opacity: 1; }
.carousel-item.left { transform: translateX(-200px) scale(0.85) rotateY(20deg); z-index: 1; opacity: 0.7; filter: blur(1px); }
.carousel-item.right { transform: translateX(200px) scale(0.85) rotateY(-20deg); z-index: 1; opacity: 0.7; filter: blur(1px); }

/* =========================================
   5. RESPONSIVE (TABLET & MOBILE)
   ========================================= */
@media (max-width: 1024px) {
    .main-container { gap: 30px; }
    .info-section h1 { font-size: 3rem; }
}


@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }

 
  /* Layout Mobile */
  .main-wrapper {
    padding-top: calc(var(--nav-h) + 12px);
    padding-bottom: 160px;
    align-items: center;
    overflow-x: hidden;
  }
  .main-container {
      flex-direction: column; align-items: center; text-align: center;
      padding: 30px 15px; width: 90%; margin: 0 auto; gap: 20px;
  }
  .info-section { width: 100%; }
  .info-section h1 { font-size: 2.2rem; }
  
  .features-list { width: 100%; }
  .features-list li { justify-content: flex-start; gap: 10px; }
  .features-list li i { flex: 0 0 22px; width: 22px; text-align: center; }
  
  .store-buttons-container { display: none !important; }

  /* Carosello Mobile */
  .carousel-container { width: 100%; height: 460px; margin-top: 30px; position: relative; display: flex; justify-content: center; align-items: flex-start; }
  .carousel { width: 220px; height: 460px; position: relative; margin: 0 auto; left: auto; top: auto; transform: none; }
  .carousel-item.left { transform: translateX(-70px) scale(0.85); z-index: 1; opacity: 0.6; filter: none; }
  .carousel-item.right { transform: translateX(70px) scale(0.85); z-index: 1; opacity: 0.6; filter: none; }
  .carousel-item.active { z-index: 10; transform: translateX(0) scale(1); }

  /* ✅ FIX 1: rimuove la “linea fantasma” (ombra / blur) su mobile */
  .carousel-item{
    box-shadow: none !important;
    filter: none !important;
  }

  /* ✅ FIX 2: riduce aloni/artefatti su iOS quando scala con transform */
  .carousel, .carousel-item{
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  footer { padding-bottom: 110px !important; }
}



/* =========================================
   6. BARRA FISSA MOBILE
   ========================================= */
.mobile-sticky-bar { display: none; }

@media (max-width: 900px) {
  .mobile-sticky-bar {
    display: flex; align-items: center; justify-content: center;
    position: fixed; left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 9999;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0,140,140,0.18);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.10);
    padding: 10px 12px;
  }

  .mobile-sticky-bar .sticky-text { display: none; }
  .mobile-sticky-bar .sticky-buttons { display: flex; gap: 10px; width: 100%; justify-content: center; align-items: center; }
  
  .mobile-sticky-bar .sticky-buttons a {
    display: flex; align-items: center; justify-content: center;
    flex: 1; border-radius: 16px; padding: 6px 8px;
    background: rgba(0,140,140,0.06);
    border: 1px solid rgba(0,140,140,0.12);
    -webkit-tap-highlight-color: transparent;
  }
  
  .mobile-sticky-bar .sticky-buttons img {
    height: 40px; width: auto; max-width: 100%; object-fit: contain; display: block;
  }
  .mobile-sticky-bar .sticky-buttons a:active { transform: scale(0.99); background: rgba(0,140,140,0.10); }
}

/* =========================================
   7. FOOTER & FIX MOBILE (NO OMBRA)
   ========================================= */

/* --- STILE BASE FOOTER (COMUNE) --- */
footer {
    width: 100%;
    background-color: transparent;
    
    /* ✅ CORREZIONE: Metti 0 anche qui! (Prima era 5px) */
    padding: 0 0 20px 0; 
    
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.copyright { margin: 0; opacity: 0.8; }

/* SOCIAL DESKTOP: Nascosti */
@media (min-width: 901px) {
    .mobile-only { display: none !important; }
}

@media (max-width: 900px) {
  .mobile-only { display: flex !important; }
}


/* SOCIAL MOBILE: Stile */
.footer-socials {
    display: flex; align-items: center; justify-content: center;
    gap: 20px;
}
.footer-socials a {
    font-size: 1.8rem; text-decoration: none; display: flex; align-items: center;
    transition: transform 0.2s;
}
.footer-socials .fa-instagram { color: #E1306C; }
.footer-socials .fa-tiktok { color: #000000; }
.footer-socials .fa-youtube { color: #FF0000; }
.footer-socials .fa-facebook-f { color: #1877F2; }

.social-divider {
    display: block; width: 2px; height: 20px;
    background-color: var(--primary); opacity: 0.5;
}


/* =========================================
   MOBILE LAYOUT FIX (SOLO BIANCO - NO OMBRA)
   ========================================= */
@media (max-width: 900px) {

    /* 1. SFONDO BIANCO */
    body {
        background: #ffffff !important;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    /* 2. CARD "GEMINI" (SENZA OMBRA SOTTO) */
    .main-container {
        display: flex;
        flex-direction: column;
        
        background-color: #ffffff !important;
        border: 2px solid var(--primary) !important;
        border-radius: 30px !important;
        
        /* ✅ QUESTA ERA LA COLPEVOLE: L'abbiamo tolta */
        box-shadow: none !important; 
        
        padding: 30px 15px !important;
        width: 90% !important;
        margin: 0 auto 30px auto !important;
    }

    /* 3. FOOTER */
    footer {
        padding-top: 0 !important;
        padding-bottom: 160px !important; 
        position: relative;
        z-index: 5;
    }

    /* 4. WRAPPER */
    .main-wrapper {
        padding-bottom: 0 !important;
        height: auto !important;
    }
}

/* Stile per pulsante attivo nel menu (SOLO MENU, NON LINGUA) */
.nav-btn-simple.is-active {
    color: var(--primary) !important;
    background: linear-gradient(135deg, rgba(0, 140, 140, 0.14) 0%, rgba(0, 140, 140, 0.06) 100%) !important;
    border: 1px solid rgba(0, 140, 140, 0.22);
    box-shadow: 0 10px 22px rgba(0, 140, 140, 0.10);
}
/* ===========================
   MENU MOBILE - CLEAN (ROBUSTO)  ✅ FIX IT/EN GRANDI MA STACCATI
   =========================== */
@media (max-width: 900px) {

  /* dropdown container */
  .nav-links-container{
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);

    display: none;
    flex-direction: column;
    gap: 10px;

    padding: 14px;                 /* aria ai bordi */
    background: rgba(255,255,255,0.98);
    border: 1.5px solid rgba(0, 140, 140, 0.35);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);

    box-sizing: border-box;
    overflow: hidden;              /* evita sbordi */
  }

  .nav-links-container.active{
    display: flex;
    animation: slideDown 0.22s ease forwards;
  }

  @keyframes slideDown{
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* voci menu */
  .nav-links-container .nav-btn-simple{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 12px 12px;
    border-radius: 16px;

    background: #fff;
    border: 1px solid rgba(0,0,0,0.14);   /* nero un filo più marcato */
    text-decoration: none;

    font-size: 1.05rem;
    font-weight: 900;
    color: var(--dark);

    box-sizing: border-box;
  }

  .nav-links-container .nav-btn-simple:active{
    transform: scale(0.99);
  }

  /* riga lingua: come una voce del menu */
  .nav-links-container .lang-switch{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 18px;                      /* ✅ spazio reale tra IT e EN */
    padding: 14px 12px;             /* aria nel box */
    border-radius: 16px;

    background: #fff;
    border: 1.5px solid rgba(0, 140, 140, 0.35); /* contorno acquagreen */
    box-sizing: border-box;

    position: relative;
    overflow: hidden;
  }

  /* (opzionale) divider leggero al centro, senza farli toccare */
  .nav-links-container .lang-switch::after{
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 26px;
    background: rgba(0,0,0,0.18);
    pointer-events: none;
  }

  /* bottoni lingua: GRANDI ma staccati */
  .nav-links-container .lang-switch .lang-btn{
    all: unset;
    box-sizing: border-box;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 120px;                   /* ✅ grande come nello screen */
    height: 46px;                   /* ✅ grande come nello screen */
    border-radius: 16px;

    font-size: 1.05rem;
    font-weight: 900;

    background: #ffffff;            /* ✅ bianco se non premuto */
    border: 1.5px solid rgba(0, 140, 140, 0.45);
    color: var(--dark);
  }

  /* attivo */
  .nav-links-container .lang-switch .lang-btn[aria-pressed="true"]{
    background: rgba(0, 140, 140, 0.12);
    border-color: rgba(0, 140, 140, 0.70);
    color: var(--primary);
  }

  /* nascondi lo span divider html (se presente) */
  .nav-links-container .lang-switch .lang-divider{
    display: none !important;
  }
}


@media (min-width: 1800px){
  .info-section h1{ font-size: clamp(3.2rem, 2.2vw, 4.4rem); }
  .description{ font-size: clamp(1.1rem, 0.9vw, 1.3rem); }
}
