/* ============================================================
   gallery.css – Dr. P R Krishnan Clinic & Facility Gallery
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #142e42;
    --navy-dark: #0d2232;
    --teal: #096577;
    --teal-dark: #084b59;
    --teal-light: #eff7fa;
    --teal-glow: rgba(9, 101, 119, 0.15);
    --gold: #d97706;
    --muted: #5c7180;
    --muted-light: #899ea9;
    --line: #dce6eb;
    --card-bg: #ffffff;
    --card-bdr: #e2ebf0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    --sh-sm: 0 4px 18px rgba(20, 46, 66, 0.05);
    --sh-md: 0 10px 30px rgba(20, 46, 66, 0.09);
    --sh-hover: 0 16px 36px rgba(9, 101, 119, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
}

body {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--navy);
    background: #fbfdfe;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

h1, h2, h3, h4 {
    font-family: 'Manrope', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
}

em {
    font-style: normal;
    color: var(--teal);
}

/* ── LAYOUT ── */
.wrap {
    width: min(1232px, calc(100% - 80px));
    margin: auto;
}

/* ── TOP BAR ── */
.topline {
    background: var(--navy);
    color: #d4e1e9;
    font-size: 12px;
    letter-spacing: .04em;
    padding: 9px 0;
}

.topline .wrap {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── HEADER ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5edf1;
}

.navrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 88px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-brand {
    gap: 0;
}

.logo-img {
    height: 100px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: opacity .2s;
}

.logo-img:hover {
    opacity: 0.85;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    max-width: 260px;
}

nav {
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-weight: 500;
}

nav a {
    padding: 32px 0;
    position: relative;
    transition: color .2s;
}

nav a:hover,
nav a.active {
    color: var(--teal);
}

nav a.active:after,
nav a.active::after {
    position: absolute;
    content: '';
    bottom: 20px;
    width: 100%;
    height: 2px;
    background: var(--teal);
    left: 0;
}

/* Button components */
.button,
.btn {
    background: var(--teal);
    color: white;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    text-decoration: none;
}

.button:hover,
.btn:hover {
    background: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(9, 101, 119, 0.25);
    color: white;
}

.button span,
.btn span {
    font-size: 16px;
    font-weight: 400;
}

.navcta {
    padding: 10px 16px;
    font-size: 13px;
    flex-shrink: 0;
}

