/* ==========================================================================
   Immanuel Lutheran Church of Evanston — custom.css
   Style: clean-minimal. Colours are the congregation's own logo palette.
   Every colour used anywhere on the site is declared here as a custom
   property. Never hardcode a colour value in a template.
   ========================================================================== */

:root {
  /* Core palette (site.branding.colors) */
  --wh-primary: #6c926f;          /* sage — bands, footer accents, headings */
  --wh-secondary: #0e6b76;        /* teal — secondary actions, footer headings */
  --wh-accent: #a11d3c;           /* crimson — links and the primary CTA */
  --wh-bg: #ffffff;
  --wh-text: #575756;

  /* Extended logo palette — category accents, used sparingly */
  --wh-gold: #ca913e;
  --wh-purple: #6e4569;

  /* Derived tones */
  --wh-primary-dark: #567a59;
  --wh-primary-tint: #f2f6f2;
  --wh-secondary-dark: #0a505a;
  --wh-accent-dark: #7d1630;
  --wh-on-primary: #ffffff;
  --wh-on-accent: #ffffff;
  --wh-text-muted: #7b7b7a;
  --wh-heading: #3f3f3e;
  --wh-surface: #ffffff;
  --wh-surface-alt: #f7f7f5;
  --wh-border: #e2e2dd;
  --wh-scrim: rgba(31, 38, 32, 0.55);

  /* Chrome */
  --wh-nav-bg: #ffffff;
  --wh-nav-border: #e2e2dd;
  --wh-footer-bg: #f2f6f2;
  --wh-footer-rule: #d5e0d6;

  /* Type */
  --wh-font-heading: "Lora", Georgia, "Times New Roman", serif;
  --wh-font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Bootstrap bridge */
  --bs-body-bg: var(--wh-bg);
  --bs-body-color: var(--wh-text);
  --bs-body-font-family: var(--wh-font-body);
  --bs-link-color: var(--wh-accent);
  --bs-link-hover-color: var(--wh-accent-dark);
  --bs-border-color: var(--wh-border);
}

/* --------------------------------------------------------------------------
   Base typography
   -------------------------------------------------------------------------- */

body {
  background-color: var(--wh-bg);
  color: var(--wh-text);
  font-family: var(--wh-font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--wh-font-heading);
  color: var(--wh-heading);
  font-weight: 600;
  line-height: 1.25;
}

a {
  color: var(--wh-accent);
  text-underline-offset: 0.15em;
}

a:hover, a:focus {
  color: var(--wh-accent-dark);
}

.wh-muted {
  color: var(--wh-text-muted);
}

.wh-lead {
  font-size: 1.15rem;
  color: var(--wh-text);
}

.wh-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background-color: var(--wh-accent);
  color: var(--wh-on-accent);
}

.wh-skip-link:focus {
  left: 0;
  color: var(--wh-on-accent);
}

