/* =======================================================
   Facility Showcase & Gallery Section Styling
   ======================================================= */

.vs-gallery-section {
    position: relative;
    background-color: var(--vs-white-color);
    padding-bottom: var(--vs-section-space);
    z-index: 2;
}

@media (max-width: 991px) {
    .vs-gallery-section {
        padding-bottom: var(--vs-section-space-mobile);
    }
}

/* ----------------------------------
   Category Filter Tabs (Pills)
   ---------------------------------- */
.gallery-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
    list-style: none;
    padding: 0;
}

.gallery-filter__btn {
    font-family: var(--vs-title-font);
    font-size: 15px;
    font-weight: 700;
    padding: 11px 26px;
    border-radius: 50px;
    border: 1.5px solid rgba(14, 29, 76, 0.08);
    background-color: transparent;
    color: var(--vs-title-color);
    cursor: pointer;
    outline: none;
    transition: all 0.4s ease;
}

.gallery-filter__btn:hover,
.gallery-filter__btn.active {
    background-color: var(--vs-theme-color1);
    border-color: var(--vs-theme-color1);
    color: var(--vs-white-color);
    box-shadow: 0 6px 18px rgba(21, 154, 175, 0.2);
}

@media (max-width: 575px) {
    .gallery-filter {
        margin-bottom: 35px;
        gap: 8px;
    }

    .gallery-filter__btn {
        font-size: 14px;
        padding: 8px 18px;
    }
}

/* ----------------------------------
   Gallery Grid Container & Items
   ---------------------------------- */
.vs-gallery-section .gallery-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px;
    margin-right: -15px;
}

.vs-gallery-section .gallery-grid > .vs-gallery-item {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

.vs-gallery-section .gallery-grid > .vs-gallery-item.d-none {
    display: none !important;
}

/* Explicit Grid Widths strictly scoped to Gallery Section */
.vs-gallery-section .gallery-grid > .col-lg-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    width: 25% !important;
}

.vs-gallery-section .gallery-grid > .col-lg-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
    width: 33.333333% !important;
}

.vs-gallery-section .gallery-grid > .col-lg-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
}

.vs-gallery-section .gallery-grid > .col-12 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

@media (max-width: 991px) {
    .vs-gallery-section .gallery-grid > .col-md-6,
    .vs-gallery-section .gallery-grid > .col-lg-3,
    .vs-gallery-section .gallery-grid > .col-lg-4 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

@media (max-width: 575px) {
    .vs-gallery-section .gallery-grid > .vs-gallery-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}
.gallery-card {
    background-color: var(--vs-smoke-color);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    height: 380px;
    /* Fixed height for cards across the row */
    margin-bottom: 30px;
    cursor: pointer;
    border: 1px solid rgba(14, 29, 76, 0.04);
    display: block;
    /* Standard A tag block layout */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        border-color 0.4s ease;
    z-index: 1;
}

.gallery-card__img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Linear overlay for text legibility */
.gallery-card__overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(14, 29, 76, 0.95) 0%, rgba(14, 29, 76, 0.4) 50%, rgba(14, 29, 76, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 35px;
    transition: background 0.4s ease;
    z-index: 2;
}

/* floating zoom button icon */
.gallery-card__zoom {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background-color: var(--vs-white-color);
    color: var(--vs-title-color);
    text-align: center;
    font-size: 18px;
    opacity: 0;
    transform: scale(0.6) rotate(-45deg);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 3;
}

/* Card Content details */
.gallery-card__tag {
    font-family: var(--vs-body-font);
    font-size: 12px;
    font-weight: 700;
    color: var(--vs-theme-color1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: block;
}

.gallery-card__title {
    font-family: var(--vs-title-font);
    font-size: 22px;
    font-weight: 700;
    color: var(--vs-white-color);
    margin: 0 0 8px 0;
    transition: color 0.4s ease;
}

.gallery-card__desc {
    font-family: var(--vs-body-font);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.45;
    margin: 0;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        opacity 0.4s ease;
}

/* ----------------------------------
   Card Hover Interactions
   ---------------------------------- */
.gallery-card:hover {
    box-shadow: 0 15px 45px rgba(14, 29, 76, 0.1);
    border-color: rgba(21, 154, 175, 0.15);
    transform: translateY(-5px);
}

.gallery-card:hover .gallery-card__img {
    transform: scale(1.08);
}

.gallery-card:hover .gallery-card__zoom {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.gallery-card__zoom:hover {
    background-color: var(--vs-theme-color1);
    color: var(--vs-white-color);
}

.gallery-card:hover .gallery-card__title {
    color: var(--vs-theme-color1);
}

.gallery-card:hover .gallery-card__desc {
    transform: translateY(0);
    opacity: 1;
}

/* ----------------------------------
   Responsive Customizations
   ---------------------------------- */
@media (max-width: 1199px) {
    .gallery-card {
        height: 340px;
        padding: 30px;
    }

    .gallery-card__title {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .gallery-card {
        height: 300px;
    }

    .gallery-card__overlay {
        padding: 25px;
    }
}