/* =========================================================
   FR. AGNEL SCHOOL - PUBLIC GALLERY
   ========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* =========================================================
   PAGE
========================================================= */

.gallery-page {
    width: 100%;

    min-height: 100vh;

    font-family: 'Inter', sans-serif;

    background: #f7f9fc;

    color: #222;
}


body.gallery-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   CONTAINER
========================================================= */

.gallery-container {
    width: 90%;

    max-width: 1100px;

    margin: 0 auto;
}


/* =========================================================
   HERO
========================================================= */

.gallery-hero {
    padding: 150px 0 70px;

    background:
        linear-gradient(
            135deg,
            #0f3d91,
            #174fae
        );

    color: #fff;

    text-align: center;
}


.gallery-hero .page-tag {
    display: inline-block;

    margin-bottom: 15px;

    padding: 6px 14px;

    border:
        1px solid
        rgba(255, 255, 255, 0.5);

    border-radius: 20px;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1.5px;
}


.gallery-hero h1 {
    margin: 0;

    font-size: 42px;

    font-weight: 800;

    line-height: 1.2;
}


.gallery-hero p {
    max-width: 600px;

    margin: 15px auto 0;

    font-size: 16px;

    line-height: 1.7;

    opacity: 0.9;
}


/* =========================================================
   CONTENT SECTION
========================================================= */

.gallery-message {
    padding: 80px 0 100px;
}


/* =========================================================
   EVENT CARD
========================================================= */

.gallery-event {
    overflow: hidden;

    margin-bottom: 30px;

    background: #fff;

    border:
        1px solid
        #e2e6ed;

    border-radius: 18px;

    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.07);

    transition:
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.gallery-event:hover {
    border-color: #d7dce4;

    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.1);
}


/* =========================================================
   EVENT OPEN BUTTON
========================================================= */

.gallery-event-open {
    display: flex;

    align-items: center;

    width: 100%;

    padding: 20px;

    gap: 22px;

    border: none;

    background: #fff;

    color: inherit;

    font-family: inherit;

    text-align: left;

    cursor: pointer;
}


/* =========================================================
   EVENT THUMBNAIL
========================================================= */

.gallery-event-thumbnail {
    position: relative;

    flex: 0 0 180px;

    width: 180px;

    height: 120px;

    overflow: hidden;

    background: #eee;

    border-radius: 12px;
}


.gallery-event-thumbnail img {
    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition:
        transform 0.35s ease;
}


.gallery-event-open:hover
.gallery-event-thumbnail img {
    transform: scale(1.05);
}


/* =========================================================
   PHOTO COUNT
========================================================= */

.gallery-event-photo-count {
    position: absolute;

    right: 8px;

    bottom: 8px;

    padding: 5px 9px;

    background:
        rgba(0, 0, 0, 0.72);

    border-radius: 6px;

    color: #fff;

    font-size: 11px;

    font-weight: 700;
}


/* =========================================================
   EVENT INFORMATION
========================================================= */

.gallery-event-info {
    min-width: 0;
}


.gallery-event-tag {
    display: inline-block;

    margin-bottom: 10px;

    padding: 5px 10px;

    background: #f2f6ff;

    border-radius: 20px;

    color: #0f3d91;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1px;
}


.gallery-event-info h2 {
    margin: 0 0 9px;

    color: #0f3d91;

    font-size: 27px;

    font-weight: 800;

    line-height: 1.3;
}


.gallery-expand-text {
    color: #777;

    font-size: 12px;

    font-weight: 600;
}


/* =========================================================
   EXPANDED EVENT
========================================================= */

.gallery-event-expanded {
    display: none;

    padding: 0 20px 25px;

    border-top:
        1px solid
        #e6e8ed;
}


.gallery-event.expanded
.gallery-event-expanded {
    display: block;
}


/* =========================================================
   EXPANDED HEADER
========================================================= */

.gallery-expanded-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 20px 0;
}


.gallery-expanded-header div {
    display: flex;

    flex-direction: column;

    gap: 5px;
}


.gallery-expanded-header strong {
    color: #0f3d91;

    font-size: 15px;

    font-weight: 700;
}


.gallery-expanded-header span {
    color: #777;

    font-size: 12px;
}


.gallery-collapse-button {
    padding: 7px 12px;

    border: none;

    background: transparent;

    color: #666;

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;
}


.gallery-collapse-button:hover {
    color: #0f3d91;
}


/* =========================================================
   PHOTO GRID
========================================================= */

.gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   PHOTO BUTTON
========================================================= */

.gallery-photo {
    position: relative;

    display: block;

    width: 100%;

    padding: 0;

    overflow: hidden;

    aspect-ratio: 4 / 3;

    background: #eee;

    border: none;

    border-radius: 12px;

    cursor: pointer;

    line-height: 0;
}


.gallery-photo img {
    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition:
        transform 0.3s ease,
        opacity 0.25s ease;
}


.gallery-photo:hover img {
    transform: scale(1.05);

    opacity: 0.9;
}


/* =========================================================
   PHOTO NUMBER
========================================================= */

.gallery-photo-number {
    position: absolute;

    top: 9px;

    left: 9px;

    padding: 5px 8px;

    background:
        rgba(0, 0, 0, 0.7);

    border-radius: 5px;

    color: #fff;

    font-size: 11px;

    font-weight: 700;

    line-height: 1;
}


/* =========================================================
   EMPTY GALLERY CARD
========================================================= */

.gallery-card {
    max-width: 650px;

    margin: 0 auto;

    padding: 55px 45px;

    background: #fff;

    border-radius: 18px;

    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, 0.08);

    text-align: center;
}


/* =========================================================
   EMPTY GALLERY ICON
========================================================= */