:focus-visible {
  outline: 3px solid var(--wh-secondary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.wh-btn-accent {
  background-color: var(--wh-accent);
  border: 1px solid var(--wh-accent);
  color: var(--wh-on-accent);
  font-weight: 600;
}

.wh-btn-accent:hover, .wh-btn-accent:focus {
  background-color: var(--wh-accent-dark);
  border-color: var(--wh-accent-dark);
  color: var(--wh-on-accent);
}

.wh-btn-secondary {
  background-color: transparent;
  border: 1px solid var(--wh-secondary);
  color: var(--wh-secondary);
  font-weight: 600;
}

.wh-btn-secondary:hover, .wh-btn-secondary:focus {
  background-color: var(--wh-secondary);
  color: var(--wh-on-primary);
}

.wh-btn-on-primary {
  background-color: var(--wh-on-primary);
  border: 1px solid var(--wh-on-primary);
  color: var(--wh-primary-dark);
  font-weight: 600;
}

.wh-btn-on-primary:hover, .wh-btn-on-primary:focus {
  background-color: var(--wh-primary-tint);
  color: var(--wh-primary-dark);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.wh-navbar {
  background-color: var(--wh-nav-bg);
  border-bottom: 1px solid var(--wh-nav-border);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.wh-navbar .navbar-brand img {
  height: 52px;
  width: auto;
}

.wh-navbar .nav-link {
  color: var(--wh-text);
  font-weight: 600;
  font-size: 0.95rem;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.wh-navbar .nav-link:hover,
.wh-navbar .nav-link:focus {
  color: var(--wh-accent);
}

.wh-navbar .nav-link.active {
  color: var(--wh-accent);
}

.wh-navbar .dropdown-menu {
  background-color: var(--wh-surface);
  border: 1px solid var(--wh-border);
  border-radius: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.wh-navbar .dropdown-item {
  color: var(--wh-text);
  font-size: 0.95rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  white-space: normal;
}

.wh-navbar .dropdown-item:hover,
.wh-navbar .dropdown-item:focus {
  background-color: var(--wh-primary-tint);
  color: var(--wh-accent);
}

.wh-navbar .dropdown-item.active {
  background-color: var(--wh-primary-tint);
  color: var(--wh-accent);
}

/* Third-level menu (e.g. Spiritual Growth Opportunities). Bootstrap has no
   nested dropdowns, so: on desktop the sub-menu flies out to the right on
   hover or keyboard focus; in the collapsed mobile menu it is always shown,
   indented under its parent. */
.wh-submenu-toggle::after {
  content: "\203A";
  float: right;
  margin-left: 0.5rem;
  font-weight: 600;
}

.wh-submenu > .wh-submenu-menu {
  display: block;
  position: static;
  border: 0;
  box-shadow: none;
  padding: 0 0 0 1rem;
  margin: 0;
  background: transparent;
}

@media (min-width: 1200px) {
  .wh-submenu {
    position: relative;
  }

  .wh-submenu > .wh-submenu-menu {
    display: none;
    position: absolute;
    top: -0.5rem;
    left: 100%;
    min-width: 16rem;
    padding: 0.5rem 0;
    background-color: var(--wh-surface);
    border: 1px solid var(--wh-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  }

  .wh-submenu:hover > .wh-submenu-menu,
  .wh-submenu:focus-within > .wh-submenu-menu {
    display: block;
  }
}

@media (max-width: 1199.98px) {
  .wh-submenu-toggle::after {
    content: none;
  }
}

.wh-navbar .navbar-toggler {
  border-color: var(--wh-border);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.wh-hero-image {
  min-height: 480px;
  background-size: cover;
  background-position: center;
}

.wh-hero-band {
  min-height: 260px;
  background-color: var(--wh-primary);
}

.wh-hero-overlay {
  background: var(--wh-scrim);
}

.wh-hero-title {
  color: var(--wh-on-primary);
  font-size: clamp(1.9rem, 4vw, 3rem);
  max-width: 22ch;
  margin-inline: auto;
}

/* One sentence per line (heroTitleLines). The hero grows with the text,
   keeping the same space above and below it as the standard 480px hero. */
.wh-hero-lines { min-height: 0; }
.wh-hero-lines > .container { padding-block: clamp(4rem, 10vw, 8rem) !important; }
.wh-hero-lines .wh-hero-title { max-width: none; }

.wh-hero-band .wh-hero-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

.wh-hero-subtitle {
  color: var(--wh-on-primary);
  opacity: 0.92;
  max-width: 60ch;
  margin-inline: auto;
}

/* Home page tag line: 20% larger than the standard .lead size (1.25rem). */
.wh-hero-subtitle-home {
  font-size: 1.5rem;
}

/* --------------------------------------------------------------------------
   Sections and surfaces
   -------------------------------------------------------------------------- */

.wh-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.wh-section-alt {
  background-color: var(--wh-surface-alt);
}

.wh-section-tint {
  background-color: var(--wh-primary-tint);
}

.wh-band-primary {
  background-color: var(--wh-primary);
  color: var(--wh-on-primary);
}

.wh-band-primary h1, .wh-band-primary h2, .wh-band-primary h3 {
  color: var(--wh-on-primary);
}

.wh-band-primary a {
  color: var(--wh-on-primary);
}

/* .wh-lead sets its own colour, so restate it for text sitting on the band */
.wh-band-primary .wh-lead {
  color: var(--wh-on-primary);
}

/* .wh-band-primary a is more specific than .wh-btn-on-primary, so an anchor
   styled as a white button on the band would otherwise get white text too. */
.wh-band-primary a.wh-btn-on-primary {
  color: var(--wh-primary-dark);
}

.wh-band-primary a.wh-btn-on-primary:hover,
.wh-band-primary a.wh-btn-on-primary:focus {
  color: var(--wh-primary-dark);
}

.wh-eyebrow {
  font-family: var(--wh-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wh-secondary);
}

.wh-card {
  background-color: var(--wh-surface);
  border: 1px solid var(--wh-border);
  border-radius: 0.25rem;
  height: 100%;
}

.wh-card-feature {
  border-color: var(--wh-primary);
  border-top: 4px solid var(--wh-primary);
}

.wh-prose {
  max-width: 68ch;
}

.wh-prose h2 {
  margin-top: 2.5rem;
}

.wh-prose h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   Calendar embed
   -------------------------------------------------------------------------- */

.wh-calendar-embed {
  /* Fill the container — wider cells let Google fit more of each event title
     before it truncates. The embed is cross-origin, so its internal text
     wrapping cannot be styled from here; width is the only lever we have. */
  max-width: 100%;
  border: 1px solid var(--wh-border);
  border-radius: 0.25rem;
  overflow: hidden;
}

.wh-calendar-embed iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
}

@media (max-width: 767.98px) {
  .wh-calendar-embed iframe {
    height: 560px;
  }
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.wh-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--wh-text);
  --bs-table-border-color: var(--wh-border);
  margin-bottom: 1rem;
}

.wh-table th {
  font-family: var(--wh-font-heading);
  color: var(--wh-heading);
}

/* --------------------------------------------------------------------------
   Forms and modal
   -------------------------------------------------------------------------- */

.wh-modal {
  background-color: var(--wh-surface);
  color: var(--wh-text);
  border: none;
  border-top: 4px solid var(--wh-primary);
  border-radius: 0.25rem;
}

.wh-modal .modal-header {
  border-bottom: 1px solid var(--wh-border);
}

.form-label {
  font-weight: 600;
  color: var(--wh-heading);
}

.form-control:focus {
  border-color: var(--wh-primary);
  box-shadow: 0 0 0 0.2rem rgba(108, 146, 111, 0.25);
}

.wh-form-status-ok {
  color: var(--wh-secondary);
}

.wh-form-status-error {
  color: var(--wh-accent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.wh-footer {
  background-color: var(--wh-footer-bg);
  color: var(--wh-text);
  border-top: 4px solid var(--wh-primary);
  font-size: 0.95rem;
}

.wh-footer img {
  height: 45px;
  width: auto;
}

.wh-footer a {
  color: var(--wh-text);
  text-decoration: none;
}

.wh-footer a:hover, .wh-footer a:focus {
  color: var(--wh-accent);
  text-decoration: underline;
}

.wh-footer a.btn,
.wh-footer a.btn:hover,
.wh-footer a.btn:focus {
  color: var(--wh-on-accent);
  text-decoration: none;
}

.wh-footer-tagline {
  font-family: var(--wh-font-heading);
  color: var(--wh-primary-dark);
}

.wh-footer-heading {
  font-family: var(--wh-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wh-secondary);
  margin-bottom: 1rem;
}

.wh-footer-links {
  columns: 2;
  column-gap: 1.5rem;
}

.wh-footer-links li {
  break-inside: avoid;
  margin-bottom: 0.3rem;
}

.wh-footer-sublink {
  padding-left: 0.85rem;
  font-size: 0.9rem;
}

.wh-footer-subsublink {
  padding-left: 1.7rem;
}

.wh-footer-social a {
  font-size: 1.6875rem; /* 1.35rem + 25% */
  margin-right: 0.75rem;
  color: var(--wh-primary-dark);
}

.wh-footer-affiliations {
  border-top: 1px solid var(--wh-footer-rule);
  font-size: 0.85rem;
}

.wh-footer-rule {
  border-color: var(--wh-footer-rule);
  opacity: 1;
  margin-top: 2rem;
}

.wh-footer-copyright {
  font-size: 0.85rem;
  color: var(--wh-text-muted);
}

/* --------------------------------------------------------------------------
   Affiliation logos
   -------------------------------------------------------------------------- */

.wh-affiliation-logo {
  height: auto;
  max-width: 220px;
}

/* --------------------------------------------------------------------------
   Build-time placeholders — visible but unobtrusive until content lands
   -------------------------------------------------------------------------- */

.wh-build-pending {
  border: 1px dashed var(--wh-border);
  color: var(--wh-text-muted);
  padding: 3rem 1.5rem;
  text-align: center;
  font-family: var(--wh-font-body);
}

/* --------------------------------------------------------------------------
   Ministry tiles and affiliation plates
   -------------------------------------------------------------------------- */

.wh-tile-icon {
  color: var(--wh-primary);
  font-size: 1.75rem;
  line-height: 1;
  display: block;
}

.wh-logo-plate {
  background-color: var(--wh-surface);
  border-radius: 0.25rem;
  padding: 0.75rem 1.5rem;
  display: inline-flex;
  align-items: center;
}

.wh-signature {
  font-family: var(--wh-font-heading);
  color: var(--wh-primary-dark);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Staff directory and map
   -------------------------------------------------------------------------- */

/* Square frame so a portrait, or the 1920x800 build placeholder, both sit
   correctly in the staff grid without distorting. */
.wh-staff-photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  /* The width/height attributes on the img are there for CWV; height:auto
     lets aspect-ratio win so the frame stays square at any column width. */
  height: auto;
  max-width: 240px;
  object-fit: cover;
  border-radius: 0.25rem;
  background-color: var(--wh-surface-alt);
}

.wh-staff-entry + .wh-staff-entry {
  border-top: 1px solid var(--wh-border);
  margin-top: 2.5rem;
  padding-top: 2.5rem;
}

.wh-staff-role {
  font-family: var(--wh-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wh-secondary);
}

.wh-contact-line {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.wh-contact-line i {
  color: var(--wh-primary);
}

.wh-map-frame {
  border: 1px solid var(--wh-border);
  border-radius: 0.25rem;
  width: 100%;
  height: 420px;
  display: block;
}

/* Uniform card-top images (facility grid on the space-sharing page) */
.wh-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 1px solid var(--wh-border);
  display: block;
}

/* Figures — content images inside prose sections */
.wh-figure {
  margin: 2rem 0;
}

.wh-figure img {
  border: 1px solid var(--wh-border);
}

.wh-caption {
  color: var(--wh-text-muted);
  line-height: 1.5;
}

/* Calendar view toggle */
.wh-btn-view {
  border: 1px solid var(--wh-border);
  background: var(--wh-surface);
  color: var(--wh-text);
  padding: 0.35rem 0.9rem;
  font-size: 0.925rem;
}

.wh-btn-view:hover {
  background: var(--wh-primary-tint);
  color: var(--wh-heading);
}

.wh-btn-view.active,
.wh-btn-view.active:hover {
  background: var(--wh-primary);
  border-color: var(--wh-primary);
  color: var(--wh-on-primary);
}

.wh-btn-view:focus-visible {
  outline: 2px solid var(--wh-secondary);
  outline-offset: 2px;
}

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.wh-hp {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Bulletin archive */
.wh-archive-year {
  border: 1px solid var(--wh-border);
  border-radius: 0.25rem;
  background: var(--wh-surface);
}

.wh-archive-summary {
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  color: var(--wh-heading);
}

.wh-archive-list {
  list-style: none;
  margin: 0;
  padding: 0 1.1rem 1rem;
}

.wh-archive-item {
  padding: 0.5rem 0;
  border-top: 1px solid var(--wh-border);
}

.wh-archive-children {
  list-style: none;
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.925rem;
}

.wh-archive-children li { padding: 0.15rem 0; }

/* Responsive video embed */
.wh-video {
  max-width: 880px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--wh-border);
  border-radius: 0.25rem;
  overflow: hidden;
}

.wh-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Sermon thumbnail cards */
.wh-sermon-card {
  display: block;
  text-decoration: none;
  color: var(--wh-text);
}

.wh-sermon-card img {
  border: 1px solid var(--wh-border);
}

.wh-sermon-date {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--wh-text-muted);
}

.wh-sermon-card:hover .wh-sermon-date { color: var(--wh-accent); }

.wh-sermon-card-static {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 320 / 180;
  margin: 0 auto;
  background: var(--wh-surface);
  border: 1px dashed var(--wh-border);
  border-radius: 0.375rem;
}

/* Space Sharing: per-room photo galleries and lightbox */
.ss-room { scroll-margin-top: 7rem; }
#access,
#reserve { scroll-margin-top: 5.5rem; }

.ss-room + .ss-room {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--wh-border);
}

.ss-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.ss-gallery-1 .ss-tile,
.ss-gallery-3 .ss-tile:first-child { grid-column: 1 / -1; }

@media (min-width: 768px) {
  .ss-gallery { grid-template-columns: repeat(3, 1fr); }
  .ss-gallery-2 { grid-template-columns: repeat(2, 1fr); }
  .ss-gallery-many { grid-template-columns: repeat(4, 1fr); }
  .ss-gallery-1 .ss-tile { grid-column: span 2; }
  .ss-gallery-3 .ss-tile:first-child { grid-column: auto; }
}

.ss-tile {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: none;
  overflow: hidden;
  cursor: zoom-in;
}

.ss-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.ss-gallery-1 .ss-tile img { aspect-ratio: 16 / 9; }

.ss-tile:hover img { transform: scale(1.04); }

.ss-tile:focus-visible {
  outline: 3px solid var(--wh-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ss-tile img { transition: none; }
  .ss-tile:hover img { transform: none; }
}

.ss-lightbox .modal-content {
  background-color: #1a1a1a;
  color: #f2f2f2;
  border: 0;
}

.ss-lightbox .modal-header { border-bottom: 0; }
.ss-lightbox .btn-close { margin-left: auto; }
.ss-lightbox-count { color: #bdbdbd; }

.ss-lightbox .modal-body {
  position: relative;
  padding: 0 1rem;
  text-align: center;
}

.ss-lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.ss-lightbox-caption {
  padding: 0.75rem 1rem 1rem;
  color: #d6d6d6;
  text-align: center;
}

.ss-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.25rem;
}

.ss-lightbox-nav:hover,
.ss-lightbox-nav:focus-visible { background: rgba(0, 0, 0, 0.8); }
.ss-prev { left: 1.25rem; }
.ss-next { right: 1.25rem; }

/* Feeding Our Faith schedule */
.wh-fof-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wh-fof-item {
  padding: 1.1rem 0;
  border-top: 1px solid var(--wh-border);
}

.wh-fof-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.wh-fof-list-archive {
  padding: 0 1.1rem 0.5rem;
}

.wh-fof-list-archive .wh-fof-item:first-child {
  border-top: 1px solid var(--wh-border);
  padding-top: 1.1rem;
}

.wh-fof-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wh-secondary);
}

.wh-fof-presenter {
  font-style: italic;
  color: var(--wh-text-muted);
}

.wh-fof-item-off h3,
.wh-fof-item-off h4 {
  color: var(--wh-text-muted);
  font-style: italic;
}

.wh-prose .wh-fof-item h3 {
  margin-top: 0;
}

/* Farmers' market: dates card */
.wh-market-dates li {
  padding: 0.4rem 0;
  border-top: 1px solid var(--wh-border);
  font-size: 1.05rem;
}

.wh-market-dates li:first-child {
  border-top: 0;
  padding-top: 0;
}

.wh-market-dates .wh-eyebrow {
  display: inline-block;
  min-width: 6.5rem;
  margin: 0;
}
