/* ==========================================================================
   Shree Specialty Clinics — Gallery Stylesheet
   Design Tokens: --wine, --pink, --gold, --ink, --cream, --beige, --line
   Breakpoints: 640px, 768px, 1024px
   ========================================================================== */

/* Hero Banner */
.gallery-hero {
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--beige) 0%, var(--cream) 100%);
    border-bottom: 1px solid var(--line-light);
}

.gallery-hero-inner {
    max-width: 820px;
    margin: 0 auto;
}

.gallery-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    color: var(--ink);
    margin: 0.5rem 0 1rem;
    line-height: 1.2;
}

.gallery-hero-desc {
    font-size: 1.1rem;
    color: var(--ink-light);
    line-height: 1.6;
    margin: 0 auto;
}

/* Container */
.gallery-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 5rem;
}

/* Category Filter Tabs (Pills) */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2.75rem;
}

.gallery-filter-btn {
    appearance: none;
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.gallery-filter-btn:hover {
    border-color: var(--pink);
    color: var(--wine);
    background: var(--cream);
    transform: translateY(-1px);
}

.gallery-filter-btn.active {
    background: var(--wine);
    color: #ffffff;
    border-color: var(--wine);
    box-shadow: 0 4px 12px rgba(139, 18, 63, 0.25);
}

.gallery-filter-btn .count-badge {
    font-size: 0.75rem;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill);
}

.gallery-filter-btn.active .count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Responsive Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
}

@media (min-width: 1100px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Gallery Item Card */
.gallery-card {
    background: #ffffff;
    border: 1px solid var(--line-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    outline: none;
}

.gallery-card:hover,
.gallery-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--pink);
}

/* Card Image Wrapper */
.gallery-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--beige);
}

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

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

/* Category Badge Chip */
.gallery-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(139, 18, 63, 0.92);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 2;
}

.gallery-card-badge.cat-awards {
    background: rgba(166, 101, 11, 0.92);
}

.gallery-card-badge.cat-camps {
    background: rgba(25, 135, 84, 0.92);
}

/* Zoom Icon Overlay */
.gallery-card-zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(33, 23, 19, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

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

.gallery-zoom-icon {
    width: 44px;
    height: 44px;
    background: #ffffff;
    color: var(--wine);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(0.85);
    transition: transform 0.25s ease;
}

.gallery-card:hover .gallery-zoom-icon {
    transform: scale(1);
}

/* Card Content Details */
.gallery-card-body {
    padding: 1rem 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.gallery-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.45rem;
    line-height: 1.35;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
}

.gallery-card-caption {
    font-size: 0.85rem;
    color: var(--ink-light);
    line-height: 1.5;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--ink-light);
    border-top: 1px solid var(--line-light);
    padding-top: 0.65rem;
    margin-top: auto;
}

.gallery-card-doctor {
    font-weight: 600;
    color: var(--wine);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.gallery-card-date {
    opacity: 0.85;
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--ink-light);
    grid-column: 1 / -1;
}

.gallery-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(18, 12, 10, 0.92);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.lightbox-content-wrap {
    max-width: 960px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.gallery-lightbox.active .lightbox-content-wrap {
    transform: scale(1);
}

.lightbox-img-area {
    background: #000000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 68vh;
    overflow: hidden;
}

.lightbox-main-img {
    max-width: 100%;
    max-height: 68vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.lightbox-info-area {
    padding: 1.25rem 1.75rem 1.5rem;
    background: #ffffff;
    color: var(--ink);
}

.lightbox-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.lightbox-title {
    font-size: 1.45rem;
    color: var(--ink);
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
}

.lightbox-badge {
    background: var(--beige);
    color: var(--wine);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.lightbox-caption {
    font-size: 0.95rem;
    color: var(--ink-light);
    line-height: 1.6;
    margin: 0 0 0.75rem;
}

.lightbox-footer-meta {
    font-size: 0.82rem;
    color: var(--ink-light);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line-light);
}

/* Lightbox Controls */
.lightbox-btn-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-btn-close:hover {
    background: var(--wine);
    transform: scale(1.08);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.lightbox-nav-btn:hover {
    background: var(--wine);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-btn-prev {
    left: 1rem;
}

.lightbox-btn-next {
    right: 1rem;
}

@media (max-width: 640px) {
    .lightbox-content-wrap {
        max-height: 96vh;
    }
    .lightbox-img-area {
        max-height: 52vh;
    }
    .lightbox-main-img {
        max-height: 52vh;
    }
    .lightbox-info-area {
        padding: 1rem 1.25rem;
    }
    .lightbox-title {
        font-size: 1.2rem;
    }
}