.gallery-icon {
    width: 70px;

    height: 70px;

    margin: 0 auto 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f2f6ff;

    border-radius: 50%;

    font-size: 30px;
}


/* =========================================================
   EMPTY HEADING
========================================================= */

.gallery-card h2 {
    margin: 0;

    color: #0f3d91;

    font-size: 28px;

    font-weight: 700;
}


/* =========================================================
   GOLD LINE
========================================================= */

.gallery-card .gold-line {
    width: 55px;

    height: 3px;

    margin: 15px auto 25px;

    background: #d6a63a;

    border-radius: 10px;
}


.gallery-card p {
    max-width: 560px;

    margin: 0 auto 12px;

    color: #555;

    font-size: 15px;

    line-height: 1.8;
}


/* =========================================================
   LIGHTBOX
========================================================= */

.gallery-lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 40px;

    background:
        rgba(0, 0, 0, 0.92);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


.gallery-lightbox.active {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* =========================================================
   LIGHTBOX CONTENT
========================================================= */

.gallery-lightbox-content {
    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    max-width: 90vw;

    max-height: 90vh;
}


.gallery-lightbox-content img {
    display: block;

    max-width: 85vw;

    max-height: 78vh;

    width: auto;

    height: auto;

    object-fit: contain;

    border-radius: 4px;

    box-shadow:
        0 15px 50px
        rgba(0, 0, 0, 0.45);
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.gallery-lightbox-close {
    position: absolute;

    top: 20px;

    right: 25px;

    z-index: 2;

    width: 45px;

    height: 45px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.12);

    color: #fff;

    font-family: Arial, sans-serif;

    font-size: 32px;

    font-weight: 300;

    line-height: 1;

    cursor: pointer;
}


.gallery-lightbox-close:hover {
    background:
        rgba(255, 255, 255, 0.25);
}


/* =========================================================
   LIGHTBOX ARROWS
========================================================= */

.gallery-lightbox-arrow {
    position: absolute;

    top: 50%;

    z-index: 2;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 55px;

    height: 70px;

    padding: 0;

    border: none;

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.12);

    color: #fff;

    font-family: Arial, sans-serif;

    font-size: 50px;

    font-weight: 300;

    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        background 0.2s ease,
        opacity 0.2s ease;
}


.gallery-lightbox-arrow:hover:not(:disabled) {
    background:
        rgba(255, 255, 255, 0.25);
}


.gallery-lightbox-arrow:disabled {
    opacity: 0.25;

    cursor: default;
}


.gallery-lightbox-previous {
    left: 25px;
}


.gallery-lightbox-next {
    right: 25px;
}


/* =========================================================
   COUNTER
========================================================= */

.gallery-lightbox-counter {
    margin-top: 14px;

    color: #fff;

    font-size: 13px;

    font-weight: 600;

    letter-spacing: 0.3px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .gallery-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .gallery-lightbox {
        padding: 25px;
    }


    .gallery-lightbox-arrow {
        width: 45px;

        height: 60px;

        font-size: 42px;
    }


    .gallery-lightbox-previous {
        left: 12px;
    }


    .gallery-lightbox-next {
        right: 12px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .gallery-hero {
        padding: 90px 0 55px;
    }


    .gallery-container {
        width: 92%;
    }


    .gallery-hero h1 {
        font-size: 32px;
    }


    .gallery-hero p {
        font-size: 14px;
    }


    .gallery-message {
        padding: 55px 0 70px;
    }


    .gallery-event-open {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;

        padding: 15px;
    }


    .gallery-event-thumbnail {
        flex: none;

        width: 100%;

        height: 200px;
    }


    .gallery-event-info {
        width: 100%;
    }


    .gallery-event-info h2 {
        font-size: 24px;
    }


    .gallery-event-expanded {
        padding:
            0 15px
            20px;
    }


    .gallery-expanded-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }


    .gallery-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .gallery-photo {
        border-radius: 10px;
    }


    .gallery-card {
        padding: 40px 25px;

        border-radius: 15px;
    }


    .gallery-card h2 {
        font-size: 24px;
    }


    .gallery-card p {
        font-size: 14px;
    }


    .gallery-lightbox {
        padding: 15px;
    }


    .gallery-lightbox-content {
        max-width: 100%;

        max-height: 85vh;
    }


    .gallery-lightbox-content img {
        max-width: 92vw;

        max-height: 70vh;
    }


    .gallery-lightbox-close {
        top: 12px;

        right: 12px;

        width: 40px;

        height: 40px;

        font-size: 28px;
    }


    .gallery-lightbox-arrow {
        top: auto;

        bottom: 25px;

        width: 48px;

        height: 48px;

        font-size: 38px;

        transform: none;
    }


    .gallery-lightbox-previous {
        left: 25px;
    }


    .gallery-lightbox-next {
        right: 25px;
    }


    .gallery-lightbox-counter {
        margin-bottom: 65px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   iPHONE 13 MINI / SIMILAR
========================================================= */

@media (max-width: 390px) {

    .gallery-hero {
        padding: 75px 0 45px;
    }


    .gallery-hero h1 {
        font-size: 28px;
    }


    .gallery-hero p {
        font-size: 13px;
    }


    .gallery-message {
        padding: 45px 0 60px;
    }


    .gallery-card {
        padding: 35px 20px;
    }


    .gallery-card h2 {
        font-size: 22px;
    }


    .gallery-card p {
        font-size: 13px;

        line-height: 1.7;
    }


    .gallery-event-thumbnail {
        height: 170px;
    }


    .gallery-event-info h2 {
        font-size: 22px;
    }


    .gallery-event-tag {
        font-size: 10px;

        padding: 5px 10px;
    }


    .gallery-grid {
        gap: 12px;
    }

}