/* === VARCO STYLES === */

.varco-main {
    background: linear-gradient(180deg,
            var(--bg-primary) 0%,
            #1a1a2e 30%,
            #16213e 60%,
            #0f0f23 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.ponte-main::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(107, 255, 193, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: ponte-ambient 25s ease-in-out infinite alternate;
}

@keyframes ponte-ambient {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* === HERO VARCO === */

.varco-hero {
    position: relative;
    padding: 4rem 0;
    text-align: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    margin-bottom: 4rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.wave-layer {
    position: absolute;
    width: 120%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    animation: wave-flow 8s ease-in-out infinite;
}

.wave-1 {
    animation-delay: 0s;
    transform: skewX(-15deg);
}

.wave-2 {
    animation-delay: 2s;
    transform: skewX(-10deg);
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.05), transparent);
}

.wave-3 {
    animation-delay: 4s;
    transform: skewX(-5deg);
    background: linear-gradient(90deg, transparent, rgba(107, 255, 193, 0.03), transparent);
}

@keyframes wave-flow {

    0%,
    100% {
        transform: translateX(-50%) skewX(-15deg);
    }

    50% {
        transform: translateX(50%) skewX(-15deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.varco-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.varco-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #8a2be2, #6bcf7f);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.varco-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: white;
}

.varco-description {
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.8;
    line-height: 1.6;
}

.livello-realta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.realta-gauge {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #6bcf7f, #8a2be2);
    background-size: 200% 100%;
    animation: gauge-flow 3s linear infinite;
    width: 100%;
}

@keyframes gauge-flow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

.realta-label {
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
}

/* === MAPPA DEL VARCO === */

.mappa-varco {
    margin: 4rem 0;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: white;
}

.varco-percorso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 3rem 0;
}

.tappa {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.tappa-presente {
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.1);
}

.tappa-possibile {
    border-color: rgba(107, 255, 193, 0.5);
    background: rgba(107, 255, 193, 0.1);
}

.tappa-cronache {
    border-color: rgba(138, 43, 226, 0.5);
    background: rgba(138, 43, 226, 0.1);
}

.tappa:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tappa-numero {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.tappa-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tappa-stats {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
}

.varco-freccia {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

/* === SEZIONI DEL VARCO === */

.varco-sezione {
    margin: 4rem 0;
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
}

.sezione-presente {
    border-left: 4px solid rgba(255, 107, 107, 0.6);
    background: rgba(255, 107, 107, 0.05);
}

.sezione-possibile {
    border-left: 4px solid rgba(107, 255, 193, 0.6);
    background: rgba(107, 255, 193, 0.05);
}

.sezione-cronache {
    border-left: 4px solid rgba(138, 43, 226, 0.6);
    background: rgba(138, 43, 226, 0.05);
}

.sezione-header {
    text-align: center;
    margin-bottom: 3rem;
}

.realta-indicator {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sezione-presente .realta-indicator {
    color: rgba(255, 150, 150, 0.9);
    border-color: rgba(255, 107, 107, 0.3);
}

.sezione-possibile .realta-indicator {
    color: rgba(150, 255, 200, 0.9);
    border-color: rgba(107, 255, 193, 0.3);
}

.sezione-cronache .realta-indicator {
    color: rgba(180, 120, 255, 0.9);
    border-color: rgba(138, 43, 226, 0.3);
}

.sezione-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.sezione-icon {
    font-size: 2.5rem;
}

.sezione-descrizione {
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* === ARTICOLI GRIGLIA === */

.articoli-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.articolo-carta {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.articolo-carta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background 0.3s ease;
}

.presente-carta::before {
    background: rgba(255, 107, 107, 0.6);
}

.possibile-carta::before {
    background: rgba(107, 255, 193, 0.6);
}

.cronache-carta::before {
    background: rgba(138, 43, 226, 0.6);
}

.articolo-carta:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.carta-marker {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.3rem;
    opacity: 0.4;
}

.carta-contenuto {
    position: relative;
}

.carta-titolo {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.carta-titolo a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.presente-carta .carta-titolo a:hover {
    color: rgba(255, 150, 150, 0.9);
}

.possibile-carta .carta-titolo a:hover {
    color: rgba(150, 255, 200, 0.9);
}

.cronache-carta .carta-titolo a:hover {
    color: rgba(180, 120, 255, 0.9);
}

.carta-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.carta-tipo {
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.presente-carta .carta-tipo {
    background: rgba(255, 107, 107, 0.2);
    color: rgba(255, 150, 150, 0.9);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.possibile-carta .carta-tipo {
    background: rgba(107, 255, 193, 0.2);
    color: rgba(150, 255, 200, 0.9);
    border: 1px solid rgba(107, 255, 193, 0.3);
}

.cronache-carta .carta-tipo {
    background: rgba(138, 43, 226, 0.2);
    color: rgba(180, 120, 255, 0.9);
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.carta-estratto {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.8;
    margin: 0;
}

/* === PLACEHOLDER SEZIONI === */

.sezione-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    opacity: 0.7;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.sezione-placeholder p {
    font-style: italic;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* === LINK SEZIONI === */

.sezione-link {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.link-sezione {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.link-sezione::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.link-sezione:hover::before {
    left: 100%;
}

.presente-link {
    background: rgba(255, 107, 107, 0.2);
    color: rgba(255, 150, 150, 0.9);
    border-color: rgba(255, 107, 107, 0.4);
}

.presente-link:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.possibile-link {
    background: rgba(107, 255, 193, 0.2);
    color: rgba(150, 255, 200, 0.9);
    border-color: rgba(107, 255, 193, 0.4);
}

.possibile-link:hover {
    background: rgba(107, 255, 193, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(107, 255, 193, 0.3);
}

.cronache-link {
    background: rgba(138, 43, 226, 0.2);
    color: rgba(180, 120, 255, 0.9);
    border-color: rgba(138, 43, 226, 0.4);
}

.cronache-link:hover {
    background: rgba(138, 43, 226, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
}

/* === TRANSIZIONI TRA SEZIONI === */

.transizione-zona {
    margin: 3rem 0;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    border-radius: 10px;
    position: relative;
}

.transizione-content {
    max-width: 600px;
    margin: 0 auto;
}

.transizione-content p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.realta-shift {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    opacity: 0.6;
    letter-spacing: 2px;
}

/* === VARCO ONIRIKA === */

.varco-onirika {
    margin: 4rem 0;
    padding: 4rem 2rem;
    background: radial-gradient(ellipse at center,
            rgba(138, 43, 226, 0.2) 0%,
            rgba(0, 0, 0, 0.4) 70%);
    border-radius: 25px;
    border: 2px solid rgba(138, 43, 226, 0.4);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.varco-onirika::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            rgba(138, 43, 226, 0.1) 30deg,
            transparent 60deg,
            rgba(107, 255, 193, 0.1) 90deg,
            transparent 120deg,
            rgba(255, 107, 107, 0.1) 150deg,
            transparent 180deg,
            rgba(138, 43, 226, 0.1) 210deg,
            transparent 240deg,
            rgba(107, 255, 193, 0.1) 270deg,
            transparent 300deg,
            rgba(255, 107, 107, 0.1) 330deg,
            transparent 360deg);
    animation: varco-rotation 30s linear infinite;
    z-index: -1;
}

@keyframes varco-rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.varco-content {
    position: relative;
    z-index: 1;
}

.varco-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.6);
}

.varco-content>p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.varco-avviso {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 700px;
    text-align: left;
}

.avviso-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.avviso-testo {
    flex: 1;
}

.varco-portali {
    margin-top: 3rem;
}

.portale-principale {
    display: inline-block;
    padding: 1.5rem 3rem;
    background: rgba(138, 43, 226, 0.3);
    border: 2px solid rgba(138, 43, 226, 0.6);
    border-radius: 35px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    display: block;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.portale-principale::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.portale-principale:hover::before {
    left: 100%;
}

.portale-principale:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(138, 43, 226, 1);
    box-shadow: 0 15px 40px rgba(138, 43, 226, 0.5);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.portale-desc {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 0.5rem;
}

.portali-specifici {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.portale-sec {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.portale-sec:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

/* === PERCORSO DI RITORNO === */

.percorso-ritorno {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.ritorno-text {
    margin-bottom: 1rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

.btn-ritorno {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-ritorno:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    .varco-percorso {
        flex-direction: column;
        gap: 1rem;
    }

    .varco-freccia {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }

    .tappa {
        min-width: auto;
        max-width: none;
    }

    .articoli-griglia {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .varco-title {
        font-size: 2.2rem;
    }

    .sezione-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .sezione-icon {
        font-size: 2rem;
    }

    .varco-avviso {
        flex-direction: column;
        text-align: center;
    }

    .portali-specifici {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .portale-sec {
        width: 100%;
        max-width: 250px;
    }

    .livello-realta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .realta-gauge {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .varco-main {
        padding: 0;
    }

    .container {
        padding: 0 1rem;
    }

    .varco-sezione {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }

    .varco-onirika {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }

    .varco-hero {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }

    .articolo-carta {
        padding: 1rem;
    }
}