/* ==========================================================================
   Keith C. Heidorn — site styles
   Built on Bootstrap 5.3 + Bootswatch "Materia". Only additions live here.
   ========================================================================== */

:root {
  --kch-bg: #f4f6f9;
  --kch-ink: #263238;
  --kch-muted: #607d8b;
  --kch-card-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(33,150,243,.08);
  --kch-hero-from: #0d47a1;
  --kch-hero-to: #2196f3;
  --kch-hero-pattern: url("../img/hero-isobars.svg");
}

html { scroll-behavior: smooth; }
body {
  background: var(--kch-bg);
  color: #37474f;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }

/* ---------- Navbar ---------- */
.site-navbar { z-index: 1030; }
.site-navbar .navbar-brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 500; letter-spacing: .01em;
}
.site-navbar .navbar-brand img { width: 38px; height: 38px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.site-navbar .navbar-brand small {
  display: block; font-size: .7rem; font-weight: 400; opacity: .8; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
}
.site-navbar .nav-link { font-weight: 500; }
.site-navbar .dropdown-menu { border: 0; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.site-navbar .dropdown-item i { width: 1.4rem; display: inline-block; color: var(--bs-primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 3rem 0 6.5rem;
  background:
    var(--kch-hero-pattern) center / cover no-repeat,
    linear-gradient(135deg, var(--kch-hero-from), var(--kch-hero-to));
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 90px;
  background: url("../img/hero-clouds.svg") bottom center / 100% 100% no-repeat;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.16); padding: .35rem .8rem; border-radius: 2rem;
  color: #fff; text-decoration: none;
}
.hero-eyebrow:hover { background: rgba(255,255,255,.26); color: #fff; }
.hero h1 { font-weight: 300; margin: .9rem 0 .3rem; text-wrap: balance; text-shadow: 0 1px 3px rgba(0,0,0,.18); }
.hero .lead { opacity: .9; max-width: 46rem; }
.hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.6); --bs-breadcrumb-item-active-color: rgba(255,255,255,.85); margin: 0; font-size: .85rem; }
.hero .breadcrumb a { color: #fff; text-decoration: none; opacity: .85; }
.hero .breadcrumb a:hover { opacity: 1; text-decoration: underline; }

.hero-weather { --kch-hero-from: #0d47a1; --kch-hero-to: #2196f3; --kch-hero-pattern: url("../img/hero-isobars.svg"); }
.hero-home    { --kch-hero-from: #0b3c86; --kch-hero-to: #42a5f5; --kch-hero-pattern: url("../img/hero-isobars.svg"); }
.hero-gallery { --kch-hero-from: #4a148c; --kch-hero-to: #9c27b0; --kch-hero-pattern: none; }
.hero-living  { --kch-hero-from: #1b5e20; --kch-hero-to: #4caf50; --kch-hero-pattern: url("../img/hero-mountains.svg"); }
.hero-storm   { --kch-hero-from: #1c262b; --kch-hero-to: #546e7a; --kch-hero-pattern: url("../img/hero-isobars.svg"); }
.hero-verse   { --kch-hero-from: #01579b; --kch-hero-to: #00897b; --kch-hero-pattern: url("../img/hero-isobars.svg"); }
.hero-pbp     { --kch-hero-from: #33691e; --kch-hero-to: #ff9800; --kch-hero-pattern: url("../img/hero-mountains.svg"); }

/* ---------- Content surfaces ---------- */
.page-body { margin-top: -4.5rem; position: relative; z-index: 2; padding-bottom: 3rem; }
.content-card {
  background: #fff;
  border-radius: .75rem;
  box-shadow: var(--kch-card-shadow);
  padding: clamp(1.25rem, 3.5vw, 2.75rem);
}
.side-card {
  background: #fff; border-radius: .75rem; box-shadow: var(--kch-card-shadow);
  overflow: hidden; margin-bottom: 1.5rem;
}
.side-card .side-card-title {
  font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--kch-muted); padding: 1rem 1.25rem .5rem; margin: 0;
}
.side-card .list-group-item { border-left: 0; border-right: 0; font-size: .95rem; padding: .55rem 1.25rem; }
.side-card .list-group-item:last-child { border-bottom: 0; }
.side-card .list-group-item i { color: var(--bs-primary); margin-right: .5rem; }
.side-card .list-group-item.active { background: rgba(33,150,243,.1); color: var(--bs-primary); border-color: rgba(0,0,0,.08); font-weight: 500; }
.side-card .side-scroll { max-height: 70vh; overflow-y: auto; }
@media (min-width: 992px) { .sticky-lg { position: sticky; top: 5.5rem; } }

/* ---------- Prose: typography for article content ---------- */
.prose { font-size: 1.05rem; line-height: 1.75; color: #37474f; overflow-wrap: break-word; }
.prose::after { content: ""; display: table; clear: both; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { color: var(--kch-ink); line-height: 1.3; margin: 2rem 0 .8rem; }
.prose h1 { font-size: 1.9rem; font-weight: 400; }
.prose h2 { font-size: 1.5rem; font-weight: 400; }
.prose h3 { font-size: 1.2rem; font-weight: 500; }
.prose h4, .prose h5 { font-size: 1.05rem; font-weight: 500; }
.prose > :first-child { margin-top: 0; }
.prose p { margin-bottom: 1.15rem; }
.prose a { text-underline-offset: .18em; }
.prose img { max-width: 100%; height: auto; border-radius: .35rem; }
.prose img.float-start { margin: .35rem 1.5rem 1rem 0; max-width: 45%; }
.prose img.float-end   { margin: .35rem 0 1rem 1.5rem; max-width: 45%; }
@media (max-width: 575.98px) {
  .prose img.float-start, .prose img.float-end { float: none !important; display: block; max-width: 100%; margin: 1rem auto; }
}
.prose figure { margin: 1.5rem 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose hr { margin: 2rem auto; border: 0; height: 2px; opacity: 1; width: 6rem;
  background: linear-gradient(90deg, transparent, var(--bs-primary), transparent); }
.prose blockquote, .prose .callout {
  border-left: 4px solid var(--bs-primary);
  background: #f1f8fe; border-radius: 0 .5rem .5rem 0;
  padding: 1rem 1.25rem; margin: 1.5rem 0; color: #455a64; font-style: italic;
}
.prose .callout { font-style: normal; }
.prose .callout > :last-child, .prose blockquote > :last-child { margin-bottom: 0; }
.prose .callout h1, .prose .callout h2, .prose .callout h3 { font-size: 1.1rem; font-weight: 400; margin: 0 0 .5rem; line-height: 1.6; }
.prose .table { font-size: .95rem; }
.prose .table-responsive { margin: 1.5rem 0; }
.prose .row { margin-top: 1rem; margin-bottom: 1rem; }
.prose dl dt { color: var(--kch-ink); }
.prose .text-center img { display: inline-block; }
.prose pre { white-space: pre-wrap; }

/* Poems */
.poem {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.25rem; line-height: 1.85; color: #37474f;
}
.poem p { margin-bottom: 1.4rem; }
.poem b, .poem strong { font-weight: 400; }

/* Prev / next pager */
.pager-nav { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,.08); }
.pager-nav a { max-width: 48%; }
.pager-nav .pager-label { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--kch-muted); }

/* ---------- Gallery ---------- */
.gallery-grid { --bs-gutter-x: 1.25rem; --bs-gutter-y: 1.25rem; }
.art-card {
  display: block; background: #fff; border-radius: .6rem; overflow: hidden;
  box-shadow: var(--kch-card-shadow); text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease; height: 100%;
}
.art-card:hover, .art-card:focus-visible { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(74,20,140,.18); color: inherit; }
.art-card .ratio { background: #eceff1; }
.art-card img { object-fit: cover; width: 100%; height: 100%; }
.art-card .art-card-title { padding: .65rem .85rem; font-size: .92rem; font-weight: 500; color: var(--kch-ink); }
.art-stage {
  background: radial-gradient(ellipse at center, #37474f 0%, #1c262b 100%);
  border-radius: .75rem; padding: clamp(1rem, 3vw, 2.5rem); text-align: center;
  box-shadow: var(--kch-card-shadow);
}
.art-stage img { max-width: 100%; max-height: 78vh; height: auto; box-shadow: 0 12px 40px rgba(0,0,0,.45); border: 6px solid #fff; }
.art-meta { color: var(--kch-muted); }
.gallery-cat-card .ratio img { object-fit: cover; }
.gallery-cat-card .card-body { text-align: center; }

/* ---------- Home ---------- */
.home-hero { padding: 4.5rem 0 8rem; }
.home-hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.memorial-portrait {
  width: 100%; max-width: 170px; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 6px solid rgba(255,255,255,.85); box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.feature-card { border: 0; border-radius: .75rem; overflow: hidden; box-shadow: var(--kch-card-shadow); transition: transform .18s ease, box-shadow .18s ease; height: 100%; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(33,150,243,.18); }
.feature-card .feature-media { height: 190px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #eceff1; }
.feature-card .feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-card .feature-media.contain img { object-fit: contain; padding: 1rem; }
.feature-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: #fff; margin-top: -2.4rem; position: relative; box-shadow: 0 4px 12px rgba(0,0,0,.2); border: 3px solid #fff;
}
.feature-card .card-title { font-weight: 500; }
.feature-card a.stretched-link { color: inherit; text-decoration: none; }
.book-card img { width: 100%; max-width: 150px; border-radius: .25rem; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.section-heading { font-weight: 300; color: var(--kch-ink); }
.section-heading small { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bs-primary); font-weight: 500; margin-bottom: .35rem; }

/* ---------- Footer ---------- */
.site-footer { background: #1c262b; color: #b0bec5; padding: 3rem 0 2rem; font-size: .92rem; flex-shrink: 0; }
.site-footer h2 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; margin-bottom: 1rem; }
.site-footer a { color: #e3f2fd; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer .footer-brand { display: flex; gap: .75rem; align-items: center; color: #fff; font-size: 1.1rem; margin-bottom: .75rem; }
.site-footer .footer-brand img { width: 40px; height: 40px; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.25rem; font-size: .82rem; color: #78909c; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040;
  width: 3rem; height: 3rem; border-radius: 50%; border: 0;
  background: var(--bs-primary); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
}
.to-top.show { opacity: 1; visibility: visible; }

@media print {
  .site-navbar, .site-footer, .to-top, aside, .hero::after { display: none !important; }
  .hero { background: none !important; color: #000; padding: 0 0 1rem; }
  .page-body { margin-top: 0; }
  .content-card { box-shadow: none; padding: 0; }
}

/* Link lists made from the old drop-down menus */
.link-columns { columns: 2 14rem; column-gap: 2rem; padding-left: 1.2rem; }
.link-columns li { break-inside: avoid; }
.prose img.framed { box-shadow: 0 2px 12px rgba(0,0,0,.18); }
