/* ============================================================
   LAEF — Clausura Launch Animations (Plan B)
   Countdown flip · Partículas pre-lanzamiento · Glitch text
   Carrusel nuevos equipos · Sección Fundadores
   ============================================================ */


/* ════════════════════════════════════════════════════════════
   B1 — COUNTDOWN (dentro del hero widget)
   ════════════════════════════════════════════════════════════ */

.countdown-wrapper {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1rem 0 0.5rem;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.countdown-flip-box {
    position: relative;
    width: 52px;
    height: 64px;
    perspective: 300px;
}

.countdown-digit {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(239, 203, 108, 0.35);
    border-radius: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #EFCB6C;
    backface-visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(6px);
}

.countdown-digit.flip-exit {
    animation: flipExit 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.countdown-digit.flip-enter {
    animation: flipEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flipExit {
    0% {
        transform: rotateX(0deg);
        opacity: 1;
    }

    100% {
        transform: rotateX(-90deg);
        opacity: 0;
    }
}

@keyframes flipEnter {
    0% {
        transform: rotateX(90deg);
        opacity: 0;
    }

    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

.countdown-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(239, 203, 108, 0.6);
}

.countdown-separator {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(239, 203, 108, 0.5);
    align-self: flex-start;
    padding-top: 8px;
    animation: sepBlink 1s step-start infinite;
}

@keyframes sepBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}

/* Estado "¡Arrancó!" cuando el countdown llega a cero */
.countdown-launched {
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    color: #EFCB6C;
    letter-spacing: 2px;
    animation: launchedPulse 1.5s ease-in-out infinite alternate;
}

@keyframes launchedPulse {
    from {
        opacity: 0.7;
        text-shadow: 0 0 8px rgba(239, 203, 108, 0.3);
    }

    to {
        opacity: 1;
        text-shadow: 0 0 20px rgba(239, 203, 108, 0.8);
    }
}


/* ════════════════════════════════════════════════════════════
   B2 — TRANSICIÓN WIDGET APERTURA → CLAUSURA
   ════════════════════════════════════════════════════════════ */

.tournament-name-transition {
    overflow: hidden;
    position: relative;
    height: 2.5rem;
    /* Altura fija para el texto del torneo */
}

.tournament-name-slide {
    display: block;
    animation: slideInFromBottom 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* ════════════════════════════════════════════════════════════
   B3 — BANNER "SE VIENE EL CLAUSURA" (Partículas + Glitch)
   ════════════════════════════════════════════════════════════ */

.clausura-coming-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #050505 0%, #0d0d0d 100%);
    border-radius: 24px;
    border: 1px solid rgba(239, 203, 108, 0.15);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Partículas CSS (sin canvas) */
.clausura-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.clausura-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--laef-gold);
    animation: clausuraParticleRise var(--rise-duration, 6s) var(--rise-delay, 0s) ease-in infinite;
    opacity: 0;
}

@keyframes clausuraParticleRise {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }

    10% {
        opacity: 0.8;
        scale(1);
    }

    90% {
        opacity: 0.4;
    }

    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.5);
    }
}

/* Texto con efecto glitch suave */
.glitch-text {
    position: relative;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: white;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text::before {
    color: #EFCB6C;
    animation: glitchBefore 4s step-start infinite;
}

.glitch-text::after {
    color: rgba(255, 255, 255, 0.5);
    animation: glitchAfter 4s step-start infinite;
}

@keyframes glitchBefore {

    0%,
    95%,
    100% {
        opacity: 0;
        clip-path: none;
        transform: none;
    }

    96% {
        opacity: 0.7;
        clip-path: polygon(0 30%, 100% 30%, 100% 55%, 0 55%);
        transform: translate(-3px, 2px);
    }

    97% {
        opacity: 0.7;
        clip-path: polygon(0 10%, 100% 10%, 100% 35%, 0 35%);
        transform: translate(2px, -1px);
    }

    98% {
        opacity: 0;
    }
}

@keyframes glitchAfter {

    0%,
    96%,
    100% {
        opacity: 0;
        clip-path: none;
        transform: none;
    }

    97% {
        opacity: 0.5;
        clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
        transform: translate(3px, -2px);
    }

    98% {
        opacity: 0;
    }
}

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

/* Línea decorativa animada */
.clausura-divider {
    display: block;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--laef-gold), transparent);
    margin: 1.2rem auto;
    animation: expandWidth 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

@keyframes expandWidth {
    to {
        width: 200px;
    }
}

/* ════════════════════════════════════════════════════════════
   Fondo Malla Hexagonal 3D Neón (Clausura)
   ════════════════════════════════════════════════════════════ */

.hex-grid-3d {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hex-pattern {
    position: absolute;
    inset: -20%;
    background-image: radial-gradient(circle at center, transparent 30%, #050505 85%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98'%3E%3Cpath d='M28 0l28 16.17v32.33L28 64.67 0 48.5V16.17zM0 98l28-16.17 28 16.17' fill='none' stroke='%23EFCB6C' stroke-width='1.2' stroke-opacity='0.25'/%3E%3C/svg%3E");
    background-size: 56px 98px;
    transform: perspective(600px) rotateX(45deg) scale(1.3);
    animation: hexPan 25s linear infinite;
    opacity: 0.6;
}

@keyframes hexPan {
    0% { background-position: 0 0; }
    100% { background-position: 56px 98px; }
}

.hex-glow-pulse {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(239, 203, 108, 0.22) 0%, rgba(245, 158, 11, 0.05) 50%, transparent 80%);
    animation: hexPulse 4s ease-in-out infinite alternate;
}

@keyframes hexPulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 0.95; transform: scale(1.15); }
}


