/* =========================================================
   MSHINDO PARISH — REAL PHOTOS & HISTORY (add-on)
   ========================================================= */

.ph-reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s cubic-bezier(.34,1.56,.64,1); }
.ph-reveal.in { opacity: 1; transform: none; }

/* ---------- About: real church photo ---------- */
.about-video .about-photo { width: 100%; height: 100%; min-height: 460px; object-fit: cover; display: block; animation: kenBurns 22s ease-in-out infinite alternate; }
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }
.about-video .badge-since { left: auto; right: 20px; top: 20px; bottom: auto; animation-delay: 1.5s; }

/* ---------- Shrine section ---------- */
.shrine { padding: 0 0 90px; background: linear-gradient(135deg, var(--bg-light) 0%, #faf6f1 100%); }
.shrine::after { display: none; }
.shrine-hero { position: relative; min-height: 640px; display: flex; align-items: flex-end; overflow: hidden; margin-bottom: 80px; }
.shrine-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenBurns 26s ease-in-out infinite alternate; }
.shrine-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(26,5,5,.88) 0%, rgba(92,15,15,.55) 45%, rgba(0,0,0,.05) 80%), linear-gradient(0deg, rgba(26,5,5,.6), transparent 50%); }
.shrine-card-wrap { position: relative; z-index: 1; width: 100%; padding-bottom: 60px; }
.shrine-card { max-width: 580px; padding: 36px 36px 32px; border-radius: 16px; color: #fff;
    background: linear-gradient(135deg, rgba(92,15,15,.72), rgba(26,5,5,.6)); border: 1px solid rgba(212,175,55,.5);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.shrine-tag { display: inline-flex; align-items: center; gap: 8px; font-family: 'Montserrat', sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--primary-dark); background: linear-gradient(135deg, var(--accent-gold), var(--accent-light)); padding: 6px 14px; border-radius: 20px; }
.shrine-card h2 { color: var(--accent-gold); text-align: left; font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 16px 0 14px; padding-bottom: 18px; }
.shrine-card h2::after { left: 0; transform: none; }
.shrine-card p { color: #f0e6d2; font-size: 1.02rem; }
.shrine-card .shrine-note { font-size: .92rem; font-style: italic; color: #d9c8b0; border-left: 3px solid var(--accent-gold); padding-left: 14px; }

/* timeline */
.timeline { list-style: none; position: relative; max-width: 980px; margin: 50px auto 0; padding: 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: linear-gradient(180deg, var(--accent-gold), var(--primary-maroon), var(--accent-gold)); border-radius: 3px; }
.tl-item { position: relative; width: 50%; padding: 0 44px 38px 0; }
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 38px 44px; }
.tl-item::before { content: '✞'; position: absolute; top: 4px; right: -19px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-maroon), var(--primary-dark)); color: var(--accent-gold); border: 3px solid var(--accent-gold); box-shadow: 0 0 0 6px rgba(212,175,55,.15); z-index: 1; font-size: 1rem; }
.tl-item:nth-child(even)::before { right: auto; left: -19px; }
.tl-year { display: block; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.6rem; color: var(--accent-gold); margin-bottom: 8px; text-align: right; }
.tl-item:nth-child(even) .tl-year { text-align: left; }
.tl-card { background: var(--bg-white); border-top: 5px solid var(--primary-maroon); border-radius: 6px; padding: 20px 22px; box-shadow: 0 10px 26px rgba(0,0,0,.08); transition: all .45s cubic-bezier(.34,1.56,.64,1); }
.tl-card:hover { transform: translateY(-8px); border-top-color: var(--accent-gold); box-shadow: 0 20px 40px rgba(212,175,55,.25); }
.tl-card h4 { font-family: 'Cinzel', serif; color: var(--primary-maroon); font-size: 1.15rem; letter-spacing: .5px; margin-bottom: 8px; }
.tl-card p { font-size: .95rem; line-height: 1.7; margin: 0; }

.villages { max-width: 900px; margin: 30px auto 0; text-align: center; padding: 28px; border: 2px dashed rgba(212,175,55,.5); border-radius: 12px; background: var(--bg-white); }
.villages h3 { font-family: 'Cinzel', serif; color: var(--primary-maroon); letter-spacing: 1px; margin-bottom: 16px; }
.village-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 14px; }
.village-chips span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 30px; background: linear-gradient(135deg, var(--primary-maroon), var(--primary-dark)); color: var(--accent-gold); font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .8rem; letter-spacing: 1px; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.village-chips span:hover { transform: translateY(-4px) scale(1.05); }
.villages p { margin: 0; font-size: .95rem; }

