/*
 * ioann-karpovka: temple_section block (task 24) — one temple of the «Храмы и престольные праздники» page
 * (design Site.dc.html lines 488-549). The grid is intrinsic (auto-fit, no breakpoint): two columns (arch | text)
 * from ~824px, one column below. The photo strip reuses the generic scroller (scroller.css / js/scroller.js).
 * Breakpoints: desktop = (min-width: 768px), mobile = `not all and (min-width: 768px)`; never max-width (task 36).
 */
.ik-temple { scroll-margin-top: var(--ik-anchor-offset, 73px); }
.ik-temple--first { margin-top: 16px; }   /* margin, not padding: scroll-margin aligns the border box, so the first h2 lands like the others */
.ik-temple--last { padding-bottom: 120px; }

.ik-temple__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 40px 80px;
    align-items: start;
    padding-block: 72px;
    border-bottom: 1px solid var(--line);
}

/* Arch 380x480 centred in its column; exact design radii. */
.ik-temple__grid > .ik-arch {
    width: min(380px, 100%);
    justify-self: center;
    border-radius: 50% 50% 20px 20px / 135px 135px 20px 20px;
}
.ik-temple__grid > .ik-arch .ik-arch__inner { border-radius: 50% 50% 12px 12px / 125px 125px 12px 12px; }
.ik-temple__grid > .ik-arch .ik-arch__img { object-position: center top; }

.ik-temple__body {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 640px;
    min-width: 0;
}
.ik-temple__heading { display: flex; flex-direction: column; gap: 12px; }
.ik-temple__title {
    margin: 0;
    font: 600 clamp(32px, 3.6vw, 44px)/1.08 var(--font-title);
    color: var(--iskm-navy);
    text-wrap: balance;
}
.ik-temple__place { margin: 0; font: italic 400 24px/1.3 var(--font-title); color: var(--iskm-mauve-700); }

.ik-temple__history.ik-prose { gap: 10px; font: 400 17px/1.6 var(--font-body); color: var(--iskm-navy-400); }

/* Small uppercase label (feasts, services, photos). */
.ik-temple__label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font: 500 13px/1 var(--font-body);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--iskm-mauve-700);
}
.ik-temple__label-flower { flex-shrink: 0; width: 22px; height: 22px; margin-block: -3px; } /* 16px marker + 40% (task 68); box stays 16px */

.ik-temple__feasts-block { display: flex; flex-direction: column; gap: 14px; }
.ik-temple__feasts { display: flex; flex-direction: column; margin: 0; border-top: 1px solid var(--line); }
.ik-temple__feast {
    display: grid;
    grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
    gap: 8px 24px;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.ik-temple__feast-date,
.ik-temple__feast-name { margin: 0; }
.ik-temple__feast-date { font: 600 26px/1.1 var(--font-title); color: var(--iskm-navy); }
.ik-temple__feast-name { font: 400 17px/1.5 var(--font-body); color: var(--iskm-navy); }

/* The «Богослужения» card (.ik-temple__services) is the shared component: see services-card.css (task 74). */

/* Photo strip. */
.ik-temple__photos {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.ik-temple__photos-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ik-temple__controls { display: flex; gap: 10px; }
/* Beats scroller.css whatever the load order. No 6px focus bleed: the strip clips at the content column edge, so the photo buttons draw their focus ring inside the frame */
.ik-temple__track.ik-scroller__track { gap: 16px; margin: 0; padding: 0 0 8px; scroll-padding-inline: 0; }
.ik-temple__track:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.ik-temple__photo { width: clamp(260px, 38vw, 460px); }
.ik-temple__figure { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.ik-temple__frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    background: var(--iskm-cream-300);
}
.ik-temple__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 2026-11-22: the photo is a button that opens the full-screen viewer (lightbox.css, js/lightbox.js). */
.ik-temple__open { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ik-temple__open:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -4px; border-radius: 12px; }
.ik-temple__frame--empty img { width: 40px; height: 40px; opacity: .7; }
.ik-temple__placeholder-label { font: 400 13px/1.4 var(--font-body); color: var(--iskm-mauve-700); }
.ik-temple__caption { font: 400 14px/1.4 var(--font-body); color: var(--iskm-mauve-700); }

@media (min-width: 768px) {
    .ik-temple__feast-date { white-space: nowrap; }
}
