/* =========================================
   School-style photo gallery (shared)
   ========================================= */

.gallery-section {
    background: linear-gradient(180deg, #eef4fc 0%, #ffffff 100%);
    padding: 90px 0 75px;
    overflow: hidden;
}

.gallery-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.gallery-heading-label {
    display: inline-block;
    color: #1d4ed8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 14px;
    margin-bottom: 12px;
}

.gallery-heading-title {
    font-size: 42px;
    font-weight: 800;
    color: #0b1c39;
    margin-bottom: 16px;
    line-height: 1.25;
}

.gallery-heading-line {
    width: 72px;
    height: 4px;
    background: linear-gradient(90deg, #1d4ed8, #3b82f6);
    margin: 0 auto 22px;
    border-radius: 4px;
}

.gallery-heading-text {
    color: #5a6478;
    font-size: 17px;
    line-height: 1.75;
    max-width: 780px;
    margin: 0 auto;
}

/* Grid */
.school-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.school-gallery-item {
    margin: 0;
}

.school-gallery-card {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #0b1c39;
    box-shadow: 0 8px 24px rgba(11, 28, 57, 0.12);
    cursor: pointer;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.school-gallery-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
    transition: border-color 0.35s ease;
}

.school-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(11, 28, 57, 0.22);
}

.school-gallery-card:hover::before {
    border-color: rgba(255, 255, 255, 0.35);
}

.school-gallery-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.school-gallery-card:hover img {
    transform: scale(1.04);
}

/* Navy overlay — school event gallery style */
.school-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 28px 26px;
    background: linear-gradient(
        180deg,
        rgba(11, 28, 57, 0.05) 0%,
        rgba(11, 28, 57, 0.45) 45%,
        rgba(15, 45, 110, 0.88) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.school-gallery-card:hover .school-gallery-overlay {
    opacity: 1;
}

.school-gallery-overlay h4 {
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.school-gallery-overlay p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

.school-gallery-overlay .gallery-event-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* View all button */
.gallery-actions {
    text-align: center;
    margin-top: 42px;
}

.gallery-btn-primary {
    display: inline-block;
    background: #1d4ed8;
    color: #fff !important;
    padding: 14px 36px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(29, 78, 216, 0.3);
    transition: background 0.3s ease, transform 0.3s ease;
}

.gallery-btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    color: #fff !important;
}

/* Empty state */
.no-gallery-box {
    grid-column: 1 / -1;
    background: #fff;
    padding: 70px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px dashed #c5d4e8;
}

.gallery-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.no-gallery-box h3 {
    font-size: 28px;
    font-weight: 700;
    color: #0b1c39;
    margin-bottom: 10px;
}

.no-gallery-box p {
    color: #64748b;
    font-size: 16px;
    margin: 0;
}

/* Pagination (full gallery page) */
.gallery-pagination {
    margin-top: 48px;
}

.gallery-pagination .pagination {
    gap: 10px;
}

.gallery-pagination .page-link {
    border: none;
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    background: #fff;
    color: #1d4ed8;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: 0.3s ease;
}

.gallery-pagination .page-link:hover {
    background: #1d4ed8;
    color: #fff;
}

.gallery-pagination .page-item.active .page-link {
    background: #1d4ed8;
    color: #fff;
}

.gallery-pagination .page-link:focus {
    box-shadow: none;
}

@media (max-width: 991px) {
    .school-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .school-gallery-card img {
        height: 260px;
    }

    .gallery-heading-title {
        font-size: 34px;
    }
}

@media (max-width: 575px) {
    .gallery-section {
        padding: 70px 0 55px;
    }

    .school-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .school-gallery-card img {
        height: 240px;
    }

    .school-gallery-overlay {
        padding: 22px 20px;
    }

    .school-gallery-overlay h4 {
        font-size: 22px;
    }

    .gallery-heading-title {
        font-size: 28px;
    }
}
