/* ======================================================
   TUBKALA - POPUP ECLIPSE 2026 (CORREGIDO)
====================================================== */

.tbk-popup {
    position: fixed;
    inset: 0;

    display: none;
    justify-content: center;
    align-items: center; /* Centra el modal verticalmente en pantallas grandes */

    overflow-y: auto; /* Permite scroll en el fondo si el popup es muy alto */

    padding: 20px;

    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(4px);

    z-index: 999999;
}

.tbk-popup-card {
    width: 100%;
    max-width: 520px;

    /* CAMBIOS CLAVE: */
    max-height: 90vh; /* Aumentado del 70vh al 90vh para aprovechar el espacio */
    overflow-y: auto;  /* Permite scroll INTERNO si el contenido supera la pantalla */

    background: #ffffff;
    border-radius: 18px;

    display: flex;
    flex-direction: column;

    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    animation: tbkPopup .35s ease;
    position: relative;
}

/* Personalizar barra de scroll dentro de la tarjeta (opcional) */
.tbk-popup-card::-webkit-scrollbar {
    width: 6px;
}
.tbk-popup-card::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

@keyframes tbkPopup {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ----------------------------- */

.tbk-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;
    background: white;
    cursor: pointer;

    font-size: 28px;
    color: #444;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    transition: .2s;
    z-index: 10;
}

.tbk-close:hover {
    transform: rotate(90deg);
}

/* ----------------------------- */

.tbk-header {
    background: linear-gradient(135deg, #031633, #0b4b8b);
    padding: 20px;
    text-align: center;
    color: white;
}

.tbk-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    background: #ff9800;
    color: white;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.tbk-header h2 {
    margin: 0;
    font-size: 28px !important;
    color: #fff !important;
    line-height: 1.2;
}

.tbk-date {
    margin-top: 6px;
    color: #FFD54A !important;
    font-size: 16px;
}

/* ----------------------------- */

.tbk-image {
    width: 100%;
    height: 180px; /* Ligero ajuste para mejor balance visual */
    object-fit: cover;
    display: block;
}

/* ----------------------------- */

.tbk-content {
    padding: 20px 24px 24px;
    text-align: center;
}

.tbk-content h3 {
    margin: 0;
    color: #003366;
    font-size: 22px;
}

.tbk-text {
    margin: 10px 0 16px;
    color: #555;
    font-size: 15px;
    line-height: 1.4;
}

/* ----------------------------- */

.tbk-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tbk-features span {
    background: #eef5ff;
    color: #003366;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
}

/* ----------------------------- */

.tbk-countdown {
    margin: 14px 0;
    font-size: 18px;
    color: #333;
}

#tbk-days {
    color: #ff9800;
    font-size: 30px;
    font-weight: bold;
}

/* ----------------------------- */

.tbk-button {
    display: block;
    background: #ff9800;
    color: white !important;
    text-decoration: none !important;
    font-size: 20px;
    font-weight: bold;
    padding: 14px;
    border-radius: 10px;
    transition: .25s;
}

.tbk-button:hover {
    background: #f57c00;
    transform: translateY(-2px);
}

/* ----------------------------- */

@media (max-width: 768px) {
    .tbk-popup {
        padding: 10px;
        align-items: flex-start; /* En móviles facilita el desplazaminto */
    }

    .tbk-popup-card {
        max-width: 100%;
        max-height: 95vh;
    }

    .tbk-header h2 {
        font-size: 22px !important;
    }

    .tbk-image {
        height: 140px;
    }

    .tbk-content {
        padding: 16px;
    }

    .tbk-button {
        font-size: 18px;
        padding: 12px;
    }
}