/* Jeevaashramam Gallery add-on. All selectors are prefixed to avoid changing existing pages. */
.j-gallery-hero {
    background: linear-gradient(135deg, #123d26, #28633b);
    color: #fffdf5;
    padding: clamp(38px, 6vw, 76px) 20px 34px;
    text-align: center;
}
.j-gallery-hero-inner { width: min(1120px, 100%); margin: 0 auto; }
.j-gallery-eyebrow { margin: 0 0 10px; font-size: 12px; letter-spacing: 3px; font-weight: 700; color: #f0dfa0; }
.j-gallery-hero h1 { margin: 0; font: 700 clamp(34px, 5vw, 56px)/1.12 Georgia, "Times New Roman", serif; color: #fffdf5; }
.j-gallery-hero p:not(.j-gallery-eyebrow) { margin: 14px auto 25px; max-width: 680px; line-height: 1.7; }
.j-gallery-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.j-gallery-tab { border: 1px solid rgba(255,255,255,.6); background: transparent; color: white; border-radius: 30px; padding: 11px 24px; font-weight: 700; cursor: pointer; }
.j-gallery-tab.is-active, .j-gallery-tab:hover { background: #f3e8b1; border-color: #f3e8b1; color: #123d26; }
.j-gallery-main { width: min(1200px, calc(100% - 36px)); margin: 38px auto 70px; min-height: 300px; }
.j-gallery-panel[hidden] { display: none !important; }
.j-gallery-section-heading { margin-bottom: 22px; }
.j-gallery-section-heading h2 { margin: 0 0 7px; color: #174a2d; font: 700 clamp(25px, 3vw, 34px)/1.2 Georgia, "Times New Roman", serif; }
.j-gallery-section-heading p { margin: 0; color: #5e685e; line-height: 1.65; }
.j-gallery-photo-grid, .j-gallery-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.j-gallery-photo { display: block; width: 100%; overflow: hidden; padding: 0; border: 1px solid #e4dfd0; border-radius: 13px; background: white; text-align: left; cursor: pointer; box-shadow: 0 5px 18px rgba(24,55,31,.07); }
.j-gallery-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.j-gallery-photo:hover img { transform: scale(1.035); }
.j-gallery-photo span { display: block; padding: 12px 14px; color: #214e30; font-weight: 700; overflow-wrap: anywhere; }
.j-gallery-video-card, .j-gallery-audio-card { overflow: hidden; border: 1px solid #e4dfd0; border-radius: 13px; background: #fff; box-shadow: 0 5px 18px rgba(24,55,31,.06); }
.j-gallery-video-frame { position: relative; aspect-ratio: 16 / 9; background: #101510; }
.j-gallery-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.j-gallery-media-copy { padding: 14px 16px 17px; }
.j-gallery-media-copy h3, .j-gallery-audio-content h3 { margin: 0 0 7px; color: #174a2d; font-size: 18px; }
.j-gallery-media-copy p { margin: 0; color: #60695e; line-height: 1.6; }
.j-gallery-audio-list { display: grid; gap: 14px; }
.j-gallery-audio-card { display: flex; align-items: center; gap: 16px; padding: 18px; }
.j-gallery-audio-icon { flex: 0 0 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #e9f0e4; color: #1f6038; font-size: 28px; }
.j-gallery-audio-content { min-width: 0; flex: 1; }
.j-gallery-audio-content audio { width: 100%; max-width: 640px; display: block; margin-top: 8px; }
.j-gallery-empty { border: 1px dashed #b7c6ad; border-radius: 14px; padding: 30px 24px; text-align: center; background: #fbfaf4; color: #31583a; }
.j-gallery-empty p { margin-bottom: 0; color: #687365; line-height: 1.7; }
.j-gallery-empty code { overflow-wrap: anywhere; }
.j-gallery-video-invalid { padding: 35px 20px; background: #f8f4e9; color: #7b3d2d; }
.j-gallery-lightbox { position: fixed; z-index: 20000; inset: 0; display: none; align-items: center; justify-content: center; padding: 50px 20px 20px; background: rgba(0,0,0,.9); }
.j-gallery-lightbox.is-open { display: flex; }
.j-gallery-lightbox img { display: block; max-width: min(1200px, 96vw); max-height: 88vh; width: auto; height: auto; object-fit: contain; }
.j-gallery-lightbox-close { position: absolute; top: 12px; right: 20px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: white; color: #123d26; font-size: 32px; cursor: pointer; line-height: 1; }
body.j-gallery-no-scroll { overflow: hidden; }
@media (max-width: 900px) { .j-gallery-photo-grid, .j-gallery-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
    .j-gallery-main { width: calc(100% - 24px); margin-top: 25px; }
    .j-gallery-photo-grid, .j-gallery-video-grid { grid-template-columns: 1fr; gap: 14px; }
    .j-gallery-audio-card { align-items: flex-start; padding: 14px; }
    .j-gallery-audio-icon { flex-basis: 42px; height: 42px; }
    .j-gallery-tab { padding: 10px 18px; }
}
