/* =========================================================
   Vida escolar — mosaic gallery (Inicio)
========================================================= */

.ve-gallery {
    --ve-navy: #0a1a3a;
    --ve-blue: #2f6fed;
    --ve-muted: #64748b;
    --ve-radius: 16px;
    --ve-trans: all .35s cubic-bezier(.4, 0, .2, 1);
    padding: 30px 0;
    background: #fff;
}

/* Header: badge arriba, título abajo */
.ve-gallery .ve-section-head,
.ve-section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ve-gallery .ve-section-label,
.ve-section-label {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-family: "Josefin Sans", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #2f6fed;
    background: rgba(47, 111, 237, .1);
    border-radius: 30px;
    padding: 6px 20px;
    margin-bottom: 0;
    white-space: nowrap;
    line-height: 1.4;
}

.ve-gallery .ve-section-title,
.ve-section-title {
    font-family: "Josefin Sans", sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 900;
    color: #0a1a3a;
    line-height: 1.25;
    margin-bottom: 0;
    display: inline-block;
    position: relative;
}
.ve-gallery .ve-section-title::after,
.ve-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    transform: none;
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2f6fed 30%, #f0a500 70%, transparent);
    border-radius: 2px;
}

.ve-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 240px 240px;
    gap: 12px;
    border-radius: var(--ve-radius);
    overflow: hidden;
}

.ve-gal-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
}

.ve-gal-item:nth-child(1) {
    grid-row: span 2;
}

.ve-gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.ve-gal-item:hover img {
    transform: scale(1.08);
}

.ve-gal-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 26, 58, .7), transparent);
    opacity: 0;
    transition: var(--ve-trans);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.ve-gal-item:hover .ve-gal-overlay {
    opacity: 1;
}

.ve-gal-overlay span {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .ve-gallery {
        padding: 60px 0;
    }

    .ve-gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .ve-gal-item:nth-child(1) {
        grid-row: span 1;
        min-height: 220px;
    }

    .ve-gal-item {
        min-height: 180px;
    }
}

@media (max-width: 576px) {
    .ve-gallery-grid {
        grid-template-columns: 1fr;
    }

    .ve-gal-item {
        min-height: 200px;
    }
}