/* ════════════════════════════════════════════════════════════
   B4 — NUEVOS EQUIPOS + FUNDADORES
   ════════════════════════════════════════════════════════════ */

/* Sección contenedora */
.new-teams-section,
.founders-section {
    margin-bottom: 3rem;
}

.section-eyebrow {
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--laef-gold);
    margin-bottom: 0.5rem;
}

.section-heading-dark {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    line-height: 1.1;
}

/* ── TOKENS DE HONOR: Nuevos Equipos ── */
.new-teams-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.club-token {
    width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 1;
}


.club-token:hover {
    transform: translateY(-10px) scale(1.06);
}

/* Aura glow ring behind the shield */
.token-aura {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: all 0.4s ease;
}

/* New team aura: emerald/violet */
.token-new .token-aura {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 0 25px rgba(16, 185, 129, 0.08);
}

.token-new:hover .token-aura {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35), 0 0 40px rgba(16, 185, 129, 0.2), 0 0 80px rgba(139, 92, 246, 0.1);
}

/* Founder aura: cobalt/amber */
.token-founder .token-aura {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    box-shadow: 0 0 0 3px rgba(217, 169, 56, 0.2), 0 0 25px rgba(59, 130, 246, 0.08);
}

.token-founder:hover .token-aura {
    box-shadow: 0 0 0 4px rgba(217, 169, 56, 0.4), 0 0 40px rgba(59, 130, 246, 0.2), 0 0 80px rgba(217, 169, 56, 0.12);
}

.token-aura img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
    transition: transform 0.4s ease;
}

.club-token:hover .token-aura img {
    transform: scale(1.12) rotate(-4deg);
}

.token-aura .token-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.token-new .token-placeholder {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.token-founder .token-placeholder {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.token-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.token-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 20px;
}

.token-new .token-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.token-founder .token-badge {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #2563eb;
}

/* ── TOKENS DE HONOR: Fundadores (reutiliza .club-token base) ── */
.founders-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

/* ════════════════════════════════════════════════
   MODAL DE AGRADECIMIENTO EMOTIVO
   ════════════════════════════════════════════════ */
.thanks-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.4s ease;
    padding: 1.5rem;
}

.thanks-modal-overlay.active {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: auto;
}

.thanks-modal-card {
    background: #fff;
    border-radius: 28px;
    max-width: 520px;
    width: 100%;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.thanks-modal-overlay.active .thanks-modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Watermark LAEF background */
.thanks-modal-card::before {
    content: 'LAEF';
    position: absolute;
    bottom: -20px;
    right: -10px;
    font-family: 'Oswald', sans-serif;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.025);
    letter-spacing: 8px;
    pointer-events: none;
    line-height: 1;
}

/* Color accent strip at top */
.thanks-modal-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.thanks-modal-card.modal-founder::after {
    background: linear-gradient(90deg, #3b82f6, #d9a938, #3b82f6);
}

.thanks-modal-card.modal-new::after {
    background: linear-gradient(90deg, #10b981, #8b5cf6, #10b981);
}

.thanks-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #888;
    transition: all 0.25s ease;
    z-index: 5;
}

.thanks-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

.thanks-modal-shield {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
    margin: 0 auto 1.2rem;
    display: block;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.15));
}

.thanks-modal-shield-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.modal-founder .thanks-modal-shield-placeholder {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.modal-new .thanks-modal-shield-placeholder {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.thanks-modal-honorific {
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.modal-founder .thanks-modal-honorific { color: #3b82f6; }
.modal-new .thanks-modal-honorific { color: #10b981; }

.thanks-modal-club-name {
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.thanks-modal-body {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 2rem;
    font-style: italic;
}

.thanks-modal-signature {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.thanks-modal-signature strong {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 0.3rem;
}

.thanks-modal-seal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-top: 0.6rem;
}

.modal-founder .thanks-modal-seal {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.modal-new .thanks-modal-seal {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Separador decorativo entre secciones */
.laef-section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.laef-section-divider::before,
.laef-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

/* Responsive */
@media (max-width: 576px) {
    .new-teams-grid,
    .founders-grid {
        gap: 1rem;
    }

    .club-token {
        width: 110px;
    }

    .token-aura {
        width: 75px;
        height: 75px;
    }

    .token-aura img,
    .token-aura .token-placeholder {
        width: 52px;
        height: 52px;
    }

    .token-name {
        font-size: 0.7rem;
    }

    .clausura-coming-section {
        padding: 2rem 1rem;
    }

    .countdown-flip-box {
        width: 44px;
        height: 54px;
    }

    .countdown-digit {
        font-size: 1.6rem;
    }

    .thanks-modal-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .thanks-modal-shield,
    .thanks-modal-shield-placeholder {
        width: 64px;
        height: 64px;
    }

    .thanks-modal-club-name {
        font-size: 1.3rem;
    }

    .thanks-modal-body {
        font-size: 0.88rem;
    }
}