/* Mobile menu toggle */
.menu {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: var(--navy);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ── BREADCRUMB ── */
.breadcrumb-bar {
    background: #f4f8fb;
    border-bottom: 1px solid #e0eaef;
    padding: 10px 0;
    font-size: 13px;
    color: var(--muted);
}

.breadcrumb-bar a {
    color: var(--teal);
}

.breadcrumb-bar a:hover {
    text-decoration: underline;
}

/* ── HERO GALLERY SECTION ── */
.gallery-hero {
    background: linear-gradient(135deg, #eef7fa 0%, #f4f9fc 50%, #e6f1f7 100%);
    padding: 55px 0 45px;
    border-bottom: 1px solid var(--line);
}

.gallery-hero-content {
    max-width: 840px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 12px;
    display: inline-block;
}

.gallery-hero h1 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.gallery-hero p {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ── GALLERY FILTER TABS ── */
.gallery-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.gallery-filter-btn {
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    background: #ffffff;
    border: 1.5px solid var(--line);
    transition: all 0.25s ease;
    cursor: pointer;
}

.gallery-filter-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.gallery-filter-btn.active {
    background: var(--teal);
    color: #ffffff;
    border-color: var(--teal);
    box-shadow: 0 4px 14px rgba(9, 101, 119, 0.25);
}

/* ── GALLERY GRID ── */
.gallery-section {
    padding: 50px 0 75px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #0d2232;
    box-shadow: var(--sh-sm);
    cursor: pointer;
    aspect-ratio: 4 / 3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-hover);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 34, 50, 0.92) 0%, rgba(13, 34, 50, 0.35) 50%, rgba(13, 34, 50, 0) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-badge {
    align-self: flex-start;
    background: var(--teal);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    margin-bottom: 8px;
}

.gallery-badge.badge-cert {
    background: #0c4a6e;
    color: #e0f2fe;
    border: 1px solid #0284c7;
}

.gallery-badge.badge-award {
    background: #78350f;
    color: #fef3c7;
    border: 1px solid #d97706;
}

.gallery-badge.badge-clinic {
    background: var(--teal);
    color: #ffffff;
}

.gallery-title {
    color: #ffffff;
    font-size: 16.5px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.gallery-desc {
    color: #d1e4ed;
    font-size: 13px;
    line-height: 1.45;
}

.gallery-zoom-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

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

/* ── LIGHTBOX MODAL ── */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.open {
    display: flex;
    opacity: 1;
}

.lightbox-content-box {
    position: relative;
    max-width: 1000px;
    width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img-wrapper {
    position: relative;
    max-height: 75vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border: none;
    box-shadow: none;
}

.lightbox-caption-bar {
    width: 100%;
    padding: 12px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-top: 10px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.lightbox-caption-text h3 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.lightbox-caption-text p {
    color: #e2edf3;
    font-size: 14px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.lightbox-counter {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close-btn {
    position: absolute;
    top: -48px;
    right: 0;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.85);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, background 0.2s, color 0.2s;
}

.lightbox-close-btn:hover {
    background: var(--teal);
    color: #ffffff;
    transform: scale(1.1);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--teal);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(9, 101, 119, 0.35);
    transition: all 0.2s ease;
    z-index: 10;
}

.lightbox-nav-btn:hover {
    background: var(--teal-dark);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(9, 101, 119, 0.45);
}

.lightbox-prev-btn {
    left: -70px;
}

.lightbox-next-btn {
    right: -70px;
}

/* ── CTA BANNER ── */
.cta-banner {
    background: linear-gradient(135deg, #102a3d 0%, #094754 100%);
    color: #ffffff;
    padding: 55px 0;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.cta-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cta-brain-icon {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
}

.cta-left h2 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 6px;
}

.cta-left p {
    color: #c4dbe6;
    font-size: 15px;
}

.cta-btn {
    background: #ffffff;
    color: var(--navy);
    padding: 13px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14.5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.cta-btn:hover {
    background: #eef7fa;
    color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ── FOOTER ── */
/* ── FOOTER ── */
footer {
    border-top: 1px solid #e4ebee;
    background: #fcfdfe;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
    gap: 36px;
    padding: 56px 0 40px;
}

.footer-main h3 {
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--navy);
}

.footer-main p,
.footer-main>div>a:not(.brand) {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
    transition: color .2s;
}

.footer-main>div>a:not(.brand):hover {
    color: var(--teal);
}

.footer-about p {
    margin-top: 16px !important;
    line-height: 1.7;
}

.footer-bottom {
    border-top: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: #778791;
    padding: 22px 0;
}

.footer-bottom>a {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 18px;
    transition: background .2s, border-color .2s;
}

.footer-bottom>a:hover {
    background: #ffffff;
    border-color: var(--teal);
    color: var(--teal);
}

.footer-bottom span a {
    color: var(--teal);
    text-decoration: underline;
    font-weight: 600;
    transition: color .2s;
}

.footer-bottom span a:hover {
    color: var(--navy);
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .lightbox-prev-btn {
        left: 10px;
    }
    .lightbox-next-btn {
        right: 10px;
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu {
        display: block;
    }
    nav {
        display: none;
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        background: white;
        padding: 16px 24px 24px;
        box-shadow: 0 15px 24px rgba(21, 59, 67, 0.12);
        border-bottom: 1px solid #e2ebf0;
    }
    nav.open {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    nav a {
        padding: 12px 0;
        border-bottom: 1px solid #f0f4f7;
    }
    nav a.active:after {
        display: none;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-hero h1 {
        font-size: 30px;
    }
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
