/* HKM Core — shared styles for nav, footer, and global tweaks */

:root {
  --hkm-bg: #1f0f1f;
  --hkm-bg-deep: #14091a;
  --hkm-cream: #fffaf1;
  --hkm-gold: #c8a45a;
  --hkm-gold-soft: #e7c98c;
  --hkm-text: #fffaf1;
  --hkm-muted: #cfc1c8;
  --hkm-shell-pad: clamp(20px, 4vw, 56px);
}

/* ---------- Nav (rendered by HKM\Render\Nav) ---------- */

.hkm-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--hkm-shell-pad);
  position: relative;
  z-index: 4;
}

.hkm-nav-brand img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}

.hkm-nav-links {
  display: flex;
  gap: clamp(14px, 2.4vw, 30px);
  flex-wrap: wrap;
  align-items: center;
}

.hkm-nav-links a {
  color: var(--hkm-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.hkm-nav-links a:hover,
.hkm-nav-links a:focus {
  opacity: 1;
}

.hkm-nav-links a[aria-current="page"] {
  opacity: 1;
  color: var(--hkm-gold-soft);
}

.hkm-nav--compact .hkm-nav-links {
  gap: 14px;
  font-size: 13.5px;
}

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

.hkm-footer {
  background: linear-gradient(180deg, var(--hkm-bg) 0%, var(--hkm-bg-deep) 100%);
  color: var(--hkm-text);
  margin-top: 0;
  padding: clamp(36px, 6vw, 72px) var(--hkm-shell-pad) 24px;
  border-top: 1px solid rgba(200, 164, 90, 0.18);
}

.hkm-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  max-width: 1240px;
  margin: 0 auto;
  align-items: start;
}

.hkm-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 320px;
}

.hkm-footer-mark img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}

.hkm-footer-tagline {
  font-family: 'Literata', Georgia, serif;
  font-size: 17px;
  line-height: 1.4;
  color: var(--hkm-cream);
  opacity: 0.9;
  margin: 0;
}

.hkm-footer-block h3 {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hkm-gold-soft);
  font-weight: 600;
  margin: 0 0 10px;
}

.hkm-footer-block p {
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 6px;
  color: var(--hkm-text);
  opacity: 0.92;
}

.hkm-footer-strong {
  font-family: 'Literata', Georgia, serif;
  font-size: 22px !important;
  letter-spacing: 0.005em;
  margin-bottom: 8px !important;
  opacity: 1 !important;
}

