/* Worship page - modern design.
   Loaded only when $worshipStyle = 'modern' in pages/worship.php (set it to 'classic' to revert). */

/* ---------- hero ---------- */
.wm-hero {
  position: relative;
  padding: 7.5rem 1.5rem 4.5rem;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(155deg, #16322e 0%, #234e48 50%, #2f6a61 100%);
  isolation: isolate;
}
.wm-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.wm-orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.wm-orb-1 { width: 380px; height: 380px; top: -140px; left: -100px; background: #7c5cbf; opacity: .3; }
.wm-orb-2 { width: 380px; height: 380px; bottom: -160px; right: -100px; background: #ff7a52; opacity: .24; }
.wm-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 35%, #000 0%, transparent 70%);
}
.wm-hero-inner { max-width: 760px; margin: 0 auto; animation: wm-up .7s ease-out both; }

.wm-chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem .95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffd9c9;
}
.wm-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #f57450; animation: wm-pulse 2s ease-in-out infinite; }

.wm-hero-title { margin: 1rem 0 .7rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: clamp(3rem, 9vw, 5.6rem); font-weight: 700; line-height: 1; }
.wm-hero-title em {
  font-style: italic;
  display: inline-block;
  padding: 0 .08em .12em 0;
  background: linear-gradient(90deg, #ff8f6b, #ffd0a8 55%, #c9b6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wm-hero-sub { margin: 0 auto 1.6rem; max-width: 560px; font-size: clamp(1.02rem, 2.4vw, 1.25rem); line-height: 1.6; color: rgba(255, 255, 255, .85); }

.wm-hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.wm-hpill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.wm-hpill i { color: #ffb199; }
.wm-hpill:hover, .wm-hpill:focus-visible { transform: translateY(-2px); background: rgba(255, 255, 255, .2); color: #fff; outline: none; }

/* ---------- main ---------- */
.wm-main {
  padding: 0 1.25rem 4.5rem;
  background: #f5f7f2;
  background-image: radial-gradient(rgba(35, 78, 72, .05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.wm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  top: -2.2rem; /* cards overlap the hero edge */
  margin-bottom: 0;
}

.wm-card {
  --a: #f57450;
  --b: #ffb08a;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e4eae1;
  box-shadow: 0 14px 36px rgba(35, 78, 72, .12);
  overflow: hidden;
  scroll-margin-top: 90px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.wm-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(35, 78, 72, .2); }
.wm-sunrise { --a: #f57450; --b: #ffb26b; }
.wm-forest { --a: #1f5a50; --b: #3fb7a3; }
.wm-violet { --a: #6d44d6; --b: #b79cff; }

.wm-card-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 150px;
  background: linear-gradient(135deg, var(--a), var(--b));
  overflow: hidden;
}
.wm-art-shape { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.wm-art-shape-1 { width: 170px; height: 170px; top: -70px; right: -40px; }
.wm-art-shape-2 { width: 110px; height: 110px; bottom: -50px; left: -20px; background: rgba(255, 255, 255, .12); }
.wm-art-icon {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  transition: transform .3s ease;
}
.wm-card:hover .wm-art-icon { transform: rotate(-6deg) scale(1.08); }
.wm-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, .25);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wm-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.5rem 1.6rem; }
.wm-card-body h2 { margin: 0 0 .5rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: 1.5rem; font-weight: 700; color: #1c3b36; }
.wm-card-body p { margin: 0 0 1rem; font-size: .96rem; line-height: 1.65; color: #55655f; }
.wm-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.3rem; flex: 1; align-content: flex-start; }
.wm-pills span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: #eef2ee;
  color: #234e48;
  font-size: .78rem;
  font-weight: 600;
}
.wm-pills i { color: var(--a); }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .wm-pills span { background: color-mix(in srgb, var(--a) 11%, white); }
}

.wm-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wm-btn:hover, .wm-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, .28); color: #fff; outline: none; }
.wm-arrow { font-size: .72rem; transition: transform .2s ease; }
.wm-btn:hover .wm-arrow { transform: translateX(4px); }

/* ---------- live strip ---------- */
.wm-live {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.9rem 2rem;
  border-radius: 26px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #16322e 0%, #234e48 55%, #2b3f6b 120%);
  box-shadow: 0 22px 50px rgba(22, 50, 46, .35);
  scroll-margin-top: 90px;
  isolation: isolate;
}
.wm-live-glow { position: absolute; z-index: -1; width: 340px; height: 340px; border-radius: 50%; right: -90px; top: -120px; background: #f57450; opacity: .3; filter: blur(80px); }
.wm-live-icon {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(135deg, #ef4b5b, #d62839);
  font-size: 2.1rem;
  box-shadow: 0 14px 30px rgba(214, 40, 57, .45);
}
.wm-live-text { flex: 1; min-width: 0; }
.wm-live-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .28rem .8rem;
  border-radius: 999px;
  background: rgba(239, 75, 91, .22);
  border: 1px solid rgba(239, 75, 91, .6);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffd2d6;
}
.wm-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4b5b; animation: wm-pulse 1.4s ease-in-out infinite; }
.wm-live-text h3 { margin: .7rem 0 .35rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: 1.7rem; color: #fff; }
.wm-live-text p { margin: 0; color: rgba(255, 255, 255, .82); line-height: 1.55; }
.wm-live-text strong { color: #fff; }
.wm-live-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.wm-live-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.3rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.wm-live-btn:hover, .wm-live-btn:focus-visible { transform: translateY(-2px); outline: none; }
.wm-live-btn-primary { background: linear-gradient(135deg, #f57450, #e8431e); color: #fff; box-shadow: 0 8px 20px rgba(245, 116, 80, .4); }
.wm-live-btn-primary:hover { color: #fff; }
.wm-live-btn-glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); color: #fff; }
.wm-live-btn-glass:hover { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- verse ---------- */
.wm-verse { position: relative; max-width: 760px; margin: 3.4rem auto 0; padding: 0 1rem; text-align: center; }
.wm-quote-mark { display: block; height: 3.2rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: 7rem; line-height: 1; color: #f57450; opacity: .35; }
.wm-verse blockquote { margin: 0 0 .8rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: clamp(1.4rem, 3.4vw, 2.1rem); font-style: italic; line-height: 1.4; color: #1c3b36; }
.wm-verse figcaption { font-size: .95rem; font-weight: 700; letter-spacing: .08em; color: #f57450; }

/* ---------- dark theme ---------- */
html[data-theme="dark"] .wm-main { background: #121c1a; background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 28px 28px; }
html[data-theme="dark"] .wm-card { background: #1a2623; border-color: rgba(255, 255, 255, .1); box-shadow: 0 14px 36px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .wm-card-body h2 { color: #f1f6f3; }
html[data-theme="dark"] .wm-card-body p { color: #aebdb6; }
html[data-theme="dark"] .wm-pills span { background: rgba(255, 255, 255, .08); color: #e6eee9; }
html[data-theme="dark"] .wm-verse blockquote { color: #eaf2ee; }

/* ---------- animation ---------- */
@keyframes wm-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wm-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .5; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .wm-grid { grid-template-columns: 1fr; max-width: 520px; top: -1.8rem; }
  .wm-live { flex-direction: column; align-items: flex-start; padding: 1.6rem 1.4rem; }
  .wm-live-actions { width: 100%; }
  .wm-live-btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 520px) {
  .wm-hero { padding: 6.8rem 1.25rem 4rem; }
  .wm-main { padding: 0 1rem 3.2rem; }
  .wm-card-art { height: 130px; }
  .wm-live-btn { flex: 1 1 100%; }
  .wm-live-text h3 { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wm-hero-inner, .wm-chip-dot, .wm-live-dot { animation: none !important; }
  .wm-card, .wm-art-icon, .wm-btn, .wm-hpill, .wm-live-btn { transition: none !important; }
}
