/* Inner pages: carries the homepage look to every page except index and links.
   Load after styles.css. The <body> needs class="inner-page". */

.inner-page { line-height: 1.75; }
.inner-page main img { display: block; width: 100%; height: auto; object-fit: cover; }
.inner-page figure { margin: 0; }

/* Chrome: match the homepage topbar and footer */
.inner-page .topbar { width: calc(100% - 2rem); max-width: 1248px; padding: 0.9rem 1.5rem; background: rgba(248, 252, 255, 0.92); }
.inner-page .brand-text { font-size: 2.25rem; }
.inner-page .brand-sub { font-size: 0.62rem; }
.inner-page .nav > a:not(.btn), .inner-page .dropdown-toggle { font-size: 0.88rem; min-height: 44px; display: flex; align-items: center; }
.inner-page .dropdown-menu { background: #f8fcff; border-color: var(--line); box-shadow: 0 14px 30px rgba(10, 57, 96, 0.08); }
.inner-page .dropdown-menu::before { background: #f8fcff; border-color: var(--line); }
.inner-page .dropdown-menu a { font-size: 0.92rem; }
.inner-page .support-pill { margin-left: 0.5rem; padding: 0.65rem 1rem; }
.inner-page main { max-width: 1180px; padding: 2rem 1rem 0; }
.inner-page .footer { max-width: 1280px; padding: 3rem 2rem 1.5rem; font-size: 0.95rem; }
.inner-page .footer-desc, .inner-page .footer-links a { font-size: 0.95rem; }

/* Type */
.inner-page main p, .inner-page main li { font-size: 1.125rem; }
.inner-page .lead { font-size: 1.25rem; max-width: 56ch; line-height: 1.7; }
.inner-page .eyebrow { font-size: 0.75rem; letter-spacing: 0.18em; line-height: 1.6; color: #28788f; margin-bottom: 1rem; }
.inner-page h1 { font-size: 3.8rem; line-height: 1.03; letter-spacing: -0.02em; font-weight: 600; }
.inner-page h2 { font-size: 2.8rem; line-height: 1.08; letter-spacing: -0.02em; }
.inner-page h3 { font-family: "Cormorant Garamond", serif; font-size: 1.65rem; font-weight: 600; line-height: 1.15; }
.inner-page h1 em, .inner-page h2 em { font-style: normal; font-weight: 600; color: #237b92; }
.inner-page label { font-size: 0.95rem; }
.inner-page input, .inner-page textarea, .inner-page select { font-size: 1rem; border-radius: 14px; padding: 0.8rem 0.95rem; }
.inner-page .purim-cta .cta-body p { font-size: 1.125rem; }
.inner-page .purim-cta .cta-body .cta-detail { font-size: 0.95rem; }

/* Buttons and links: match the homepage */
.inner-page .btn { gap: 0.8rem; padding: 0.85rem 1.3rem; font-size: 0.9rem; box-shadow: 0 6px 14px rgba(14, 63, 98, 0.1); }
.inner-page .btn:not(.btn-light):not(.btn-ghost):not(.support-pill):hover { background: #106d8e; }
.inner-page .btn-ghost:hover { background: #e2f4f8; }
.inner-page .btn-light:hover { background: #e5f7fb; }
.inner-page .btn span, .inner-page .home-link span { font-size: 1.15rem; font-weight: 400; }
.inner-page .home-link, .inner-page .text-link { display: inline-flex; align-items: center; gap: 0.8rem; min-height: 44px; color: var(--ink); font-size: 0.95rem; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.inner-page .home-link:hover, .inner-page .text-link:hover { text-decoration-color: currentColor; }

/* Illustrated hero (pages without a photo) */
.inner-page .page-hero { padding: 3.5rem 2.5rem; padding-right: clamp(15rem, 26vw, 19rem); border-radius: 28px; }
.inner-page .page-hero h1 { max-width: 15ch; margin-bottom: 1.4rem; }
.inner-page .page-hero::after { width: clamp(180px, 22vw, 260px); }
.inner-page .hero-cta { gap: 1rem 1.4rem; align-items: center; margin-top: 1.8rem; }

/* Photo hero */
.inner-page .page-hero.has-photo { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; padding: 3rem 2.5rem; }
.inner-page .page-hero.has-photo::after { display: none; }
.inner-page .page-hero.has-photo h1 { max-width: 13ch; }

/* Photo frame: same white rounded frame as the homepage photos */
.photo-frame { padding: 0.6rem 0.6rem 0; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 16px 40px rgba(14, 63, 98, 0.09); }
.photo-frame img { border-radius: 18px; aspect-ratio: 4 / 3; object-position: var(--pos, 50% 50%); }
.photo-frame.is-portrait { max-width: 420px; justify-self: center; }
.photo-frame.is-portrait img { aspect-ratio: 4 / 5; }
.photo-frame figcaption { font-family: "Cormorant Garamond", serif; font-style: italic; text-align: center; font-size: 1.2rem; line-height: 1.3; color: #28788f; padding: 0.75rem 0.5rem; }

/* Photo band: image + story, like the homepage "Our Story" section */
.photo-band { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: center; margin-top: 5rem; }
.photo-band.is-reversed > figure { order: 2; }
.photo-band h2 { margin-bottom: 1.2rem; }

/* Sections and cards */
.inner-page .section { margin-top: 5rem; }
.inner-page .section-head { margin-bottom: 2rem; }
.inner-page .grid, .inner-page .cards { gap: 1.3rem; }
.inner-page .card { padding: 1.9rem; border-radius: 20px; box-shadow: var(--shadow); }
.inner-page .card:hover { border-color: var(--accent); }
.inner-page .card h3 { margin-bottom: 0.7rem; }
.inner-page .card-icon { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 1.1rem; }

/* Deep-blue CTA band: same as the homepage "Help someone else feel at home" */
.inner-page .donate { position: relative; overflow: hidden; border: none; border-radius: 28px; padding: 3rem; background: linear-gradient(120deg, #114f7d, #106d8e); }
.inner-page .donate::before, .inner-page .donate::after { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 50%; pointer-events: none; }
.inner-page .donate::before { left: -180px; bottom: -220px; }
.inner-page .donate::after { right: -160px; top: -200px; }
.inner-page .donate > * { position: relative; z-index: 1; }
.inner-page .donate h2 { color: #f8fcff; }
.inner-page .donate h2 em { color: #9ddde8; }
.inner-page .donate .eyebrow { color: #c9edf3; }
.inner-page .donate p { color: #e5f7fb; }

/* Stay-in-touch strip (end of each page) */
.stay-strip { display: flex; align-items: center; justify-content: space-between; gap: 3rem; margin-top: 5rem; padding: 3.5rem 0 1rem; border-top: 1px solid var(--line); }
.stay-strip h2 { font-size: 2.3rem; margin-bottom: 0.5rem; }
.stay-strip p { margin: 0; }
.stay-strip .btn { flex-shrink: 0; }

@media (max-width: 900px) {
  .inner-page .topbar { border-radius: 18px; padding: 1rem 1.5rem; }
  .inner-page .nav { background: #f8fcff; border-color: var(--line); max-height: calc(100dvh - 110px); overflow-y: auto; }
  .inner-page .nav > a:not(.btn), .inner-page .dropdown-toggle { font-size: 0.95rem; }
  .inner-page .support-pill { margin-left: 0; justify-content: center; }
  .inner-page h1 { font-size: 3rem; }
  .inner-page h2 { font-size: 2.3rem; }
  .inner-page .page-hero, .inner-page .page-hero.has-photo { padding: 2.2rem 1.3rem; }
  .inner-page .page-hero.has-photo { grid-template-columns: 1fr; gap: 2rem; }
  .photo-band { grid-template-columns: 1fr; gap: 2rem; margin-top: 3.5rem; }
  .photo-band.is-reversed > figure { order: 0; }
  .inner-page .section { margin-top: 3.8rem; }
  .inner-page .donate { padding: 2.4rem 1.5rem; }
  .stay-strip { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}

@media (max-width: 600px) {
  .inner-page main { padding: 1.25rem 1rem 0; }
  .inner-page .brand-text { font-size: 2rem; }
  .inner-page h1 { font-size: 2.6rem; }
  .inner-page h2 { font-size: 2.1rem; }
  .inner-page .lead { font-size: 1.15rem; }
  .inner-page .card { padding: 1.5rem; }
  .photo-frame.is-portrait { max-width: 340px; }
  .inner-page .footer { padding: 2.5rem 1.25rem 1.5rem; }
}

/* Photo strip: three framed photos in a row */
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-top: 5rem; }
.photo-strip .photo-frame img { aspect-ratio: 4 / 3; }
.photo-strip .photo-frame.is-portrait { max-width: none; }
.photo-strip .photo-frame.is-portrait img { aspect-ratio: 4 / 3; object-position: var(--pos, 50% 35%); }
.photo-strip-title { margin-top: 5rem; }
.photo-strip-title + .photo-strip { margin-top: 1.6rem; }

/* Cluster nav: pill row linking the pages of one topic */
.cluster-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 1.6rem 0 0; padding: 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(248, 252, 255, 0.85); }
.cluster-nav .cluster-label { padding: 0 0.8rem 0 0.9rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #28788f; }
.inner-page .cluster-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0.4rem 1rem; border-radius: 999px; border: 1px solid transparent; color: var(--ink); font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: background 0.2s ease, border-color 0.2s ease; }
.inner-page .cluster-nav a:hover { background: rgba(89, 189, 204, 0.14); border-color: rgba(89, 189, 204, 0.4); }
.inner-page .cluster-nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* Holiday cards with a photo on top */
.hub-card { display: flex; flex-direction: column; padding: 0.6rem 0.6rem 0; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink-deep); transition: transform 0.25s ease, border-color 0.25s ease; }
.hub-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.hub-card img { border-radius: 18px; aspect-ratio: 4 / 3; object-position: var(--pos, 50% 40%); }
.hub-card .hub-body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.2rem 1.3rem; }
.hub-card .eyebrow { margin-bottom: 0.6rem; }
.hub-card h3 { margin-bottom: 0.6rem; }
.hub-card p { margin: 0 0 1rem; }
.hub-card .hub-link { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(10, 57, 96, 0.15); font-weight: 600; font-size: 0.95rem; display: flex; justify-content: space-between; }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.hub-card.is-art { padding: 0; }
.hub-card.is-art .hub-art { aspect-ratio: 4 / 3; margin: 0.6rem 0.6rem 0; border-radius: 18px; background: radial-gradient(circle at 20% 15%, rgba(89,189,204,0.35), transparent 50%), linear-gradient(140deg, #f8fdff, #e2f4f8); display: grid; place-items: center; }
.hub-card.is-art .hub-art img { width: 55%; aspect-ratio: auto; border-radius: 0; }

/* Numbered steps (how-to sections) */
.steps { counter-reset: step; display: grid; gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding: 1.5rem 1.6rem 1.5rem 4.6rem; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.steps li::before { content: counter(step); position: absolute; left: 1.4rem; top: 1.35rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 0.95rem; }
.steps li strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 1.5rem; line-height: 1.15; color: var(--ink); margin-bottom: 0.25rem; }

/* Quote/note panel */
.note-panel { padding: 1.8rem 2rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 20px; background: linear-gradient(135deg, #e2f5f9, #f8fcff); }
.note-panel p { margin: 0; }
.note-panel p + p { margin-top: 0.8rem; }

/* Mobile: stack strips and hub cards; the cluster pill row wraps inside a softer rounded box */
@media (max-width: 900px) {
  .photo-strip, .hub-grid { grid-template-columns: 1fr; }
  .photo-strip { margin-top: 3.5rem; }
  .cluster-nav { border-radius: 24px; }
  .steps li { padding-left: 4rem; }
}

/* Square photo mosaic (mixed portrait and landscape photos) */
.photo-strip.is-square .photo-frame img,
.photo-strip.is-square .photo-frame.is-portrait img { aspect-ratio: 1 / 1; }
.photo-strip.is-square { margin-top: 1.6rem; }

/* Breadcrumbs (written by _tools/build.py) */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin: 0 0 1.1rem 0.4rem; font-size: 0.85rem; font-weight: 600; color: #366780; }
.breadcrumbs a { color: #28788f; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.breadcrumbs .crumb-sep { color: var(--accent); }
.breadcrumbs [aria-current] { color: var(--ink); }

/* Skip link */
.skip-link { position: fixed; left: 1rem; top: 0.5rem; z-index: 100; padding: 0.8rem 1rem; border-radius: 999px; background: var(--ink); color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

/* Wide footer: brand + four link columns */
.footer-grid.footer-grid-wide { grid-template-columns: 1.3fr repeat(4, 1fr); gap: 2rem 1.6rem; }
@media (max-width: 1000px) { .footer-grid.footer-grid-wide { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid.footer-grid-wide { grid-template-columns: 1fr; } }

/* Shabbat times tool */
.times-card { padding: 2.4rem; border-radius: 28px; background: linear-gradient(120deg, #114f7d, #106d8e); color: #f8fcff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.times-card::after { content: ""; position: absolute; right: -140px; top: -160px; width: 380px; height: 380px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%; pointer-events: none; }
.times-card .eyebrow { color: #c9edf3; }
.inner-page .times-card h2 { color: #f8fcff; margin-bottom: 1.6rem; }
.times-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.times-cell { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.3rem 1.4rem; border-radius: 20px; background: rgba(248, 252, 255, 0.1); border: 1px solid rgba(248, 252, 255, 0.18); }
.times-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #9ddde8; }
.times-value { font-family: "Cormorant Garamond", serif; font-size: 3.4rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.times-value-text { font-size: 2.1rem; line-height: 1.1; }
.times-date { font-size: 0.95rem; color: #e5f7fb; }
.inner-page .times-status { margin: 1rem 0 0; color: #e5f7fb; font-size: 1rem; }
.inner-page .times-status:empty { display: none; }
.times-upcoming-head { margin-top: 3.5rem; }
.times-table-wrap { border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.times-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.times-table th { text-align: left; padding: 1rem 1.3rem; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: #28788f; background: #eef8fb; }
.times-table td { padding: 1rem 1.3rem; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.times-table td:nth-child(2), .times-table td:nth-child(3) { font-weight: 700; color: var(--ink); }
.inner-page .times-source { margin-top: 1rem; font-size: 0.95rem; color: #366780; }
@media (max-width: 900px) {
  .times-card { padding: 1.8rem 1.4rem; }
  .times-grid { grid-template-columns: 1fr; }
  .times-value { font-size: 2.8rem; }
  .times-table thead { display: none; }
  .times-table, .times-table tbody, .times-table tr, .times-table td { display: block; width: 100%; }
  .times-table tr { padding: 0.9rem 1.2rem; border-top: 1px solid var(--line); }
  .times-table tr:first-child { border-top: none; }
  .times-table td { border: none; padding: 0.15rem 0; display: flex; justify-content: space-between; gap: 1rem; }
  .times-table td::before { content: attr(data-label); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #28788f; }
}

/* Related pages (written by _tools/build.py from site.json) */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.related-card { position: relative; display: flex; flex-direction: column; gap: 0.5rem; min-height: 100%; padding: 1.5rem 3rem 1.5rem 1.5rem; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink-deep); text-decoration: none; box-shadow: 0 8px 20px rgba(14, 63, 98, 0.08); transition: transform 0.25s ease, border-color 0.25s ease; }
.related-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.related-title { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; font-weight: 600; line-height: 1.15; color: var(--ink); }
.related-desc { font-size: 1rem; line-height: 1.6; color: #366780; }
.related-arrow { position: absolute; top: 1.3rem; right: 1.3rem; font-size: 1.2rem; color: #28788f; }
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr; } }

/* Mobile menu: open dropdowns stack under their button */
@media (max-width: 900px) {
  .nav-item { flex-direction: column; align-items: stretch; }
  .nav-dropdown .dropdown-menu { width: 100%; }
}
