/* ═════════════════════════════════════════════════════════════════════
   PLATFORM (Nov 2026): header search, search results, footer signup.
   Loaded after style.css. Same vocabulary as the rest of the site: navy
   dropdown surface for the nav panel (it is a fixed overlay, like the
   dropdowns), glass plaques for in-flow surfaces, no transitions on the
   fixed chrome (compositor rule), sentence case labels.
═════════════════════════════════════════════════════════════════════ */

/* ── Header search ─────────────────────────────────────────────── */
.nav-links { margin-left: auto; }
.nav-search { position: relative; flex-shrink: 0; margin-left: 18px; }
.nav-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: rgba(245, 242, 238, 0.82);
  transition: color 0.2s, background 0.2s;
}
.nav-search-toggle:hover,
.nav-search-toggle[aria-expanded="true"] { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.nav-search-panel {
  position: absolute;
  top: calc(100% + 17px);
  right: 0;
  width: min(380px, calc(100vw - 48px));
  padding: 10px;
  background: color-mix(in srgb, var(--navy) 98%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 200;
}
.nav-search-panel[hidden] { display: none; }
@media (max-width: 1280px) { .nav-search { margin-left: 12px; } }
@media (max-width: 1150px) { .nav-search { display: none; } }

/* ── The search form (nav panel, drawer, results page) ─────────── */
.mscc-search-form { display: flex; gap: 8px; align-items: stretch; width: 100%; }
.mscc-search-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  font: inherit;
  font-size: 1rem; /* 16px: iOS zooms into anything smaller */
}
.mscc-search-input::placeholder { color: rgba(245, 242, 238, 0.7); }
.mscc-search-input:focus { border-color: var(--teal); background: rgba(255, 255, 255, 0.1); }
.mscc-search-input::-webkit-search-cancel-button { filter: invert(1) opacity(0.6); }
.mscc-search-submit {
  flex-shrink: 0;
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: var(--teal);
  color: var(--navy);
  cursor: pointer;
  transition: background 0.2s;
}
.mscc-search-submit:hover { background: color-mix(in srgb, var(--teal) 85%, white); }

/* In the phone drawer it sits above the menu. */
.nav-mobile .mscc-search-form { margin-bottom: 10px; }
.nav-mobile .mscc-search-submit { width: 48px; }

/* ── Results page ──────────────────────────────────────────────── */
.search-banner .page-title { overflow-wrap: anywhere; }
.search-section { background: transparent; padding: clamp(32px, 4vw, 56px) var(--gutter, 48px) var(--section-y, 88px); }
.search-inner { max-width: 820px; margin: 0 auto; }
.mscc-search-form.is-page { margin-bottom: 28px; }
.mscc-search-form.is-page .mscc-search-input { padding: 14px 16px; font-size: 1.0625rem; }
.mscc-search-form.is-page .mscc-search-submit { width: 54px; }

.search-results { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.search-result {
  display: block;
  padding: 22px 26px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-highlight), 0 8px 28px rgba(4, 9, 15, 0.22);
  color: inherit;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.search-result:hover { background: var(--glass-bg-strong); border-color: rgba(255, 255, 255, 0.2); }
.search-result-type {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 4px;
}
.search-result-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
  text-wrap: balance;
}
.search-result:hover .search-result-title { color: var(--teal); }
.search-result-snippet {
  margin-top: 8px;
  font-size: var(--fs-meta, 0.9375rem);
  line-height: 1.6;
  color: var(--text-body, rgba(245, 242, 238, 0.82));
}
.search-result-snippet mark {
  background: color-mix(in srgb, var(--teal) 26%, transparent);
  color: var(--white);
  border-radius: 6px;
  padding: 0 3px;
}
.search-result.is-video { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; }
.search-result-thumb { width: 160px; height: 90px; object-fit: cover; border-radius: 6px; }
@media (max-width: 640px) {
  .search-result { padding: 18px 18px; }
  .search-result.is-video { grid-template-columns: 104px 1fr; gap: 14px; }
  .search-result-thumb { width: 104px; height: 58px; }
}

.search-pagination { margin-top: 28px; }
.search-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.search-pagination a, .search-pagination span {
  display: inline-block; padding: 8px 14px; border-radius: 6px;
  border: 1px solid var(--glass-line); color: var(--white); text-decoration: none;
}
.search-pagination .current { background: var(--teal); color: var(--navy); border-color: var(--teal); }

.search-empty {
  padding: 32px 36px;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-highlight), 0 8px 28px rgba(4, 9, 15, 0.25);
}
.search-empty-lead { font-size: var(--fs-body, 1.0625rem); line-height: 1.6; color: var(--text-body, rgba(245, 242, 238, 0.82)); margin-bottom: 18px; }
.search-empty-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.search-empty-links a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 242, 238, 0.92);
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.search-empty-links a:hover { border-color: var(--teal); color: var(--teal); }
@media (max-width: 640px) { .search-empty { padding: 24px 20px; } }

