/* Ministries page - modern design.
   Loaded only when $ministriesStyle = 'modern' in pages/ministries.php (set it to 'classic' to revert). */

/* ---------- hero ---------- */
.mm-hero {
  position: relative;
  padding: 7.5rem 1.5rem 3.2rem;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(155deg, #16322e 0%, #234e48 50%, #2f6a61 100%);
  isolation: isolate;
}
.mm-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.mm-orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.mm-orb-1 { width: 380px; height: 380px; top: -140px; right: -110px; background: #ff7a52; opacity: .22; }
.mm-orb-2 { width: 340px; height: 340px; bottom: -150px; left: -100px; background: #3fb7a3; opacity: .26; }
.mm-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% 30%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
}

.mm-hero-inner { max-width: 760px; margin: 0 auto; animation: mm-up .7s ease-out both; }

.mm-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;
}
.mm-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #f57450; animation: mm-pulse 2s ease-in-out infinite; }

.mm-hero-title {
  margin: 1rem 0 .6rem;
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(2.5rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
}
.mm-hero-title em,
.mm-cta h2 em {
  font-style: italic;
  display: inline-block;
  padding: 0 .06em .12em 0;
  background: linear-gradient(90deg, #ff8f6b, #ffd0a8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mm-hero-sub { margin: 0 0 1rem; font-size: clamp(1.05rem, 2.4vw, 1.3rem); font-weight: 600; color: rgba(255, 255, 255, .92); }
.mm-hero-text { margin: 0 auto; max-width: 620px; font-size: 1.02rem; line-height: 1.75; color: rgba(255, 255, 255, .75); }

/* ---------- sticky quick-jump pills ---------- */
.mm-nav {
  position: sticky;
  top: var(--announce-h, 44px);
  z-index: 900;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(35, 78, 72, .1);
  box-shadow: 0 6px 20px rgba(35, 78, 72, .08);
}
.mm-nav-inner {
  display: flex;
  gap: .6rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: .75rem 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: center;
}
.mm-nav-inner::-webkit-scrollbar { display: none; }

.mm-pill {
  --accent: #f57450;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.05rem;
  border-radius: 999px;
  border: 1.5px solid rgba(35, 78, 72, .16);
  background: #fff;
  color: #234e48;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.mm-pill i { color: var(--accent); transition: color .2s ease; }
.mm-pill:hover,
.mm-pill:focus-visible { transform: translateY(-2px); border-color: var(--accent); outline: none; }
.mm-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.mm-pill.active i { color: #fff; }

/* ---------- cards ---------- */
.mm-section {
  padding: 3rem 1.25rem 4rem;
  background: #f5f7f2;
  background-image: radial-gradient(rgba(35, 78, 72, .05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.mm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  max-width: 1180px;
  margin: 0 auto;
}

.mm-card {
  --accent: #f57450;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.7rem 1.6rem 1.6rem;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e4eae1;
  box-shadow: 0 10px 30px rgba(35, 78, 72, .08);
  overflow: hidden;
  scroll-margin-top: 140px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.mm-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, 0) 120%);
}
.mm-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 22px 46px rgba(35, 78, 72, .16); }

.mm-watermark {
  position: absolute;
  right: -18px;
  bottom: -22px;
  font-size: 11rem;
  color: var(--accent);
  opacity: .06;
  pointer-events: none;
  transform: rotate(-12deg);
}

.mm-card-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.1rem; }
.mm-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}
.mm-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .32rem .8rem;
  border-radius: 999px;
  background: #eef2ee;
  color: #234e48;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.mm-badge i { color: var(--accent); }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .mm-badge { background: color-mix(in srgb, var(--accent) 12%, white); }
}

.mm-card-title {
  margin: 0 0 .55rem;
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: #1c3b36;
}
.mm-card-desc { margin: 0 0 1.2rem; font-size: .98rem; line-height: 1.7; color: #55655f; }

.mm-features { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .7rem; flex: 1; position: relative; }
.mm-features li { display: flex; align-items: center; gap: .85rem; }
.mm-feat-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef2ee;
  color: var(--accent);
  font-size: 1rem;
}
@supports (background: color-mix(in srgb, red 10%, white)) {
  .mm-feat-icon { background: color-mix(in srgb, var(--accent) 14%, white); }
}
.mm-feat-text { display: flex; flex-direction: column; line-height: 1.3; }
.mm-feat-text strong { font-size: .95rem; color: #1c3b36; }
.mm-feat-text small { font-size: .84rem; color: #6b7a74; }

.mm-actions { display: flex; flex-wrap: wrap; gap: .7rem; position: relative; }
.mm-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.mm-btn:hover, .mm-btn:focus-visible { transform: translateY(-2px); outline: none; }
.mm-btn .fa-arrow-right { font-size: .72rem; transition: transform .2s ease; }
.mm-btn:hover .fa-arrow-right { transform: translateX(3px); }
.mm-btn-solid { background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.mm-btn-solid:hover { color: #fff; box-shadow: 0 12px 24px rgba(0, 0, 0, .26); }
.mm-btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.mm-btn-ghost:hover { background: var(--accent); color: #fff; }

/* ---------- call to action ---------- */
.mm-cta {
  padding: 4rem 1.5rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #234e48 0%, #1b3d38 55%, #3a1f1a 130%);
}
.mm-cta-inner { max-width: 640px; margin: 0 auto; }
.mm-cta h2 { margin: 0 0 .7rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: clamp(1.9rem, 4.4vw, 2.8rem); color: #fff; }
.mm-cta p { margin: 0 0 1.6rem; font-size: 1.05rem; line-height: 1.65; color: rgba(255, 255, 255, .8); }
.mm-btn-light { background: #fff; color: #234e48; padding: .95rem 1.7rem; font-size: 1rem; box-shadow: 0 12px 28px rgba(0, 0, 0, .25); }
.mm-btn-light:hover { color: #234e48; background: #fff3ec; }

/* ---------- dark theme ---------- */
html[data-theme="dark"] .mm-nav { background: rgba(18, 28, 26, .92); border-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .mm-pill { background: #1c2926; color: #e6eee9; border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .mm-section { background: #121c1a; background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 28px 28px; }
html[data-theme="dark"] .mm-card { background: #1a2623; border-color: rgba(255, 255, 255, .1); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
html[data-theme="dark"] .mm-card-title,
html[data-theme="dark"] .mm-feat-text strong { color: #f1f6f3; }
html[data-theme="dark"] .mm-card-desc,
html[data-theme="dark"] .mm-feat-text small { color: #aebdb6; }
html[data-theme="dark"] .mm-badge { background: rgba(255, 255, 255, .08); color: #e6eee9; }
html[data-theme="dark"] .mm-feat-icon { background: rgba(255, 255, 255, .07); }

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

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .mm-grid { grid-template-columns: 1fr; max-width: 560px; }
  .mm-nav-inner { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .mm-hero { padding: 6.8rem 1.25rem 2.4rem; }
  .mm-section { padding: 2rem 1rem 3rem; }
  .mm-card { padding: 1.4rem 1.2rem 1.3rem; border-radius: 20px; scroll-margin-top: 120px; }
  .mm-card-title { font-size: 1.45rem; }
  .mm-watermark { font-size: 8rem; }
  .mm-actions .mm-btn { flex: 1 1 100%; justify-content: center; }
  .mm-cta { padding: 3rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mm-hero-inner, .mm-chip-dot { animation: none !important; }
  .mm-card, .mm-btn, .mm-pill { transition: none !important; }
}
