/* ==============================================================
 * Archivo: events-list.css
 * Ruta: includes/modules/events-list/events-list.css
 *
 * Descripción:
 *  Estilos del listado de eventos:
 *   - Tarjetas horizontales tipo app.
 *   - Imagen a sangre SIN forzar la altura de la tarjeta en escritorio.
 *   - Cuerpo con título + píldoras (píldoras vienen del módulo pills).
 *   - Versión responsive mejorada para móvil (imagen más grande).
 * ============================================================== */

/* ========================= */
/*   CONTENEDOR PRINCIPAL    */
/* ========================= */

.ec-events-days-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 14px;
}

/* Día */
.ec-events-day-title {
    font-size: 21px;
    font-weight: 700;
    margin: 24px 0 14px;
    color: #111827;
}

/* Contenedor de tarjetas de un día */
.ec-events-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Mensaje vacío */
.ec-events-empty {
    max-width: 600px;
    margin: 30px auto;
    padding: 18px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px dashed #d1d5db;
    text-align: center;
    font-size: 15px;
    color: #6b7280;
}

/* ========================= */
/*          TARJETA          */
/* ========================= */

.ec-event-card {
    display: flex !important;

    /* ✅ En escritorio NO estiramos por defecto (evita que la imagen mande) */
    align-items: flex-start !important;

    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transition: all 0.2s ease;

    /* ✅ La altura la marca el contenido */
    height: auto;
    min-height: 120px; /* 🔧 mínimo compacto (ajusta 120-170 a tu gusto) */
}

.ec-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
}

/* ========================= */
/*           IMAGEN          */
/* ========================= */

.ec-event-card-thumb {
    flex: 0 0 170px !important;   /* ancho fijo en escritorio */
    max-width: 170px;
    background: #000;
    overflow: hidden;
    margin: 0;
    padding: 0;

    display: flex !important;
    align-items: stretch;

    /* ✅ La imagen NO fuerza la altura de la tarjeta */
    height: 100% !important;     /* se adapta a la altura real de la tarjeta */
    max-height: 170px;           /* pero NO crece infinito si el contenido es alto */
}

.ec-event-card-thumb img {
    flex: 1 1 auto;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    object-fit: cover !important;
    object-position: center;
    display: block !important;
    border-radius: 0;
    box-shadow: none;
}

/* ========================= */
/*        CONTENIDO          */
/* ========================= */

.ec-event-card-body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    /* ✅ Evita cortes de contenido/píldoras */
    overflow: visible;
}

.ec-event-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111827;
}

/* (Las píldoras se estilizan en includes/modules/pills/event-pills.css) */

/* ========================= */
/*   BOTÓN "VER X DÍA"       */
/* ========================= */

.ec-events-load-more-wrap {
    max-width: 900px;
    margin: 24px auto 0;
    padding: 0 14px;
    display: flex;
    justify-content: center;
}

.ec-events-load-more-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #111827;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ec-events-load-more-btn:hover {
    background: #020617;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.4);
}

.ec-events-load-more-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.25);
}

/* Círculo cargando */
.ec-events-load-more-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(248, 250, 252, 0.4);
    border-top-color: #f9fafb;
    display: none;
    animation: ec-events-spin 0.8s linear infinite;
}

/* Cuando está cargando, mostramos el spinner */
.ec-events-load-more-btn.is-loading .ec-events-load-more-spinner {
    display: inline-block;
}

/* Animación del giro */
@keyframes ec-events-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================= */
/*        RESPONSIVE         */
/* ========================= */

@media (max-width: 768px) {

    .ec-events-days-layout {
        max-width: 100%;
        padding: 0 10px;
    }

    .ec-event-card {
        flex-direction: column !important;
        border-radius: 22px;
        height: auto;
        min-height: 0; /* en móvil no hace falta forzar mínimo */
    }

    .ec-event-card-thumb {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: none;

        /* imagen hero en móvil */
        height: 230px !important;
        max-height: none; /* ✅ en móvil sí puede ser hero sin límite */
    }

    .ec-event-card-thumb img {
        height: 100% !important;
        min-height: 0;
    }

    .ec-event-card-body {
        padding: 16px;
    }

    .ec-event-card-title {
        font-size: 17px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {

    .ec-event-card-thumb {
        height: 240px !important;
    }

    .ec-event-card-title {
        font-size: 18px;
    }
}
