/**
 * Reseña Histórica - I.E.S.P.P. HZG
 * Línea de tiempo, placa de reconocimiento, imagen de apoyo
 */
.resena {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 2rem 0;
}

.resena-header {
    margin-bottom: 2rem;
    text-align: left;
}
.resena-title {
    margin: 0 0 0.35rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primario, #1e4a7e);
}
.resena-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: #5a6c5d;
    font-style: italic;
}

/* Imagen de apoyo */
.resena-imagen {
    margin: 3rem 0 2.5rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    background: var(--fondo, #f4f5f6);
}
.resena-imagen img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
}
.resena-imagen-placeholder {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #e8ebe9 0%, #dde2e0 100%);
    border: 2px dashed var(--borde, #dee2e6);
}
.resena-imagen-placeholder-text {
    font-size: 0.95rem;
    color: #6c757d;
}
.resena-imagen-caption {
    margin: 0;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #6c757d;
    background: #f8f9fa;
    text-align: center;
}

/* Línea de tiempo */
.resena-timeline {
    margin-bottom: 2.5rem;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    background: #fff;
    border: 1px solid var(--borde, #dee2e6);
    border-radius: 10px;
    border-left: 4px solid var(--color-primario, #1e4a7e);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.resena-h2 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primario, #1e4a7e);
}
.resena-timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: timeline;
}
.resena-timeline-item {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 1.25rem;
    counter-increment: timeline;
}
.resena-timeline-item:last-child {
    margin-bottom: 0;
}
.resena-timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primario, #1e4a7e);
    box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.2);
}
.resena-timeline-item::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 1.25rem;
    bottom: -1.25rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primario, #1e4a7e), transparent);
    opacity: 0.4;
}
.resena-timeline-item:last-child::after {
    display: none;
}
.resena-timeline-fecha {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-primario-oscuro, #163566);
    margin-bottom: 0.25rem;
}
.resena-timeline-texto {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--texto, #2c3e50);
    text-align: justify;
}

/* Placa de reconocimiento */
.resena-placa {
    margin-bottom: 2.5rem;
    padding: 1.75rem 2rem;
    text-align: center;
    background: linear-gradient(145deg, var(--color-primario, #1e4a7e) 0%, var(--color-primario-oscuro, #163566) 100%);
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(15, 61, 48, 0.35);
    border: 1px solid rgba(255,255,255,0.1);
}
.resena-placa-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.resena-placa-sub {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    opacity: 0.92;
    text-align: justify;
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}
.resena-placa-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.7;
}
.resena-placa-list li {
    margin-bottom: 0.35rem;
}
.resena-placa-list strong {
    color: rgba(255,255,255,0.95);
}

/* Cuerpo del texto */
.resena-body {
    font-size: 1rem;
    line-height: 1.7;
}
.resena-section {
    margin-bottom: 2rem;
}
.resena-section:last-child {
    margin-bottom: 0;
}
.resena-section .resena-h2 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}
.resena-section p {
    margin: 0 0 1rem 0;
    color: var(--texto, #2c3e50);
    text-align: justify;
}
.resena-body p { text-align: justify; }
.resena-section p:last-child {
    margin-bottom: 0;
}

/* Galería (antes del pie de página) - interactiva y animada */
.resena-galeria {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--borde, #dee2e6);
}
.resena-galeria .resena-h2 {
    margin-bottom: 1rem;
}
.resena-galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.resena-galeria-item {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--fondo, #f4f5f6);
    aspect-ratio: 4/3;
}
.resena-galeria-thumb {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    cursor: pointer;
    background: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.resena-galeria-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.resena-galeria-thumb:focus {
    outline: 2px solid var(--color-primario, #1e4a7e);
    outline-offset: 2px;
}
.resena-galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.resena-galeria-thumb:hover img {
    transform: scale(1.08);
}

/* Lightbox (modal animado) */
.resena-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.resena-lightbox.resena-lightbox-open {
    opacity: 1;
    visibility: visible;
}
.resena-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    cursor: pointer;
}
.resena-lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
    animation: resena-lightbox-in 0.35s ease;
}
.resena-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
@keyframes resena-lightbox-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.resena-lightbox-close,
.resena-lightbox-prev,
.resena-lightbox-next {
    position: absolute;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
    padding: 0;
}
.resena-lightbox-close:hover,
.resena-lightbox-prev:hover,
.resena-lightbox-next:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.05);
}
.resena-lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
}
.resena-lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
.resena-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.05);
}
.resena-lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
.resena-lightbox-next:hover {
    transform: translateY(-50%) scale(1.05);
}
.resena-lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .resena {
        padding: 0 0 1.5rem 0;
    }
    .resena-title {
        font-size: 1.45rem;
    }
    .resena-subtitle {
        font-size: 1rem;
    }
    .resena-timeline {
        padding: 1.25rem 1.25rem 1.25rem 2rem;
    }
    .resena-placa {
        padding: 1.25rem 1.25rem;
    }
    .resena-placa-title {
        font-size: 1.05rem;
    }
    .resena-galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}