.hkm-footer-block a {
  color: var(--hkm-cream);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 250, 241, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hkm-footer-block a:hover,
.hkm-footer-block a:focus {
  color: var(--hkm-gold-soft);
  border-bottom-color: var(--hkm-gold-soft);
}

.hkm-lang-switcher select {
  background: rgba(255, 250, 241, 0.06);
  color: var(--hkm-cream);
  border: 1px solid rgba(255, 250, 241, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.hkm-lang-switcher select:focus {
  outline: 2px solid var(--hkm-gold-soft);
  outline-offset: 2px;
}

.hkm-footer-bottom {
  max-width: 1240px;
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 250, 241, 0.08);
  text-align: center;
}

.hkm-footer-bottom small {
  color: var(--hkm-muted);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

@media (max-width: 880px) {
  .hkm-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .hkm-footer-inner {
    grid-template-columns: 1fr;
  }
  .hkm-footer-brand { max-width: none; }
}

/* ---------- Language switcher (floating, top-right) ---------- */

.hkm-lang-strip {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1000;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(20, 9, 26, 0.78);
  border: 1px solid rgba(200, 164, 90, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.hkm-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 999px;
  color: var(--hkm-cream);
  text-decoration: none;
  opacity: 0.7;
  transition: background 0.15s ease, opacity 0.15s ease, color 0.15s ease;
}

.hkm-lang-pill:hover,
.hkm-lang-pill:focus {
  opacity: 1;
  background: rgba(255, 250, 241, 0.06);
}

.hkm-lang-pill.is-active {
  background: var(--hkm-gold-soft);
  color: var(--hkm-bg-deep);
  opacity: 1;
}

@media (max-width: 720px) {
  .hkm-lang-strip {
    top: 8px;
    right: 8px;
    padding: 3px;
  }
  .hkm-lang-pill {
    min-width: 30px;
    padding: 3px 7px;
    font-size: 10.5px;
  }
}

/* ---------- About: languages + connect (additions) ---------- */

.hkm-about-languages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  padding: clamp(36px, 5vw, 64px) clamp(28px, 5vw, 72px);
  margin: 0;
  background: linear-gradient(180deg, #271732 0%, #14091a 100%);
  border-top: 1px solid rgba(200, 164, 90, 0.22);
  color: var(--hkm-cream);
}

.hkm-standard-page .hkm-about-languages h2,
.hkm-standard-page.hkm-standard-about .hkm-about-languages h2 {
  font-family: 'Literata', Georgia, serif !important;
  font-size: clamp(22px, 2.4vw, 30px) !important;
  line-height: 1.18 !important;
  margin: 8px 0 12px !important;
  color: var(--hkm-cream) !important;
  opacity: 1 !important;
  letter-spacing: 0 !important;
}

.hkm-about-languages .hkm-standard-pill {
  background: rgba(231, 201, 140, 0.18);
  color: var(--hkm-gold-soft) !important;
  border: 1px solid rgba(231, 201, 140, 0.35);
  opacity: 1 !important;
}

.hkm-about-languages p {
  color: var(--hkm-text);
  opacity: 0.9;
  line-height: 1.55;
  margin: 0;
}

.hkm-about-language-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.hkm-about-language-list li {
  background: rgba(255, 250, 241, 0.07);
  border: 1px solid rgba(255, 250, 241, 0.12);
  border-radius: 14px;
  padding: 14px 18px;
  display: grid;
  gap: 4px;
}

.hkm-about-language-list strong {
  font-family: 'Literata', Georgia, serif;
  font-size: 18px;
  color: var(--hkm-gold-soft);
}

.hkm-about-language-list span {
  color: var(--hkm-text);
  opacity: 0.88;
  font-size: 14px;
}

.hkm-about-connect {
  text-align: center;
  padding: clamp(36px, 5vw, 64px) clamp(20px, 4vw, 48px);
  margin: 0;
  background: var(--hkm-bg-deep);
  color: var(--hkm-cream);
  border-top: 1px solid rgba(200, 164, 90, 0.18);
}

.hkm-about-connect .hkm-standard-button-secondary,
.hkm-about-connect a.hkm-standard-button-secondary {
  background: transparent;
  color: var(--hkm-cream) !important;
  border: 1px solid rgba(255, 250, 241, 0.35);
}

.hkm-about-connect .hkm-standard-button-secondary:hover,
.hkm-about-connect a.hkm-standard-button-secondary:hover {
  background: rgba(255, 250, 241, 0.06);
  border-color: var(--hkm-gold-soft);
}

.hkm-standard-page .hkm-about-connect h2,
.hkm-standard-page.hkm-standard-about .hkm-about-connect h2 {
  font-family: 'Literata', Georgia, serif !important;
  font-size: clamp(24px, 2.6vw, 34px) !important;
  line-height: 1.15 !important;
  margin: 0 0 18px !important;
  color: var(--hkm-cream) !important;
  opacity: 1 !important;
  letter-spacing: 0 !important;
}

.hkm-about-connect-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 720px) {
  .hkm-about-languages {
    grid-template-columns: 1fr;
  }
}

/* ---------- Events ---------- */

.hkm-home-events {
  padding: clamp(36px, 4vw, 56px) clamp(20px, 4vw, 56px);
}

.hkm-home-events-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.hkm-home-events-head h2 {
  font-family: 'Literata', Georgia, serif;
  font-size: clamp(24px, 2.6vw, 36px);
  margin: 8px 0 0;
  color: var(--hkm-cream);
  grid-column: 1;
}

.hkm-home-events-head .hkm-home-pill {
  grid-column: 1;
  grid-row: 1;
}

.hkm-home-events-all {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  color: var(--hkm-gold-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.hkm-home-events-all:hover { color: var(--hkm-cream); }

.hkm-home-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.hkm-home-events-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: rgba(255, 250, 241, 0.05);
  border: 1px solid rgba(200, 164, 90, 0.22);
  border-radius: 18px;
  text-decoration: none;
  color: var(--hkm-cream);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.hkm-home-events-card:hover {
  background: rgba(255, 250, 241, 0.09);
  border-color: var(--hkm-gold-soft);
  transform: translateY(-1px);
}

.hkm-home-events-date strong {
  display: block;
  font-family: 'Literata', Georgia, serif;
  font-size: 18px;
  color: var(--hkm-gold-soft);
}

.hkm-home-events-date small {
  font-size: 12px;
  opacity: 0.78;
}

.hkm-home-events-title {
  font-family: 'Literata', Georgia, serif;
  font-size: 17px;
  line-height: 1.25;
  color: var(--hkm-cream);
}

.hkm-home-events-desc {
  font-size: 13.5px;
  line-height: 1.45;
  opacity: 0.85;
}

/* /events/ page */

.hkm-events-hero {
  padding: clamp(36px, 5vw, 72px) clamp(20px, 4vw, 56px) 24px;
}

.hkm-events-hero h1 {
  font-family: 'Literata', Georgia, serif;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.05;
  color: var(--hkm-cream);
  margin: 8px 0 12px;
  padding-bottom: 0.08em;
}

.hkm-events-hero p {
  color: var(--hkm-text);
  opacity: 0.85;
  max-width: 680px;
  font-size: 16px;
  line-height: 1.5;
}

.hkm-events-empty {
  text-align: center;
  padding: 48px 20px 96px;
  color: var(--hkm-text);
}

.hkm-events-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 clamp(20px, 4vw, 56px) 56px;
  max-width: 880px;
}

.hkm-events-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 22px 24px;
  background: rgba(255, 250, 241, 0.95);
  color: #2a1a30;
  border-radius: 20px;
  border: 1px solid rgba(200, 164, 90, 0.32);
}

.hkm-events-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(31, 15, 31, 0.06);
  border-radius: 14px;
  padding: 10px 8px;
  align-self: start;
}

.hkm-events-month {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6a32;
  font-weight: 600;
}

.hkm-events-day {
  font-family: 'Literata', Georgia, serif;
  font-size: 30px;
  line-height: 1;
  color: #2a1a30;
  margin: 4px 0 2px;
}

.hkm-events-weekday {
  font-size: 11px;
  color: #5a4358;
}

.hkm-events-body h2 {
  font-family: 'Literata', Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 6px;
  color: #2a1a30 !important;
}

.hkm-events-time {
  font-size: 14px;
  color: #6a4f1c;
  font-weight: 500;
  margin: 0 0 10px;
}

.hkm-events-desc,
.hkm-events-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: #3a2a40;
  margin: 0 0 8px;
}

.hkm-events-link {
  font-size: 13.5px;
  color: #8a6a32;
  font-weight: 500;
  text-decoration: none;
}

.hkm-events-link:hover { color: #2a1a30; }

@media (max-width: 540px) {
  .hkm-events-item {
    grid-template-columns: 1fr;
  }
  .hkm-events-date {
    flex-direction: row;
    gap: 8px;
    width: max-content;
  }
}

/* ---------- Per-field form errors ---------- */

.hkm-field-error {
  color: #b94a73;
  background: rgba(185, 74, 115, 0.10);
  border: 1px solid rgba(185, 74, 115, 0.32);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 6px 0 14px;
  font-size: 13.5px;
  line-height: 1.4;
  list-style: disc inside;
}

.hkm-field-error.hkm-field-error[role="alert"] {
  /* nothing extra - rule above is fine */
}

ul.hkm-field-error {
  padding-left: 28px;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: rgba(185, 74, 115, 0.6) !important;
  outline-color: rgba(185, 74, 115, 0.6) !important;
}

.hkm-member-auth-error {
  color: #b94a73 !important;
  background: rgba(185, 74, 115, 0.12);
  border: 1px solid rgba(185, 74, 115, 0.32);
  border-radius: 12px;
  padding: 12px 16px;
}

.hkm-member-auth-success {
  color: #2c8a4f !important;
  background: rgba(44, 138, 79, 0.12);
  border: 1px solid rgba(44, 138, 79, 0.34);
  border-radius: 12px;
  padding: 12px 16px;
}

/* ---------- Global tweaks ---------- */

/* Headline descender clipping fix on big H1s */
.hkm-home-hero h1,
.hkm-standard-hero h1,
.hkm-community-hero h1 {
  padding-bottom: 0.08em;
  line-height: 1.05;
}

/* Home hero "Watch Live" floating CTA — pin to its section */
.hkm-home-live-panel {
  position: relative;
}
.hkm-home-live-panel .hkm-home-button {
  position: static;
}

/* Live page: hide chat input form when stream is offline */
body.hkm-live-offline .hkm-chat-form,
body.hkm-live-offline .hkm-prayer-callout,
body.hkm-live-offline .hkm-prayer-toggle {
  display: none !important;
}
body.hkm-live-offline .hkm-chat-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--hkm-muted);
  font-size: 14px;
  line-height: 1.5;
}
body.hkm-live-offline .hkm-chat-empty::before {
  content: "Live chat opens with the next service.";
  display: block;
  color: var(--hkm-cream);
  margin-bottom: 6px;
  font-size: 14.5px;
  font-weight: 500;
}
