﻿/* Gallery page — Shri Datta Hospital.
   Self-contained: no :root, no global/element selectors, no dependency on
   Layout.css. Everything is scoped to .gal-page / .gal-lb. */

/* ============================================================================
   GALLERY PAGE  ->  wwwroot/css/gallery.css
   Self-contained: no :root, no element selectors, no global reset. Every rule
   is scoped to .gal-page or .gal-lb, so this file can be dropped into any page
   without touching Layout.css and without affecting anything outside the
   gallery. The three speciality accents follow the DESIGN.md rules: 12% tints
   behind content, full colour on small marks, --logo-ink text on fills, one
   accent per card. Orange is still the only "act" colour.
   ============================================================================ */
/* ----------------------------------------------------------------------------
   Scope roots. Every token lives here, not on :root, so nothing is published
   to the rest of the document and nothing is inherited from Layout.css.
   .gal-lb (the lightbox) is a sibling of .gal-page, so it repeats the block.
   ---------------------------------------------------------------------------- */
.gal-page,
.gal-lb {
    --charcoal: #32323a;
    --orange: #E8681A;
    --orange-dark: #C2540E;
    --orange-light: #fdeee4;
    --text: #2e2e35;
    --muted: #6a6a75;
    --border: #e6e6ec;
    --white: #ffffff;
    --logo-ink: #171b20;
    --logo-blue: #009cfc; /* shoulder */
    --logo-green: #97c301; /* spine    */
    --logo-pink: #fa016a; /* knee     */
    --gal-container: 1200px;
    font-family: "Segoe UI",Arial,Helvetica,sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.gal-page {
    background: var(--white);
}
    /* Standalone pages only: no <body> tag means the UA's default 8px body margin
   is still there, which would show as a white gutter around the full-bleed
   banner. A block with width:auto and margin:-8px grows back by exactly that
   much on each side -- no 100vw, so no scrollbar overflow. Embedded copies
   leave this class off and inherit whatever the host page's reset does. */
    .gal-page.gal-standalone {
        margin: -8px;
    }

    /* scoped reset — replaces the global `* { margin:0; padding:0 }` */
    .gal-page, .gal-page *, .gal-page *::before, .gal-page *::after,
    .gal-lb, .gal-lb *, .gal-lb *::before, .gal-lb *::after {
        box-sizing: border-box;
    }

        .gal-page h1, .gal-page h2, .gal-page h3, .gal-page p, .gal-page span, .gal-page div,
        .gal-lb h3, .gal-lb p, .gal-lb div {
            margin: 0;
            padding: 0;
        }

        .gal-page img, .gal-lb img {
            display: block;
            max-width: 100%;
        }

        .gal-page a {
            color: inherit;
            text-decoration: none;
        }

        .gal-page button, .gal-lb button {
            font: inherit;
            color: inherit;
            background: none;
            border: none;
        }

        .gal-page :focus-visible,
        .gal-lb :focus-visible {
            outline: 2px solid var(--orange);
            outline-offset: 2px;
            border-radius: 4px;
        }

        .gal-page .gal-wrap {
            width: 100%;
            max-width: var(--gal-container);
            margin: 0 auto;
            padding: 0 20px;
        }

        /* ---------- page banner ---------- */
        /* Compact hero band. The photograph and the darkening gradient are two layers of
   one background-image, so there is no pseudo-element and no stacking context --
   nothing here can trap the position:fixed lightbox.
   Height: clamp() rather than a vh unit, so a short laptop window and a tall
   phone both get a band in the same 260-400px range instead of one of them
   getting a sliver and the other half a screen. */
        .gal-page .gal-head {
            position: relative;
            min-height: clamp(260px,42vh,400px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 56px 0 60px;
            text-align: center;
            background-color: #171b20; /* holds the colour while the photo loads */
            background-image: linear-gradient(180deg, rgba(23,27,32,.72) 0%, rgba(23,27,32,.56) 45%, rgba(23,27,32,.80) 100%), url("/images/Gallery/hero-bg.jpg");
            background-size: cover;
            background-position: center 35%; /* a short band: favour the façade over the driveway */
            background-repeat: no-repeat;
        }

        .gal-page .gal-crumb {
            font-size: 13.5px;
            color: rgba(255,255,255,.72);
            margin-bottom: 12px;
        }

            .gal-page .gal-crumb a {
                color: rgba(255,255,255,.86);
            }

                .gal-page .gal-crumb a:hover {
                    color: var(--orange);
                }

            .gal-page .gal-crumb span {
                color: var(--orange);
                font-weight: 400;
            }

        .gal-page .gal-head h1 {
            font-size: clamp(28px,4.4vw,44px);
            color: #fff;
            line-height: 1.15;
            font-weight: 600;
            letter-spacing: -.3px;
            text-shadow: 0 2px 20px rgba(0,0,0,.42);
        }

        .gal-page .gal-head .bar {
            width: 56px;
            height: 4px;
            border-radius: 4px;
            background: var(--orange);
            margin: 15px auto 13px;
        }

        .gal-page .gal-head p {
            max-width: 62ch;
            margin: 0 auto;
            color: rgba(255,255,255,.9) !important;
            font-size: clamp(14.5px,1.3vw,16.5px);
            text-shadow: 0 1px 14px rgba(0,0,0,.45);
        }


        /* ---------- filters ---------- */
        .gal-page .gal-filters {
            padding: 34px 0 30px;
        }

        .gal-page .gal-filters__row {
            display: flex;
            flex-wrap: wrap;
            gap: 9px;
            justify-content: center;
        }

        .gal-page .gal-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 9px 17px;
            border-radius: 999px;
            border: 1.4px solid var(--border);
            background: var(--white);
            color: var(--charcoal);
            cursor: pointer;
            font-size: 14px;
            font-weight: 400;
            transition: border-color .2s,background .2s,color .2s;
        }

            .gal-page .gal-chip:hover {
                border-color: var(--orange);
                color: var(--orange);
            }

            .gal-page .gal-chip .num {
                font-size: 11.5px;
                font-weight: 400;
                background: #f1f2f6;
                color: var(--muted);
                padding: 1px 8px;
                border-radius: 999px;
            }

            .gal-page .gal-chip[aria-pressed="true"] {
                background: var(--orange);
                border-color: var(--orange);
                color: #fff;
            }

                .gal-page .gal-chip[aria-pressed="true"] .num {
                    background: rgba(255,255,255,.26);
                    color: #fff;
                }

        .gal-page .gal-chip__dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            flex: none;
        }

        .gal-page .gal-chip.spec {
            color: var(--logo-ink);
        }

        .gal-page .gal-chip.spec-shoulder .gal-chip__dot {
            background: var(--logo-blue);
        }

        .gal-page .gal-chip.spec-spine .gal-chip__dot {
            background: var(--logo-green);
        }

        .gal-page .gal-chip.spec-knee .gal-chip__dot {
            background: var(--logo-pink);
        }

        .gal-page .gal-chip.spec-shoulder:hover {
            border-color: var(--logo-blue);
            color: var(--logo-ink);
        }

        .gal-page .gal-chip.spec-spine:hover {
            border-color: var(--logo-green);
            color: var(--logo-ink);
        }

        .gal-page .gal-chip.spec-knee:hover {
            border-color: var(--logo-pink);
            color: var(--logo-ink);
        }
        /* tint background + ink text: never white text on the accents */
        .gal-page .gal-chip.spec-shoulder[aria-pressed="true"] {
            background: color-mix(in srgb,var(--logo-blue) 14%,white);
            border-color: var(--logo-blue);
            color: var(--logo-ink);
        }

        .gal-page .gal-chip.spec-spine[aria-pressed="true"] {
            background: color-mix(in srgb,var(--logo-green) 16%,white);
            border-color: var(--logo-green);
            color: var(--logo-ink);
        }

        .gal-page .gal-chip.spec-knee[aria-pressed="true"] {
            background: color-mix(in srgb,var(--logo-pink) 12%,white);
            border-color: var(--logo-pink);
            color: var(--logo-ink);
        }

        .gal-page .gal-chip.spec[aria-pressed="true"] .num {
            background: rgba(23,27,32,.1);
            color: var(--logo-ink);
        }

        /* ---------- grid ---------- */
        .gal-page .gal-grid-section {
            padding: 0 0 70px;
        }

        .gal-page .gal-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
            gap: 22px;
        }

        .gal-page .gal-card {
            position: relative;
            display: flex;
            flex-direction: column;
            text-align: left;
            width: 100%;
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            opacity: 0;
            transform: translateY(18px);
            transition: opacity .5s ease,transform .5s ease,box-shadow .28s ease,border-color .28s ease;
        }

            .gal-page .gal-card.is-in {
                opacity: 1;
                transform: none;
            }

            .gal-page .gal-card:hover {
                box-shadow: 0 16px 36px rgba(50,50,58,.14);
                border-color: #dcdce4;
                transform: translateY(-4px);
            }

        .gal-page .gal-card__media {
            display: block;
            position: relative;
            aspect-ratio: 4/3;
            overflow: hidden;
            background: #f1f2f6;
        }

            .gal-page .gal-card__media img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: transform .6s ease;
            }

        .gal-page .gal-card:hover .gal-card__media img {
            transform: scale(1.06);
        }

        .gal-page .gal-card__zoom {
            position: absolute;
            right: 12px;
            bottom: 12px;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--orange);
            display: grid;
            place-items: center;
            opacity: 0;
            transform: translateY(6px);
            transition: opacity .25s,transform .25s;
        }

        .gal-page .gal-card:hover .gal-card__zoom {
            opacity: 1;
            transform: none;
        }

        .gal-page .gal-card__zoom svg {
            width: 15px;
            height: 15px;
            fill: #fff;
        }
        /* speciality mark: full-colour dot on a dark pill, white label — high contrast on any photo */
        .gal-page .gal-card__spec {
            position: absolute;
            left: 12px;
            top: 12px;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            background: rgba(23,27,32,.76);
            color: #fff;
            border-radius: 999px;
            padding: 5px 11px;
            font-size: 11px;
            font-weight: 400;
            letter-spacing: .04em;
            text-transform: uppercase;
        }

            .gal-page .gal-card__spec i {
                width: 8px;
                height: 8px;
                border-radius: 50%;
                display: block;
            }

            .gal-page .gal-card__spec.is-shoulder i {
                background: var(--logo-blue);
            }

            .gal-page .gal-card__spec.is-spine i {
                background: var(--logo-green);
            }

            .gal-page .gal-card__spec.is-knee i {
                background: var(--logo-pink);
            }

        .gal-page .gal-card__body {
            padding: 16px 18px 18px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex: 1;
        }

        .gal-page .gal-card__cat {
            font-size: 11px;
            font-weight: 400;
            letter-spacing: .09em;
            text-transform: uppercase;
            color: var(--orange);
        }

        .gal-page .gal-card__title {
            font-size: 16.5px;
            font-weight: 400;
            color: var(--charcoal);
            line-height: 1.35;
            transition: color .2s;
        }

        .gal-page .gal-card:hover .gal-card__title {
            color: var(--orange);
        }

        .gal-page .gal-card__desc {
            font-size: 13.5px;
            color: var(--muted);
            line-height: 1.55;
        }

        .gal-page .gal-empty {
            display: none;
            text-align: center;
            padding: 60px 20px;
            color: var(--muted);
        }

            .gal-page .gal-empty.is-on {
                display: block;
            }

            .gal-page .gal-empty svg {
                width: 48px;
                height: 48px;
                fill: var(--border);
                margin: 0 auto 12px;
            }

