/* =========================================================
   PUBLIC GALLERY
   Manasadwip Ramakrishna Mission Praktani Samsad
========================================================= */

.gallery-section,
.gallery-details-section {
    background: #fff;
}

.gallery-banner,
.gallery-details-banner {
    background:
        linear-gradient(90deg, rgba(10, 42, 78, .88), rgba(18, 59, 109, .58)),
        url("../assets/images/gallery-banner.jpg") center/cover no-repeat;
}

.gallery-heading .section-kicker {
    display: inline-block;
    color: #b48a2c;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gallery-heading h2 {
    color: #123b6d;
    font-weight: 700;
    margin-bottom: 10px;
}

.gallery-heading p {
    max-width: 700px;
    margin: 0 auto;
    color: #6c757d;
}


/* =========================================================
   FILTER
========================================================= */

.gallery-filter-wrapper {
    background: #f7f9fc;
    border: 1px solid #e6ebf1;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

.gallery-category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e7ed;
}

.gallery-filter-btn {
    border: 1px solid #d8e0e8;
    background: #fff;
    color: #123b6d;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: .2s ease;
    cursor: pointer;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: #123b6d;
    color: #fff;
    border-color: #123b6d;
}

.gallery-filter-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 16px;
}

.gallery-select-wrap,
.gallery-search {
    position: relative;
}

.gallery-select-wrap {
    width: 170px;
}

.gallery-select-wrap i,
.gallery-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #7c8793;
    z-index: 2;
    pointer-events: none;
}

.gallery-select-wrap select,
.gallery-search input {
    width: 100%;
    height: 44px;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    background: #fff;
    outline: none;
    color: #333;
    font-size: 13px;
}

.gallery-select-wrap select {
    padding: 0 12px 0 36px;
}

.gallery-search {
    flex: 1;
}

.gallery-search input {
    padding: 0 14px 0 38px;
}

.gallery-select-wrap select:focus,
.gallery-search input:focus {
    border-color: #123b6d;
    box-shadow: 0 0 0 3px rgba(18, 59, 109, .08);
}

.gallery-view-toggle {
    display: flex;
    gap: 5px;
    border: 1px solid #d8e0e8;
    background: #fff;
    padding: 4px;
    border-radius: 8px;
}

.gallery-view-btn {
    width: 35px;
    height: 35px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
}

.gallery-view-btn.active {
    background: #123b6d;
    color: #fff;
}


/* =========================================================
   RESULT BAR
========================================================= */

.gallery-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    color: #6c757d;
    font-size: 14px;
}

.gallery-result-bar strong {
    color: #123b6d;
    font-size: 16px;
}

.gallery-clear-btn {
    border: 0;
    background: transparent;
    color: #123b6d;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}


/* =========================================================
   ALBUM CARD
========================================================= */

.gallery-card {
    height: 100%;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(18, 59, 109, .06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(18, 59, 109, .13);
}

.gallery-card-image-link {
    display: block;
    text-decoration: none;
}

.gallery-card-image {
    height: 235px;
    position: relative;
    overflow: hidden;
    background: #edf1f5;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.06);
}

.gallery-image-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(4, 24, 46, .65),
        transparent 50%
    );
}

.gallery-photo-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(18, 59, 109, .94);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
}

.gallery-view-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -40%);
    opacity: 0;
    background: rgba(255, 255, 255, .95);
    color: #123b6d;
    padding: 10px 15px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: .25s ease;
}

.gallery-card:hover .gallery-view-overlay {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.gallery-card-content {
    padding: 18px;
}

.gallery-category {
    display: inline-block;
    color: #123b6d;
    background: #eef4fa;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 9px;
}

.gallery-card-content h3 {
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.35;
}

.gallery-card-content h3 a {
    color: #123b6d;
    text-decoration: none;
}

.gallery-card-content h3 a:hover {
    color: #9b7424;
}

.gallery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #6c757d;
    font-size: 12px;
}

.gallery-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gallery-meta i {
    color: #b48a2c;
}


/* =========================================================
   LIST VIEW
========================================================= */

.gallery-grid.gallery-list-view .gallery-item {
    width: 100%;
}

.gallery-list-view .gallery-card {
    display: flex;
    flex-direction: row;
}

.gallery-list-view .gallery-card-image-link {
    width: 280px;
    flex: 0 0 280px;
}

.gallery-list-view .gallery-card-image {
    height: 190px;
}

.gallery-list-view .gallery-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.gallery-empty {
    text-align: center;
    padding: 65px 20px;
}

.gallery-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #eef4fa;
    color: #123b6d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.gallery-empty h3,
.gallery-empty h2 {
    color: #123b6d;
    font-weight: 700;
}

.gallery-empty p {
    color: #6c757d;
    max-width: 550px;
    margin: 0 auto 20px;
}

.gallery-empty-btn,
.gallery-primary-btn,
.gallery-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    border-radius: 8px;
    padding: 10px 17px;
    font-size: 13px;
    font-weight: 600;
    transition: .2s ease;
}

