﻿/* ============================================
   PROMOCIONES - ESTILOS PÚBLICOS
   ============================================ */

/* --------------------------------------------
   1. CONTENEDORES PRINCIPALES
-------------------------------------------- */

#linkIniciarOrbita:hover {
    color: var(--space-dark) !important;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.promociones-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* --------------------------------------------
   2. HERO SECTION
-------------------------------------------- */
.promocion-hero {
    background: linear-gradient(135deg, #0f1123 0%, #1a1a3e 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

    .promocion-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at 20% 50%, rgba(255, 77, 109, 0.1), transparent);
        pointer-events: none;
    }

    .promocion-hero h1 {
        font-size: 2.5rem;
        color: #ff4d6d;
        margin-bottom: 1rem;
        text-shadow: 0 0 20px rgba(255, 77, 109, 0.3);
    }

    .promocion-hero p {
        color: #cbd5e1;
        font-size: 1.1rem;
    }

/* --------------------------------------------
   3. GRID DE CARDS - RESPONSIVO
-------------------------------------------- */
.promocion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* --------------------------------------------
   4. CARD PRINCIPAL
-------------------------------------------- */
.promocion-card {
    max-width: 100%;
    background: var(--glass-bg, rgba(15, 17, 35, 0.95));
    border: 1px solid var(--glass-border, rgba(255, 77, 109, 0.2));
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    flex-direction: column;
}

    .promocion-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0 30px rgba(255, 77, 109, 0.2);
        border-color: #ff4d6d;
    }

/* --------------------------------------------
   5. BADGE DE DESCUENTO
-------------------------------------------- */
.promo-descuento-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: linear-gradient(135deg, #ff4d6d, #ff6b8a);
    color: #fff;
    padding: 8px 15px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 0 15px rgba(255, 77, 109, 0.5);
    animation: pulsePromo 1.5s infinite;
}

@keyframes pulsePromo {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 77, 109, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(255, 77, 109, 0.8);
    }
}

/* --------------------------------------------
   6. IMAGEN
-------------------------------------------- */
.promocion-imagen {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.promocion-card:hover .promocion-imagen {
    transform: scale(1.05);
}

.promocion-imagen-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #ff4d6d20, #ff4d6d05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ff4d6d;
}

/* --------------------------------------------
   7. BODY DE LA CARD
-------------------------------------------- */
.promocion-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.promocion-titulo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.promocion-descripcion {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* --------------------------------------------
   8. BADGE DE CURSOS
-------------------------------------------- */
.promocion-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
}

.badge-cursos, .badge-clases {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    margin: 0;
}

.badge-cursos {
    background: rgba(255, 77, 109, 0.2);
    color: #ff4d6d;
    border: 1px solid rgba(255, 77, 109, 0.3);
}

.badge-clases {
    background: rgba(0, 242, 254, 0.2);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.3);
}

    .badge-cursos i, .badge-clases i {
        font-size: 0.7rem;
        display: inline-flex;
        align-items: center;
    }