/* ---------- lightbox ---------- */
.gal-lb {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(23,27,32,.93);
}

    .gal-lb.is-open {
        display: flex;
    }

.gal-lb__inner {
    width: min(1080px,100%);
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
}

.gal-lb__stage {
    position: relative;
    background: #101317;
}

    .gal-lb__stage img {
        width: 100%;
        max-height: 68vh;
        object-fit: contain;
    }

.gal-lb__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .2s,transform .2s;
}

    .gal-lb__nav:hover {
        background: var(--orange);
        transform: translateY(-50%) scale(1.06);
    }

        .gal-lb__nav:hover svg {
            fill: #fff;
        }

    .gal-lb__nav svg {
        width: 19px;
        height: 19px;
        fill: var(--charcoal);
    }

.gal-lb__prev {
    left: 14px
}

.gal-lb__next {
    right: 14px
}

.gal-lb__close {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .2s,transform .25s;
}

    .gal-lb__close:hover {
        background: var(--orange);
        transform: rotate(90deg);
    }

    .gal-lb__close svg {
        width: 16px;
        height: 16px;
        fill: #fff;
    }

.gal-lb__cap {
    padding: 18px 22px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

    .gal-lb__cap .gal-card__cat {
        margin-bottom: 4px;
    }

    .gal-lb__cap h3 {
        font-size: 19px;
        color: var(--charcoal);
        font-weight: 600;
        line-height: 1.3;
    }

    .gal-lb__cap p {
        font-size: 14px;
        color: var(--muted);
        margin-top: 5px;
        max-width: 70ch;
    }

.gal-lb__count {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    white-space: nowrap;
    padding-top: 4px;
}

.gal-lb__spec {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 11.5px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--logo-ink);
}

    .gal-lb__spec i {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        display: block;
    }

    .gal-lb__spec.is-shoulder {
        background: color-mix(in srgb,var(--logo-blue) 14%,white);
    }

        .gal-lb__spec.is-shoulder i {
            background: var(--logo-blue);
        }

    .gal-lb__spec.is-spine {
        background: color-mix(in srgb,var(--logo-green) 16%,white);
    }

        .gal-lb__spec.is-spine i {
            background: var(--logo-green);
        }

    .gal-lb__spec.is-knee {
        background: color-mix(in srgb,var(--logo-pink) 12%,white);
    }

        .gal-lb__spec.is-knee i {
            background: var(--logo-pink);
        }