.gallery-empty-btn,
.gallery-primary-btn {
    border: 0;
    background: #123b6d;
    color: #fff;
}

.gallery-empty-btn:hover,
.gallery-primary-btn:hover {
    background: #0c2d53;
    color: #fff;
}

.gallery-secondary-btn {
    border: 1px solid #123b6d;
    color: #123b6d;
    background: #fff;
}

.gallery-secondary-btn:hover {
    background: #123b6d;
    color: #fff;
}


/* =========================================================
   DETAILS
========================================================= */

.gallery-album-header {
    background: #f7f9fc;
    border: 1px solid #e6ebf1;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 28px;
}

.gallery-album-header h2 {
    color: #123b6d;
    font-weight: 700;
    margin: 5px 0 12px;
}

.gallery-album-header p {
    color: #68737f;
    margin: 14px 0 0;
    line-height: 1.7;
    white-space: normal;
}

.gallery-album-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #68737f;
    font-size: 13px;
}

.gallery-album-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.gallery-album-meta i {
    color: #b48a2c;
}

.gallery-album-actions {
    display: flex;
    justify-content: flex-end;
}

.gallery-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.gallery-breadcrumb a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
}

.gallery-breadcrumb a:hover {
    color: #fff;
}

.gallery-breadcrumb span {
    color: rgba(255,255,255,.72);
}

.gallery-breadcrumb i {
    font-size: 9px;
    color: rgba(255,255,255,.65);
}


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

.gallery-photo-grid {
    align-items: stretch;
}

.gallery-photo-item {
    display: block;
    width: 100%;
    height: 245px;
    padding: 0;
    border: 0;
    border-radius: 11px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #edf1f5;
}

.gallery-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.gallery-photo-item:hover img {
    transform: scale(1.06);
}

.gallery-photo-hover {
    position: absolute;
    inset: 0;
    background: rgba(8, 35, 65, .42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    opacity: 0;
    transition: .25s ease;
}

.gallery-photo-item:hover .gallery-photo-hover,
.gallery-photo-item:focus .gallery-photo-hover {
    opacity: 1;
}


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

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(3, 14, 27, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px 75px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: min(1100px, 90vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 10px 50px rgba(0,0,0,.35);
}

.lightbox-caption {
    width: 100%;
    color: #fff;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 12px;
    font-size: 13px;
}

.lightbox-caption span:last-child {
    white-space: nowrap;
    opacity: .75;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: 0;
    color: #fff;
    background: rgba(255,255,255,.12);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255,255,255,.23);
}

.lightbox-close {
    top: 22px;
    right: 25px;
    font-size: 18px;
}

.lightbox-prev {
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991px) {

    .gallery-filter-tools {
        flex-wrap: wrap;
    }

    .gallery-select-wrap {
        width: 170px;
    }

    .gallery-search {
        min-width: 220px;
    }

    .gallery-list-view .gallery-card-image-link {
        width: 220px;
        flex-basis: 220px;
    }

    .gallery-photo-item {
        height: 220px;
    }
}

@media (max-width: 767px) {

    .gallery-filter-wrapper {
        padding: 14px;
    }

    .gallery-category-filters {
        justify-content: flex-start;
        max-height: 125px;
        overflow-y: auto;
    }

    .gallery-filter-tools {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .gallery-select-wrap,
    .gallery-search {
        width: 100%;
        min-width: 0;
    }

    .gallery-view-toggle {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .gallery-result-bar {
        margin-top: 3px;
    }

    .gallery-card-image {
        height: 215px;
    }

    .gallery-list-view .gallery-card {
        display: block;
    }

    .gallery-list-view .gallery-card-image-link {
        width: 100%;
    }

    .gallery-list-view .gallery-card-image {
        height: 215px;
    }

    .gallery-album-header {
        padding: 21px;
    }

    .gallery-album-actions {
        justify-content: flex-start;
    }

    .gallery-photo-item {
        height: 200px;
    }

    .gallery-lightbox {
        padding: 45px 12px 25px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

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

    .lightbox-caption {
        padding-left: 45px;
        padding-right: 45px;
    }
}

@media (max-width: 575px) {

    .gallery-category-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-height: none;
        padding-bottom: 12px;
        scrollbar-width: thin;
    }

    .gallery-filter-btn {
        flex: 0 0 auto;
        padding: 7px 13px;
    }

    .gallery-filter-tools {
        grid-template-columns: 1fr;
    }

    .gallery-view-toggle {
        grid-column: auto;
    }

    .gallery-result-bar {
        font-size: 13px;
    }

    .gallery-clear-btn {
        font-size: 12px;
    }

    .gallery-card-image {
        height: 205px;
    }

    .gallery-photo-item {
        height: 180px;
    }

    .gallery-lightbox {
        padding: 55px 8px 20px;
    }

    .lightbox-close {
        top: 10px;
        right: 12px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 38px;
        height: 38px;
    }

    .lightbox-prev {
        left: 7px;
    }

    .lightbox-next {
        right: 7px;
    }

    .lightbox-caption {
        padding-left: 43px;
        padding-right: 43px;
        font-size: 11px;
    }
}

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