/* ---------- Photo gallery ---------- */
.photos { background: linear-gradient(160deg, #1a0505 0%, #2d0a0a 50%, #0e0202 100%); }
.photos h2 { color: var(--accent-gold); }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; gap: 16px; margin-top: 50px; }
.photo { position: relative; overflow: hidden; margin: 0; border-radius: 10px; border: 2px solid rgba(212,175,55,.35); cursor: zoom-in; background: #000; transition: border-color .4s ease, box-shadow .5s ease, transform .5s cubic-bezier(.34,1.56,.64,1); }
.photo.p-wide { grid-column: span 2; }
.photo.p-tall { grid-row: span 2; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s ease, filter .6s ease; filter: saturate(.95); }
.photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(26,5,5,.92)); opacity: .75; transition: opacity .5s ease; }
.photo:hover, .photo:focus-visible { border-color: var(--accent-gold); transform: translateY(-6px); box-shadow: 0 22px 46px rgba(0,0,0,.5), 0 0 30px rgba(212,175,55,.25); outline: none; }
.photo:hover img { transform: scale(1.08); filter: saturate(1.15); }
.photo:hover::after { opacity: 1; }
.photo figcaption { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; color: #fff; transform: translateY(8px); transition: transform .5s ease; }
.photo figcaption span { display: block; font-family: 'Cinzel', serif; font-size: 1rem; letter-spacing: .5px; line-height: 1.35; }
.photo figcaption small { display: block; margin-top: 4px; font-family: 'Montserrat', sans-serif; font-size: .66rem; letter-spacing: 1px; color: var(--accent-gold); opacity: 0; transition: opacity .4s ease; }
.photo:hover figcaption { transform: none; }
.photo:hover figcaption small { opacity: 1; }
.photo-zoom { position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(212,175,55,.25); border: 1px solid var(--accent-gold); color: var(--accent-gold); opacity: 0; transform: scale(.7); transition: all .4s cubic-bezier(.34,1.56,.64,1); }
.photo:hover .photo-zoom { opacity: 1; transform: none; }
.photo-credit { text-align: center; margin-top: 26px; color: #c9b99a !important; font-size: .85rem !important; font-style: italic; }

/* ---------- Photo lightbox ---------- */
.photo-box { position: fixed; inset: 0; z-index: 10006; display: flex; align-items: center; justify-content: center; padding: 20px 80px; background: rgba(14,2,2,.95); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s; }
.photo-box.open { opacity: 1; visibility: visible; }
.photo-box figure { margin: 0; max-width: 1200px; text-align: center; transform: scale(.94); transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.photo-box.open figure { transform: none; }
.photo-box img { max-width: 100%; max-height: 78vh; border: 3px solid var(--accent-gold); border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.photo-box figcaption { margin-top: 14px; color: #f0e6d2; font-family: 'Cinzel', serif; font-size: 1.1rem; letter-spacing: .5px; }
.photo-box figcaption small { display: block; margin-top: 6px; font-family: 'Montserrat', sans-serif; font-size: .72rem; letter-spacing: 1.5px; color: var(--accent-gold); }
.pb-close, .pb-nav { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--accent-gold); background: var(--primary-dark); color: var(--accent-gold); font-size: 1.1rem; cursor: pointer; transition: all .35s cubic-bezier(.34,1.56,.64,1); }
.pb-close { top: 20px; right: 20px; }
.pb-nav { top: 50%; transform: translateY(-50%); }
.pb-prev { left: 18px; }
.pb-next { right: 18px; }
.pb-close:hover { background: var(--accent-gold); color: var(--primary-dark); transform: rotate(90deg); }
.pb-nav:hover { background: var(--accent-gold); color: var(--primary-dark); transform: translateY(-50%) scale(1.12); }

/* ---------- Bishop card accent ---------- */
.bishop-card { border-color: var(--accent-gold) !important; background: linear-gradient(135deg, rgba(212,175,55,.2), rgba(255,255,255,.04)) !important; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .shrine-hero { min-height: 560px; margin-bottom: 60px; }
    .shrine-shade { background: linear-gradient(0deg, rgba(26,5,5,.95) 0%, rgba(92,15,15,.6) 55%, rgba(0,0,0,.1) 100%); }
    .shrine-card { padding: 24px 20px; }
    .timeline::before { left: 18px; }
    .tl-item, .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 30px 58px; }
    .tl-item::before, .tl-item:nth-child(even)::before { left: 0; right: auto; }
    .tl-year, .tl-item:nth-child(even) .tl-year { text-align: left; font-size: 1.3rem; }
    .photo-grid { grid-auto-rows: 170px; gap: 10px; }
    .photo.p-tall { grid-row: span 1; }
    .photo figcaption span { font-size: .82rem; }
    .photo-box { padding: 20px 12px 80px; }
    .pb-nav { top: auto; bottom: 18px; transform: none; }
    .pb-nav:hover { transform: scale(1.1); }
    .about-video .about-photo { min-height: 340px; }
}
body.a11y-still .about-photo, body.a11y-still .shrine-hero > img { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .about-photo, .shrine-hero > img { animation: none; } }

/* ---------- layout refinements ---------- */
.photo-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 250px; grid-auto-flow: dense; }
/* the church photo has a thin black strip at its bottom edge: crop it away */
.photo[data-pi="1"] img, .about-video .about-photo { height: calc(100% + 30px); object-position: 50% 0; }
.about-video { overflow: hidden; }
.shrine-hero { align-items: center; padding: 110px 0 40px; }
.shrine-card-wrap { padding-bottom: 20px; }
@media (max-width: 768px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
    .shrine-hero { align-items: flex-end; padding: 80px 0 20px; }
}
.photos .ornament-line, .shrine-card .ornament-line { color: var(--accent-gold); }
@media (max-width: 768px) {
    .shrine-hero { display: block; min-height: 0; padding: 0; margin-bottom: 50px; }
    .shrine-hero > img { position: relative; height: 300px; }
    .shrine-shade { display: none; }
    .shrine-card-wrap { margin-top: -70px; }
    .shrine-card { background: linear-gradient(135deg, var(--primary-maroon), var(--primary-dark)); }
}