/* ---------- closing CTA (hero-banner button pattern) ---------- */
.gal-page .gal-cta {
    background: var(--charcoal);
    color: rgba(255,255,255,.78) !important;
}

    .gal-page .gal-cta .gal-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 26px;
        flex-wrap: wrap;
        padding: 44px 20px;
    }

    .gal-page .gal-cta h2 {
        color: #fff;
        font-size: clamp(21px,2.8vw,28px);
        font-weight: 600;
        margin-bottom: 7px;
    }

    .gal-page .gal-cta p {
        max-width: 56ch;
        font-size: 15px;
    }

.gal-page .gal-cta__actions {
    display: flex;
    gap: 13px;
    flex-wrap: wrap;
}

/* double-circle fill button — mirrors .mh-banner__btn in index.css */
.gal-page .mh-banner__btn {
    --mhbn-secondary: var(--orange);
    --mhbn-secondary-hover: var(--orange-dark);
    position: relative;
    z-index: 0;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 12px;
    background: var(--mhbn-secondary);
    color: #fff;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: background .5s ease,transform .3s ease,color .3s ease;
}

    .gal-page .mh-banner__btn svg {
        width: 17px;
        height: 17px;
        fill: currentColor;
        flex: none;
    }

    .gal-page .mh-banner__btn::before,
    .gal-page .mh-banner__btn::after {
        content: "";
        position: absolute;
        z-index: -1;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: var(--mhbn-secondary-hover);
        transition: width .5s ease,height .5s ease;
    }

    .gal-page .mh-banner__btn::before {
        top: -30px;
        left: -30px;
    }
    /* parked fully outside the corner */
    .gal-page .mh-banner__btn::after {
        bottom: -30px;
        right: -30px;
    }

    .gal-page .mh-banner__btn:hover,
    .gal-page .mh-banner__btn:focus-visible {
        background: var(--mhbn-secondary-hover);
        transform: translateY(-2px);
    }

        .gal-page .mh-banner__btn:hover::before,
        .gal-page .mh-banner__btn:hover::after,
        .gal-page .mh-banner__btn:focus-visible::before,
        .gal-page .mh-banner__btn:focus-visible::after {
            width: 100%;
            height: 100%;
        }