/* ── Footer newsletter ─────────────────────────────────────────── */
.footer-newsletter {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) 1.6fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 44px;
  padding: 28px 32px;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-highlight), 0 8px 28px rgba(4, 9, 15, 0.22);
}
.footer-newsletter-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: 6px;
}
.footer-newsletter-copy p { font-size: 0.875rem; line-height: 1.6; color: rgba(245, 242, 238, 0.82); }
.mscc-nl-fields { display: flex; gap: 12px; align-items: flex-end; }
.mscc-nl-field { display: block; flex: 1 1 0; min-width: 0; }
.mscc-nl-field:first-child { flex-grow: 0.75; }
.mscc-nl-label { display: block; font-size: 0.8125rem; font-weight: 500; color: rgba(245, 242, 238, 0.82); margin-bottom: 6px; }
.mscc-nl-opt { color: rgba(245, 242, 238, 0.7); font-weight: 400; }
.mscc-nl-field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  font: inherit;
  font-size: 1rem;
}
.mscc-nl-field input:focus { border-color: var(--teal); background: rgba(255, 255, 255, 0.1); }
.mscc-nl-field input[aria-invalid="true"] { border-color: #f0a58f; }
.mscc-nl-submit { flex-shrink: 0; padding: 12px 22px; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.mscc-nl-submit[disabled] { opacity: 0.7; cursor: progress; }
.mscc-nl-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(245, 242, 238, 0.82);
  cursor: pointer;
}
.mscc-nl-consent input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--teal); cursor: pointer; }
.mscc-nl-consent a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.mscc-nl-status { margin-top: 10px; font-size: 0.875rem; color: rgba(245, 242, 238, 0.92); }
.mscc-nl-status.is-error { color: #f6b9a8; }
.footer-newsletter-done { font-size: 0.95rem; color: rgba(245, 242, 238, 0.92); }

@media (max-width: 960px) {
  .footer-newsletter { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 640px) {
  .footer-newsletter { padding: 22px 18px; margin-bottom: 32px; }
  .mscc-nl-fields { flex-direction: column; align-items: stretch; }
  .mscc-nl-field:first-child { flex-grow: 1; }
  .mscc-nl-submit { width: 100%; }
}

/* ── Skip link: off screen until focused (first Tab on any page) ── */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--teal);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.footer-bottom a[href^="tel:"] { white-space: nowrap; }

/* ── A11y: photo banner titles. The teal accent measured under 3:1 over
   bright photos (Plan a Visit, Contact). Same soft halo the pastor name
   overlay already uses, so nothing new in the visual vocabulary. ── */
.page-banner.has-image .page-title { text-shadow: 0 1px 12px rgba(4, 9, 15, 0.55); }
/* Pastor name over the photo (homepage layout): the halo the panel layout already has. */
.pastor-name-overlay { text-shadow: 0 1px 12px rgba(4, 9, 15, 0.55); }
