/**
 * Estilos Frontend - Carga de Eventos Enfray
 * Compatible con Elementor, Gutenberg y temas WordPress
 */

/* ==========================================================================
   1. Filtro por Ciudad
   ========================================================================== */

.enfray-filter-wrapper {
    margin-bottom: 30px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.enfray-filter-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.enfray-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.enfray-city-filter-btn {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    padding: 7px 16px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.enfray-city-filter-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.enfray-city-filter-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.enfray-city-empty {
    text-align: center;
    padding: 40px 20px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 24px;
}

/* Animación de entrada suave para tarjetas filtradas */
.enfray-fade-in {
    animation: enfrayFadeIn 0.35s ease forwards;
}

@keyframes enfrayFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   2. Contenedor y Rejilla de Tarjetas (Listado de Eventos /eventos)
   ========================================================================== */

.enfray-eventos-container {
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}

.enfray-eventos-grid {
    display: grid;
    gap: 28px;
    box-sizing: border-box;
    align-items: start;
}

/* Columnas responsivas */
.enfray-cols-1 {
    grid-template-columns: 1fr;
}

.enfray-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.enfray-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.enfray-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 991px) {
    .enfray-cols-3,
    .enfray-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .enfray-cols-2,
    .enfray-cols-3,
    .enfray-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Tarjeta del evento */
.enfray-evento-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eef0f4;
}

.enfray-evento-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Imagen destacada en tarjeta (SE VE COMPLETA, SIN RECORTES) */
.enfray-evento-img-wrapper {
    position: relative;
    width: 100%;
    background-color: #f8fafc;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enfray-card-img-link {
    display: block;
    width: 100%;
    line-height: 0;
}

.enfray-evento-img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.enfray-evento-card:hover .enfray-evento-img {
    transform: scale(1.02);
    opacity: 0.96;
}

/* Contenido de tarjeta */
.enfray-evento-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Badges contenedor */
.enfray-evento-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

/* Fechas / Badges */
.enfray-evento-dates {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    width: fit-content;
    border: 1px solid #dbeafe;
}

.enfray-date-icon {
    font-size: 0.92rem;
}

/* Badge de Ciudad */
.enfray-evento-city-badge {
    display: inline-flex;
    align-items: center;
    background-color: #ecfdf5;
    color: #047857;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
}

/* Badge de Ubicación / Recinto */
.enfray-evento-location-badge {
    display: inline-flex;
    align-items: center;
    background-color: #f1f5f9;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
}

/* Título de tarjeta */
.enfray-evento-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
}

.enfray-evento-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.enfray-evento-title a:hover {
    color: #2563eb;
}

/* Descripción corta */
.enfray-evento-desc {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.enfray-evento-desc p {
    margin: 0 0 8px 0;
}

.enfray-evento-desc p:last-child {
    margin-bottom: 0;
}

/* Botón / Footer */
.enfray-evento-footer {
    margin-top: auto;
    padding-top: 10px;
}

.enfray-evento-btn {
    display: inline-block;
    background-color: #2563eb;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    width: 100%;
}

.enfray-evento-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Mensaje cuando no hay eventos */
.enfray-eventos-empty {
    text-align: center;
    padding: 48px 20px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    font-size: 1.05rem;
}

/* ==========================================================================
   3. Plantilla de Entrada Individual de Evento (Single Event Page)
   ========================================================================== */

.enfray-single-main {
    padding: 40px 20px;
    background-color: #f8fafc;
    min-height: 60vh;
}

.enfray-single-container {
    max-width: 860px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .enfray-single-main {
        padding: 20px 10px;
    }
    .enfray-single-container {
        padding: 24px 16px;
        border-radius: 12px;
    }
}

.enfray-single-nav {
    margin-bottom: 24px;
}

.enfray-back-link {
    display: inline-flex;
    align-items: center;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.enfray-back-link:hover {
    color: #1d4ed8;
    transform: translateX(-4px);
    text-decoration: underline;
}

.enfray-single-header {
    margin-bottom: 24px;
}

.enfray-single-badges {
    margin-bottom: 16px;
}

.enfray-single-dates {
    font-size: 0.95rem;
    padding: 7px 16px;
}

.enfray-single-city-badge {
    font-size: 0.95rem;
    padding: 7px 16px;
}

.enfray-single-location-badge {
    font-size: 0.95rem;
    padding: 7px 16px;
}

.enfray-single-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0;
}

@media (max-width: 768px) {
    .enfray-single-title {
        font-size: 1.7rem;
    }
}

/* Imagen destacada en entrada individual (SE VE COMPLETA, SIN RECORTES) */
.enfray-single-thumbnail {
    width: 100%;
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f8fafc;
    text-align: center;
}

.enfray-single-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

.enfray-single-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 36px;
}

.enfray-single-content p {
    margin-bottom: 1.4em;
}

.enfray-single-action {
    margin: 36px 0;
    text-align: center;
}

.enfray-btn-large {
    display: inline-block;
    width: auto !important;
    min-width: 260px;
    padding: 14px 28px;
    font-size: 1.05rem;
}

.enfray-single-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    margin-top: 40px;
}
