/* ==========================================================
   ESTILOS UNIFICADOS: PRODUCTOS (CURSOS Y EVENTOS) - KAIROSER
   ========================================================== */

:root {
    /* Colores Principales Kairoser */
    --amarillo: #ffcc33; /* Profesion y Finanzas */
    --verde: #48c2c5;    /* Desarrollo Personal */
    --rojo: #ff6666;     /* Vida y Relaciones */
    --azul: #535fab;     /* Salud y Vitalidad */
    
    --primary: var(--verde);
    --secondary: #2c3e50;
    --accent: var(--amarillo);
    --text-muted: #666;
    --bg-light: #f8f9fa;
    
    /* Variables específicas de Eventos */
    --event-primary: var(--verde);
    --event-secondary: var(--secondary);
    --event-accent: var(--amarillo);
    --event-bg: #fdfdfb;
    --event-card-bg: #ffffff;
}

/* --- HERO SECTIONS --- */
.course-hero, .events-hero, .hero-products, .event-hero-detail {
    color: white;
    padding: 80px 0;
    text-align: center;
    background-color: var(--secondary);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.course-hero .antetitulo, 
.events-hero .antetitulo, 
.hero-products .antetitulo {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.course-hero h1, 
.events-hero h1, 
.hero-products h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.1;
}

.course-hero p, 
.events-hero p, 
.hero-products p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}
.event-hero-detail { padding: 120px 0 80px; }

/* --- LAYOUTS --- */
.course-layout, .event-detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    max-width: 1200px;
    margin: -50px auto 80px;
    padding: 0 20px;
}

.event-detail-layout { grid-template-columns: 1fr 380px; margin-top: -60px; }

.events-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* --- CARDS: EVENTOS --- */
.event-card {
    background: var(--event-card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.event-image { position: relative; height: 220px; }
.event-image img { width: 100%; height: 100%; object-fit: cover; }

.event-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.9);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
}

.event-date-tag {
    position: absolute;
    bottom: -15px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.event-date-tag .day { font-size: 1.2rem; font-weight: 800; display: block; line-height: 1; }
.event-date-tag .month { font-size: 0.7rem; text-transform: uppercase; font-weight: 700; }

.event-content {
    padding: 30px 25px 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-type-label {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
    letter-spacing: 1px;
}

.event-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--secondary);
    line-height: 1.3;
}

.event-info-list {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: #666;
}

.event-info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.event-info-list i { color: var(--primary); width: 16px; }

.event-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-price { font-weight: 800; font-size: 1.2rem; color: var(--secondary); }
.event-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.event-link:hover { color: var(--secondary); }

/* --- SIDEBARS / PURCHASE CARDS --- */
.purchase-card, .event-booking-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 30px;
    position: sticky;
    top: 100px;
    z-index: 10;
}

.event-booking-card { border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); text-align: center; }

.price-tag {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
}

.feature-list-small {
    list-style: none;
    padding: 0;
    margin: 20px 0; font-size: 0.95rem;
}

.feature-list-small li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.feature-list-small i {
    color: var(--primary);
    width: 20px;
}

.btn-buy-now {
    display: block;
    width: 100%;
    background: var(--accent);
    color: var(--secondary);
    padding: 18px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.btn-buy-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.4);
    background: #e6b800;
}

/* --- CONTENIDO PRINCIPAL --- */
.course-main-content section, .event-main-info {
    margin-bottom: 50px;
    padding-top: 50px;
}

.event-main-info {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--secondary);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
}

.benefit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.benefit-item {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.benefit-item i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 3px;
}

/* --- ACORDEONES Y AGENDA --- */
.module-item, .agenda-item {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.agenda-item { display: flex; gap: 20px; padding: 15px 0; border: none; border-bottom: 1px solid #eee; border-radius: 0; }
.agenda-item:last-child { border-bottom: none; }
.agenda-time { font-weight: 700; color: var(--primary); min-width: 80px; }

.module-header {
    background: white;
    padding: 18px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s;
}

.module-header:hover { background: #fcfcfc; }

.module-body {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    background: var(--bg-light);
    color: var(--text-muted);
    line-height: 1.6;
}

.module-item.active .module-body {
    padding: 20px 25px;
    max-height: 400px; /* Incrementado para seguridad */
}

.module-item.active .fa-chevron-down { transform: rotate(180deg); }

/* --- CAJAS ESPECIALES --- */
.garantia-box {
    background: #fffdf0;
    border: 2px dashed #f1c40f;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-top: 40px;
}

.garantia-box i { font-size: 3rem; color: #f1c40f; margin-bottom: 15px; }

.upcoming-dates-box, .event-agenda-box {
    margin-top: 40px;
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 12px;
}

.event-agenda-box { background: #f9fbf9; }

.upcoming-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--secondary);
}

.upcoming-header i { font-size: 1.5rem; }
.upcoming-header h3 { margin: 0; font-size: 1.6rem; }

.upcoming-table-wrapper { overflow-x: auto; }
.upcoming-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.upcoming-table th { text-align: left; background: #f1f1f1; padding: 12px 15px; font-family: 'Montserrat', sans-serif; font-weight: 700; }
.upcoming-table td { padding: 15px; border-bottom: 1px solid #eee; }

.td-fecha { white-space: nowrap; color: var(--primary); }
.td-info { font-size: 0.95rem; color: #444; }

.btn-info-small {
    display: inline-block;
    padding: 8px 15px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.3s;
}

.btn-info-small:hover { background: var(--secondary); }

/* --- COLORES DINÁMICOS POR CATEGORÍA (EVENTOS) --- */
.cat-retiro .event-date-tag { background: var(--azul); }
.cat-retiro .event-type-label { color: var(--azul); }
.cat-retiro .event-link { color: var(--azul); }
.cat-retiro .event-info-list i { color: var(--azul); }
.cat-retiro #evento-categoria { background: var(--azul); color: white; }
.cat-retiro #btn-inscripcion { background: var(--azul); }

.cat-taller .event-date-tag { background: var(--verde); }
.cat-taller .event-type-label { color: var(--verde); }
.cat-taller .event-link { color: var(--verde); }
.cat-taller .event-info-list i { color: var(--verde); }
.cat-taller #evento-categoria { background: var(--verde); color: white; }
.cat-taller #btn-inscripcion { background: var(--verde); }

.cat-masterclass .event-date-tag { background: var(--rojo); }
.cat-masterclass .event-type-label { color: var(--rojo); }
.cat-masterclass .event-link { color: var(--rojo); }
.cat-masterclass .event-info-list i { color: var(--rojo); }
.cat-masterclass #evento-categoria { background: var(--rojo); color: white; }
.cat-masterclass #btn-inscripcion { background: var(--rojo); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .events-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .course-layout, .event-detail-layout { grid-template-columns: 1fr; }
    .purchase-card, .event-sidebar-detail { position: static; margin-top: 20px; order: -1; }
    .benefit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .course-hero h1,
    .events-hero h1,
    .hero-products h1 {
        font-size: 2.5rem;
    }
    .course-hero p,
    .events-hero p,
    .hero-products p {
        font-size: 1.1rem;
    }
    .events-grid { grid-template-columns: 1fr; }
    .upcoming-table, .upcoming-table thead, .upcoming-table tbody, .upcoming-table th, .upcoming-table td, .upcoming-table tr {
        display: block;
    }
    .upcoming-table thead { display: none; }
    .upcoming-table tr { margin-bottom: 15px; border: 1px solid #eee; border-radius: 8px; padding: 10px; }
    .upcoming-table td { border: none; padding: 5px; }
    .td-accion { text-align: center; margin-top: 10px; }
}