.gal-page .mh-banner__btn--outline {
    background: transparent;
    border: 1.6px solid rgba(255,255,255,.7);
    color: #fff;
    --mhbn-secondary-hover: #ffffff;
}

    .gal-page .mh-banner__btn--outline:hover,
    .gal-page .mh-banner__btn--outline:focus-visible {
        color: var(--logo-ink);
        border-color: #fff;
        background: transparent;
    }

/* ---------- gallery breakpoints (section-local) ---------- */
@media (max-width:900px) {
    .gal-lb__cap {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width:760px) {
    .gal-page .gal-grid {
        grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
        gap: 16px;
    }

    .gal-page .gal-head {
        min-height: clamp(220px,34vh,300px);
        padding: 40px 0 44px;
    }

    .gal-lb {
        padding: 12px;
    }

    .gal-lb__nav {
        width: 38px;
        height: 38px;
    }

    .gal-lb__prev {
        left: 6px
    }

    .gal-lb__next {
        right: 6px
    }

    .gal-lb__stage img {
        max-height: 54vh;
    }

    .gal-page .gal-cta .gal-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width:520px) {
    .gal-page .gal-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion:reduce) {
    .gal-page *,
    .gal-lb * {
        transition-duration: .01ms !important;
        animation: none !important;
    }

    .gal-page .gal-card {
        opacity: 1;
        transform: none;
    }
}
