/* ==========================================================================
   G.R. Medical College - Gallery Page Stylesheet
   Design Spec: Modern responsive photo gallery with clean typography,
   sharp edges (0px border-radius), and full-featured Lightbox modal.
   ========================================================================== */

.gr-gallery-page-section {
    padding: 60px 0 80px 0;
    background-color: #FFFFFF;
}

/* Header: Title & Filter Tabs (Matches Figma Screenshot) */
.gr-gallery-header {
    margin-bottom: 40px;
    padding-bottom: 0;
    border-bottom: none;
}

.gr-gallery-title {
    font-family: 'Instrument Sans', 'Outfit', 'Inter', sans-serif;
    font-size: 2.75rem;
    font-weight: 400;
    color: #111111;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
}

@media (max-width: 991px) {
    .gr-gallery-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 576px) {
    .gr-gallery-title {
        font-size: 1.75rem;
    }
}

/* Filter Tabs (Commented out in HTML, styles preserved for future use) */
.gr-gallery-filter-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gr-gallery-tab-btn {
    padding: 10px 28px;
    font-family: 'Instrument Sans', 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    outline: none;
    border: 1.5px solid #2A3EC0;
    background-color: #FFFFFF;
    color: #2A3EC0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gr-gallery-tab-btn:hover {
    background-color: rgba(42, 62, 192, 0.08);
}

.gr-gallery-tab-btn.active {
    background-color: #2A3EC0;
    color: #FFFFFF;
    border-color: #2A3EC0;
}

/* Gallery Photo Card - Sharp 0px border-radius as per Figma */
.gr-gallery-card {
    position: relative;
    border-radius: 0 !important;
    overflow: hidden;
    background-color: #F8FAFC;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
    display: block;
    text-decoration: none;
}

.gr-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.gr-gallery-img-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    overflow: hidden;
}

.gr-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0 !important;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gr-gallery-card:hover .gr-gallery-img {
    transform: scale(1.06);
}

/* Overlay & Zoom Icon */
.gr-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.75) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

.gr-gallery-card:hover .gr-gallery-overlay {
    opacity: 1;
}

.gr-gallery-zoom-badge {
    align-self: flex-end;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #2A3EC0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gr-gallery-card:hover .gr-gallery-zoom-badge {
    transform: scale(1);
}

.gr-gallery-caption {
    color: #FFFFFF;
    font-family: 'Instrument Sans', 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: translateY(8px);
    transition: transform 0.3s ease;
}

.gr-gallery-card:hover .gr-gallery-caption {
    transform: translateY(0);
}

/* Empty State */
.gr-gallery-empty-state {
    padding: 60px 20px;
    text-align: center;
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
}

.gr-gallery-empty-state p {
    color: #64748B;
    font-size: 15px;
    margin: 0;
}

/* ==========================================================================
   Lightbox Modal Component
   ========================================================================== */
.gr-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: rgba(10, 15, 30, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gr-lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Lightbox Header Bar */
.gr-lightbox-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
    z-index: 10;
}

.gr-lightbox-counter {
    font-family: 'Instrument Sans', 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.12);
    padding: 4px 12px;
}

.gr-lightbox-caption {
    font-family: 'Instrument Sans', 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #FFFFFF;
    max-width: 60%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gr-lightbox-close-btn {
    background: transparent;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.gr-lightbox-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* Lightbox Main Stage */
.gr-lightbox-stage {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gr-lightbox-main-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Navigation Arrows */
.gr-lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 5;
}

.gr-lightbox-nav-btn:hover {
    background-color: #2A3EC0;
    border-color: #2A3EC0;
    transform: translateY(-50%) scale(1.08);
}

.gr-lightbox-nav-btn.prev {
    left: 24px;
}

.gr-lightbox-nav-btn.next {
    right: 24px;
}

@media (max-width: 768px) {
    .gr-lightbox-nav-btn {
        width: 42px;
        height: 42px;
    }
    .gr-lightbox-nav-btn.prev {
        left: 12px;
    }
    .gr-lightbox-nav-btn.next {
        right: 12px;
    }
    .gr-lightbox-caption {
        display: none;
    }
}