/* --------------------------------------------
   9. PRECIOS
-------------------------------------------- */
.promocion-precios {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.precio-original {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.precio-promo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00ff88;
}

    .precio-promo small {
        font-size: 0.8rem;
        color: #94a3b8;
    }

.ahorro-info {
    font-size: 0.8rem;
    color: #ffcc00;
    margin-top: 5px;
}

/* --------------------------------------------
   10. LISTA DE CURSOS
-------------------------------------------- */
.cursos-lista {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

    .cursos-lista h4 {
        font-size: 0.9rem;
        color: #ff4d6d;
        margin-bottom: 0.8rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.curso-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .curso-item:hover {
        background: rgba(255, 77, 109, 0.1);
        padding-left: 5px;
    }

.curso-nombre {
    color: #fff;
    flex: 1;
    word-break: break-word;
    font-size: 0.8rem;
}

.curso-precio {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.7rem;
    margin-right: 8px;
    white-space: nowrap;
}

.curso-precio-promo {
    color: #00ff88;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
}

.curso-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.curso-clases {
    font-size: 0.65rem;
    color: #00f2fe;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.curso-total-clases {
    margin-top: 10px;
    padding-top: 8px;
    text-align: right;
    font-size: 0.7rem;
    color: #ffcc00;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------
   11. BOTONES
-------------------------------------------- */
.promocion-buttons {
    display: flex;
    gap: 12px;
    margin-top: 1rem;
}

.btn-ver-detalle {
    flex: 1;
    background: transparent;
    border: 1px solid #ff4d6d;
    color: #ff4d6d;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

    .btn-ver-detalle:hover {
        background: #ff4d6d;
        color: #fff;
    }

.btn-comprar {
    flex: 1;
    background: linear-gradient(135deg, #ff4d6d, #ff6b8a);
    border: none;
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

    .btn-comprar:hover {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(255, 77, 109, 0.5);
    }

/* --------------------------------------------
   12. CRONÓMETRO EN VIVO
-------------------------------------------- */
.promocion-cronometro {
    background: linear-gradient(135deg, #0f1123, #1a1a3e);
    border: 1px solid rgba(255, 77, 109, 0.3);
    border-radius: 16px;
    padding: 15px 10px;
    margin-bottom: 1rem;
    text-align: center;
}

.cronometro-activo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cronometro-unidad {
    text-align: center;
    min-width: 60px;
}

.cronometro-numero {
    font-size: 1.8rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 12px;
    font-family: monospace;
    color: #ff4d6d;
    display: inline-block;
    min-width: 70px;
}

.cronometro-label {
    font-size: 0.7rem;
    color: #94a3b8;
    display: block;
    margin-top: 5px;
}

.cronometro-separador {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff4d6d;
    margin: 0 5px;
}

.cronometro-mensaje {
    font-size: 0.7rem;
    color: #ffcc00;
    margin-top: 10px;
}

.cronometro-terminado {
    text-align: center;
    padding: 10px;
    color: #ff4d6d;
    font-weight: bold;
}

/* --------------------------------------------
   13. LOADING Y EMPTY STATES
-------------------------------------------- */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.no-promociones {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
}

    .no-promociones i {
        font-size: 3rem;
        color: #ff4d6d;
        display: block;
        margin-bottom: 1rem;
    }

/* ============================================
   RESPONSIVE - PUNTO CLAVE
============================================ */

/* 📱 Pantallas de tablet (menos de 900px) */
@media (max-width: 900px) {
    .promocion-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0.5rem;
    }
}

/* 📱 Pantallas de móvil (menos de 700px) - UNA SOLA COLUMNA */
@media (max-width: 700px) {
    .promocion-grid {
        grid-template-columns: 1fr; /* 👈 UNA SOLA COLUMNA */
        gap: 1.5rem;
        padding: 0.5rem;
        max-width: 100%;
    }

    .promocion-card {
        max-width: 100%;
        width: 100%;
    }

    .promocion-hero {
        padding: 2rem 1.5rem;
    }

        .promocion-hero h1 {
            font-size: 1.8rem;
        }

        .promocion-hero p {
            font-size: 0.95rem;
        }

    /* Cronómetro más pequeño en móvil */
    .cronometro-numero {
        font-size: 1.4rem;
        min-width: 50px;
        padding: 5px 10px;
    }

    .cronometro-separador {
        font-size: 1.4rem;
        margin: 0 2px;
    }

    .cronometro-unidad {
        min-width: 45px;
    }

    .promocion-body {
        padding: 1rem;
    }

    .promocion-titulo {
        font-size: 1.1rem;
    }

    .precio-promo {
        font-size: 1.5rem;
    }

    .promocion-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .btn-ver-detalle, .btn-comprar {
        padding: 10px;
        font-size: 0.8rem;
    }

    .curso-item {
        flex-wrap: wrap;
        gap: 5px;
    }

    .curso-nombre {
        font-size: 0.75rem;
    }

    .curso-precio, .curso-precio-promo {
        font-size: 0.65rem;
    }
}

/* 📱 Móviles muy pequeños (menos de 400px) */
@media (max-width: 400px) {
    .promocion-hero h1 {
        font-size: 1.4rem;
    }

    .promocion-hero p {
        font-size: 0.8rem;
    }

    .cronometro-numero {
        font-size: 1.1rem;
        min-width: 40px;
        padding: 4px 6px;
    }

    .cronometro-separador {
        font-size: 1.1rem;
    }

    .cronometro-unidad {
        min-width: 35px;
    }

    .badge-cursos, .badge-clases {
        font-size: 0.6rem;
        padding: 3px 10px;
    }

    .promocion-titulo {
        font-size: 0.95rem;
    }

    .promocion-descripcion {
        font-size: 0.75rem;
    }

    .precio-original {
        font-size: 0.7rem;
    }

    .precio-promo {
        font-size: 1.2rem;
    }

    .promocion-body {
        padding: 0.8rem;
    }
}

/* --------------------------------------------
   MODAL DE DETALLE RESPONSIVE
-------------------------------------------- */
.modal-detalle-promo .modal-contenido {
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

@media (max-width: 700px) {
    .modal-detalle-promo .modal-contenido {
        width: 95%;
        padding: 1.2rem;
    }
}

.curso-detalle-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.curso-detalle-imagen {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.curso-detalle-info {
    flex: 1;
}

.curso-detalle-titulo {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
}

.curso-detalle-desc {
    font-size: 0.8rem;
    color: #94a3b8;
}

.curso-detalle-precios {
    text-align: right;
}
