html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Syne', sans-serif;
    background-color: #111;
    overflow: hidden;
}

/* CARDS */
#cards-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

#cards-container::-webkit-scrollbar {
    display: none;
}

/* Stile base per ogni card */
.card {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: #fff;
    scroll-snap-align: start;
    overflow: hidden;
}

/* Div per immagine di sfondo con effetto zoom */
.card-background {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    transition: transform 0.5s ease;
    z-index: 0;
}

.card:hover .card-background {
    transform: scale(1.05);
}

/* Overlay scuro sopra la card */
.card::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(0,0,0,0);
    z-index: 1;
    pointer-events: none;
}

/* Titoli delle card */
.card h1, .card h2 {
    position: relative;
    z-index: 10;
    margin: 0;
    font-size: 3rem;
    text-align: center;
}

/* Link nei titoli */
.card h1 a, .card h2 a {
    color: #fff;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

/* Nasconde i titoli solo delle card intermedie (non la prima né l'ultima) */
.card:not(.footer) h1, 
.card:not(.footer) h2 {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Mostra i titoli delle card intermedie al passaggio del mouse */
.card:not(.footer):hover h1, 
.card:not(.footer):hover h2 {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* Link nelle card */
.card-link {
    display: flex;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* Footer card */
.card.footer {
    background: linear-gradient(135deg, rgb(26, 42, 58), rgb(43, 74, 94), rgb(60, 106, 128)) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    color: #fff;
}

.card.footer::before {
    display: none;
}

.card.footer h2 {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

.card.footer a.footer-icon {
    display: inline-block;
    font-size: 1.8rem;
    margin: 10px 12px;
    color: #fff;
    transition: color 0.4s ease;
    text-decoration: none;
}

.card.footer a.footer-icon.wa:hover {
    color: #26d366;
}

.card.footer a.footer-icon.email:hover {
    color: #1d7ff3;
}

.card.footer a.footer-icon.gh:hover {
    color: #8a31aa;
}

.card.footer a.footer-icon.li:hover {
    color: #0a66c2;
}

/* NAV DOTS */
.indicators {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    padding: 25px 5px;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    flex-shrink: 0;
    transform-origin: center;
    opacity: 0;
    transform: scale(0.6) rotate(0deg);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.indicator.visible {
    opacity: 1;
}

.indicator.active {
    background-color: #fff;
    transform: translateY(0) rotate(0deg) scale(1.4);
    opacity: 1;
}

.indicator:not(.active) {
    transform: scale(0.7);
    opacity: 0.5;
}

.indicator:not(.active):hover {
    transform: scale(0.9) rotate(5deg);
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.6);
}

.indicators.morphing .indicator {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* MENU NAV */
.menu-wrapper {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(35px) saturate(150%);
    -webkit-backdrop-filter: blur(35px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 6px;
    max-width: 300px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Menu laterale */
.menu {
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    max-height: 150px;
    overflow-y: auto;
    gap: 12px;
    width: 90%;
}

.menu::-webkit-scrollbar {
    display: none;
}

/* Stile base per i link del menu */
.menu a[class*="menu-color-"] {
    display: block;
    padding: 10px 16px;
    margin: 4px 0;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95em;
}

/* Glass-style solo hover e active */
.menu a.active[class*="menu-color-"],
.menu a[class*="menu-color-"]:hover {
    backdrop-filter: blur(50px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(50px) saturate(180%) brightness(1.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -0.5px 0 rgba(0, 0, 0, 0.02);
    color: rgba(255, 255, 255, 0.95);
}

/* Overlay luminoso */
.menu a.active[class*="menu-color-"]::before,
.menu a[class*="menu-color-"]:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.menu a.active[class*="menu-color-"]:hover::before,
.menu a[class*="menu-color-"]:hover::before {
    opacity: 0.5;
}

/* COLORI PER MENU - classi nominali */

.menu a.active.menu-color-studioeliano,
.menu a.menu-color-studioeliano:hover {
    background: rgba(24, 72, 150, 0.2);
}

.menu a.active.menu-color-leparule,
.menu a.menu-color-leparule:hover {
    background: rgba(51, 89, 152, 0.2);
}

.menu a.active.menu-color-poniente,
.menu a.menu-color-poniente:hover {
    background: rgba(190, 86, 19, 0.2);
}

.menu a.active.menu-color-gudcilento,
.menu a.menu-color-gudcilento:hover {
    background: rgba(52, 87, 132, 0.2);
}

.menu a.active.menu-color-mariominervini,
.menu a.menu-color-mariominervini:hover {
    background: rgba(143, 79, 187, 0.2);
}

.menu a.active.menu-color-modellismonavale,
.menu a.menu-color-modellismonavale:hover {
    background: rgba(36, 97, 231, 0.2);
}

.menu a.active.menu-color-avviorio,
.menu a.menu-color-avviorio:hover {
    background: rgb(243, 240, 236, 0.2);
}

.menu a.active.menu-color-futurabride,
.menu a.menu-color-futurabride:hover {
    background: rgba(255, 255, 255, 0.25);
    color: rgba(0, 0, 0, 0.85);
}

.menu a.active.menu-color-amarodoncarlo,
.menu a.menu-color-amarodoncarlo:hover {
    background: rgb(255, 200, 0, 0.2);
}

.menu a.active.menu-color-veresis,
.menu a.menu-color-veresis:hover {
    background: rgba(0, 131, 174, 0.2);
}

.menu a.active.menu-color-laveranda,
.menu a.menu-color-laveranda:hover {
    background: rgba(48, 45, 125, 0.2);
}

.menu a.active.menu-color-pastaolimpia,
.menu a.menu-color-pastaolimpia:hover {
    background: rgba(224, 142, 34, 0.2);
}

.menu a.active.menu-color-caber,
.menu a.menu-color-caber:hover {
    background: rgba(225, 38, 29, 0.2);
}

.menu a.active.menu-color-photostudio,
.menu a.menu-color-photostudio:hover {
    background: rgba(0, 0, 0, 0.2);
}

.menu a.active.menu-color-mistasullostomaco,
.menu a.menu-color-mistasullostomaco:hover {
    background: rgba(254, 225, 4, 0.2);
}

.menu a.active.menu-color-portadiferro,
.menu a.menu-color-portadiferro:hover {
    background: rgba(161, 22, 36, 0.2);
}

.menu a.active.menu-color-footer,
.menu a.menu-color-footer:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Effetto hover delicato per card chiare */
.menu a.active.menu-color-studioeliano:hover,
.menu a.menu-color-studioeliano:hover {
    filter: brightness(1.05);
}

.menu a.active.menu-color-futurabride:hover,
.menu a.menu-color-futurabride:hover {
    filter: brightness(1.02);
}

.menu a.active.menu-color-pastaolimpia:hover,
.menu a.menu-color-pastaolimpia:hover {
    filter: brightness(1.05);
}

.menu a.active.menu-color-mistasullostomaco:hover,
.menu a.menu-color-mistasullostomaco:hover {
    filter: brightness(1.05);
}

/* Animazione shine */
.menu a.active[class*="menu-color-"]::after,
.menu a[class*="menu-color-"]:hover::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    pointer-events: none;
    transition: none;
    opacity: 0.4;
}

.menu a.active[class*="menu-color-"]:hover::after,
.menu a[class*="menu-color-"]:hover::after {
    animation: liquidShine 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes liquidShine {
    0% { left: -100%; opacity: 0.4; }
    50% { opacity: 0.6; }
    100% { left: 200%; opacity: 0; }
}

/* Text shadow per card chiare */
.menu a.active.menu-color-studioeliano,
.menu a.active.menu-color-futurabride,
.menu a.active.menu-color-pastaolimpia,
.menu a.active.menu-color-mistasullostomaco,
.menu a.menu-color-studioeliano:hover,
.menu a.menu-color-futurabride:hover,
.menu a.menu-color-pastaolimpia:hover,
.menu a.menu-color-mistasullostomaco:hover {
    text-shadow: 0 0.3px 0.6px rgba(255, 255, 255, 0.15);
}

/* Effetto pressione click */
.menu a.active[class*="menu-color-"]:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* ARROW IN MENU */
.arrow {
    text-align: center;
    padding: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-radius: 50%;
    margin: 10px auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.arrow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    border-radius: 50%;
    z-index: -1;
}

.arrow::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    pointer-events: none;
}

.arrow svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.arrow:hover {
    color: rgba(255, 255, 255, 1);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.arrow:hover::after { opacity: 1; }

.arrow:hover svg {
    transform: translateY(-2px);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

#menu-down:hover svg { transform: translateY(2px); }

.arrow:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* ICONA E POPUP */
.info-icon {
    margin-left: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: #ccc;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.info-icon:hover { color: #fff; }

.info-icon svg { cursor: pointer; transition: stroke 0.3s ease; }
.info-icon:hover svg { stroke: #fff; }

.info-icon::after {
    content: "Info progetto";
    position: absolute;
    bottom: 125%;
    left: 50%;
    background-color: #111;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.info-icon:hover::after { opacity: 1; }

.info-popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-popup:not(.hidden) { opacity: 1; visibility: visible; }
.info-popup.hidden { display: none; }

.info-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    color: white;
    position: relative;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#info-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

#info-close:hover { color: white; }

#info-text { line-height: 1.6; font-size: 16px; overflow: auto;}

/* RESPONSIVE */
@media (max-width: 768px) {
    .menu-wrapper {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 90%;
        width: 100%;
        padding: 4px;
        margin: 0;
        border-radius: 12px;
        height: 120px;
    }

    .menu a[class*="menu-color-"] {
        padding: 8px 12px;
        margin: 3px 0;
        border-radius: 8px;
        font-size: 0.9em;
    }

    .arrow { display: none; }

    .info-content {
        max-width: 85%;
        width: 85%;
        padding: 20px;
    }

    .before-after-container {
        height: 35vh;
    }

    .card h1, .card h2 { font-size: 2.5rem; }

    .card:not(:first-child):not(.footer) h1,
    .card:not(:first-child):not(.footer) h2 {
        display: none;
    }

    .swipe-up-indicator {
        position: fixed;
        bottom: 20px;
        transform: translateX(0);
        z-index: 9999;
        color: #fff;
        width: 100%;
        text-align: center;
    }

    .swipe-up-indicator svg {
        position: fixed;
        bottom: 20px;
        width: 100%;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        pointer-events: none;
        animation: float 2s infinite ease-in-out;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
}

@media (max-width: 480px) {
    .menu-wrapper {
        max-width: 90%;
        padding: 3px;
        top: 15px;
    }

    .menu a[class*="menu-color-"] {
        padding: 7px 10px;
        margin: 2px 0;
        font-size: 0.85em;
    }

    .arrow { width: 40px; height: 40px; margin: 6px auto; }
    .arrow svg { width: 16px; height: 16px; }

    @media (max-width: 360px) {
        .menu-wrapper {
            max-width: 92%;
            top: 10px;
            margin-left: 4px;
            margin-right: 4px;
        }

        .menu a[class*="menu-color-"] {
            padding: 6px 8px;
            font-size: 0.8em;
        }
    }
}

/* Linea verticale gialla */
.comparison-handle {
  background: #ffc800 !important;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
  width: 4px;
}

/* Pallino centrale della linea */
.comparison-handle div div {
  background: #ffc800 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 2px solid #fff;
}

/* Badge stile nuovo */
.badge {
  background: #ffc800 !important;
  color: #000 !important;
  border: 2px solid #000;
  border-radius: 30px !important;
  font-weight: bold !important;
  letter-spacing: 1px;
  font-family: sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

/* Effetto hover sui badge (opzionale) */
.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Versione mobile - badge più piccoli */
@media (max-width: 768px) {
  .badge {
    padding: 4px 10px !important;
    font-size: 10px !important;
    bottom: 10px !important;
    border-width: 1.5px;
  }
  
  .before-badge {
    left: 10px !important;
  }
  
  .after-badge {
    right: 10px !important;
  }
  
  /* Pallino più piccolo su mobile */
  .comparison-handle div div {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
  }
}

/* Linea verticale gialla con effetto glow */
.comparison-handle {
  background: #ffc800 !important;
  box-shadow: 0 0 6px rgba(255, 200, 0, 0.6), 0 0 2px rgba(0,0,0,0.3);
  width: 5px;
  border-radius: 2px;
}