/**
 * Estilos del frontend para la ficha individual de Exposición
 */

.em-exposicion-single {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    font-family: inherit;
    color: #2c3e50;
}

/* ============================================
   HERO (título arriba, imagen mediana debajo)
   ============================================ */
.em-hero {
    margin-bottom: 36px;
    text-align: center;
}

.em-hero-contenido {
    margin-bottom: 32px;
}

.em-hero-imagen {
    max-width: 720px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: #f0f6fb;
}

.em-hero-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ribbon de tipo */
.em-ribbon {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.em-ribbon-presentacion {
    background: linear-gradient(135deg, #6babcc 0%, #5196bb 100%);
}

.em-ribbon-jornada {
    background: linear-gradient(135deg, #5196bb 0%, #3d7aac 100%);
}

.em-ribbon-debate {
    background: linear-gradient(135deg, #2e5f7e 0%, #1f4561 100%);
}

.em-titulo {
    font-size: 42px;
    line-height: 1.15;
    font-weight: 700;
    margin: 0 0 14px;
    color: #1a2b3c;
}

.em-subtitulo {
    font-size: 20px;
    font-style: italic;
    color: #5b6b7b;
    margin: 0;
    line-height: 1.4;
    max-width: 760px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .em-titulo {
        font-size: 30px;
    }
    .em-subtitulo {
        font-size: 17px;
    }

}

/* ============================================
   TARJETA DE INFO
   ============================================ */
.em-info-card {
    background: #f8fbfd;
    border: 1px solid #e1ecf4;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 36px;
    box-shadow: 0 4px 16px rgba(93, 173, 226, 0.08);
}

.em-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    align-items: center;
}

.em-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.em-info-icono {
    font-size: 28px;
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(93, 173, 226, 0.15);
}

.em-info-texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}

.em-info-texto strong {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7b8a9a;
    font-weight: 700;
}

.em-info-texto span {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
}

/* Botón Google Maps */
.em-info-cta {
    justify-content: center;
}

.em-boton-maps {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.35);
    transition: all 0.2s ease;
}

.em-boton-maps:hover {
    background: linear-gradient(135deg, #3498db 0%, #2874a6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(93, 173, 226, 0.5);
    color: #fff !important;
}

/* ============================================
   DESCRIPCIÓN
   ============================================ */
.em-descripcion {
    font-size: 17px;
    line-height: 1.75;
    color: #3c4856;
    max-width: 800px;
    margin: 0 auto 48px;
}

.em-descripcion p {
    margin: 0 0 18px;
}

/* ============================================
   SECCIONES (vídeo, galería)
   ============================================ */
.em-seccion-titulo {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #1a2b3c;
    padding-bottom: 12px;
    border-bottom: 3px solid #5dade2;
    display: inline-block;
}

/* ============================================
   VÍDEO YOUTUBE
   ============================================ */
.em-video {
    margin-bottom: 48px;
}

.em-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.em-video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================
   GALERÍA
   ============================================ */
.em-galeria {
    margin-bottom: 24px;
}

.em-galeria-grid-public {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.em-galeria-item-public {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
}

.em-galeria-item-public img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.em-galeria-item-public:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.em-galeria-item-public:hover img {
    transform: scale(1.08);
}

/* ============================================
   MIGAS DE PAN
   ============================================ */
.em-exposicion-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.em-breadcrumbs {
    padding: 24px 0 12px;
    border-bottom: 1px solid #eef3f7;
    margin-bottom: 30px;
}

.em-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #5dade2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.em-breadcrumb-link:hover {
    color: #2874a6;
    transform: translateX(-3px);
}

/* Ajustar el padding del article ya que ahora está dentro del wrapper */
.em-exposicion-wrapper .em-exposicion-single {
    padding: 0 0 60px;
    max-width: 100%;
}

/* ============================================
   MAPA EMBEBIDO
   ============================================ */
.em-mapa {
    margin-bottom: 48px;
}

.em-mapa-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    background: #f0f6fb;
}

.em-mapa-wrapper iframe {
    display: block;
    width: 100%;
}

.em-mapa-enlace {
    margin: 14px 0 0;
    text-align: right;
}

.em-mapa-enlace a {
    color: #5dade2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.em-mapa-enlace a:hover {
    color: #2874a6;
    text-decoration: underline;
}

/* ============================================
   NOTAS DE PRENSA (FRONTEND)
   ============================================ */
.em-prensa-public {
    margin-bottom: 48px;
}

.em-prensa-public-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.em-prensa-public-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e1ecf4;
    border-radius: 10px;
    text-decoration: none !important;
    color: #2c3e50;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.em-prensa-public-item a:hover {
    border-color: #5dade2;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(93, 173, 226, 0.18);
    background: #f8fbfd;
}

.em-prensa-icono {
    font-size: 24px;
    width: 42px;
    height: 42px;
    background: #f0f6fb;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.em-prensa-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.em-prensa-texto strong {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 700;
}

.em-prensa-texto small {
    font-size: 12px;
    color: #7b8a9a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.em-prensa-flecha {
    color: #5dade2;
    font-size: 20px;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.em-prensa-public-item a:hover .em-prensa-flecha {
    transform: translateX(4px);
}

/* ============================================
   GALERÍA: icono de zoom al hover
   ============================================ */
.em-galeria-item-public {
    position: relative;
    cursor: zoom-in;
}

.em-galeria-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 50px;
    height: 50px;
    background: rgba(93, 173, 226, 0.95);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
}

.em-galeria-item-public:hover .em-galeria-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   LIGHTBOX (CAJA DE LUZ)
   ============================================ */
.em-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.em-lightbox-overlay.em-lightbox-activo {
    display: flex;
    opacity: 1;
}

.em-lightbox-contenido {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#em-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease;
}

#em-lightbox-img.em-lightbox-cargando {
    opacity: 0.5;
}

#em-lightbox-contador {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 0;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Botones del lightbox */
.em-lightbox-cerrar,
.em-lightbox-prev,
.em-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
    line-height: 1;
}

.em-lightbox-cerrar:hover,
.em-lightbox-prev:hover,
.em-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.em-lightbox-cerrar {
    top: 24px;
    right: 24px;
    font-size: 22px;
}

.em-lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
}

.em-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.em-lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
}

.em-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 600px) {
    .em-lightbox-cerrar,
    .em-lightbox-prev,
    .em-lightbox-next {
        width: 42px;
        height: 42px;
    }
    .em-lightbox-prev,
    .em-lightbox-next {
        font-size: 28px;
    }

}


/* Estados temporales de exposiciones */
.em-ribbon-actuales,
.em-tarjeta-ribbon.em-ribbon-actuales {
    background: linear-gradient(135deg, #5196bb 0%, #3d7aac 100%);
}

.em-ribbon-proximas,
.em-tarjeta-ribbon.em-ribbon-proximas {
    background: linear-gradient(135deg, #6babcc 0%, #5196bb 100%);
}

.em-ribbon-pasadas,
.em-tarjeta-ribbon.em-ribbon-pasadas {
    background: linear-gradient(135deg, #2e5f7e 0%, #1f4561 100%);
}
