/* ============================================================
   MINISTRIES — CSS
   Theme: Dark Glass · Gold Accents · Parliament Regal
   ============================================================ */

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
}

/* ── BACKGROUND ── */
.bg-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%,  #1c1008 0%, transparent 65%),
    radial-gradient(ellipse 60% 60% at 80% 80%,  #140c04 0%, transparent 60%),
    #050301;
}

/* ── GLASS BOX ── */
.glass-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 28px 32px;
}

/* ── NAV PILLS ── */
.nav-pill {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.28s ease;
  display: inline-block;
}
.nav-pill:hover,
.nav-pill.active {
  border-color: #d4af37;
  color: #d4af37;
  box-shadow: 0 0 12px rgba(212,175,55,0.5);
}

/* scrollbar-hide utility */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ── HERO RULE ── */
.hero-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}
.rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.6));
}
.rule-line--rev {
  background: linear-gradient(90deg, rgba(212,175,55,0.6), transparent);
}
.rule-diamond {
  width: 6px;
  height: 6px;
  background: #d4af37;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── MINISTRY GRID ── */
.ministry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 768px) {
  .ministry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .ministry-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ── MINISTRY CARD ── */
.m-card {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 28px 22px 24px;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  overflow: hidden;
}

/* Subtle gold shimmer line at top on hover */
.m-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.m-card:hover::before { opacity: 1; }

.m-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212,175,55,0.35);
  background: rgba(212,175,55,0.04);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(212,175,55,0.12);
}

/* ICON WRAP */
.m-card__icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.m-card:hover .m-card__icon-wrap {
  background: rgba(212,175,55,0.16);
  border-color: rgba(212,175,55,0.45);
}

.m-card__icon {
  width: 28px;
  height: 28px;
  color: #d4af37;
}

/* NUMBER */
.m-card__num {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(212,175,55,0.45);
}

/* TITLE */
.m-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  transition: color 0.3s ease;
}
.m-card:hover .m-card__title { color: #f5d78e; }

/* SUBTITLE */
.m-card__sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}

/* ARROW */
.m-card__arrow {
  margin-top: auto;
  padding-top: 12px;
  font-size: 1rem;
  color: rgba(212,175,55,0.35);
  transition: color 0.25s ease, transform 0.25s ease;
  align-self: flex-end;
}
.m-card:hover .m-card__arrow {
  color: #d4af37;
  transform: translateX(4px);
}

/* ── OVERLAY BACKDROP ── */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay-backdrop.open {
  display: flex;
  animation: bdFadeIn 0.25s ease;
}
@keyframes bdFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── OVERLAY PANEL ── */
.overlay-panel {
  background: rgba(18,12,6,0.96);
  border: 1px solid rgba(212,175,55,0.22);
  border-radius: 22px;
  padding: 32px 28px;
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  animation: panelUp 0.35s cubic-bezier(.22,.68,0,1.2);
}
@keyframes panelUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.overlay-panel::-webkit-scrollbar { width: 4px; }
.overlay-panel::-webkit-scrollbar-thumb {
  background: rgba(212,175,55,0.35);
  border-radius: 10px;
}

/* BACK BUTTON */
.overlay-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(212,175,55,0.7);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 22px;
  transition: color 0.2s ease;
}
.overlay-back:hover { color: #d4af37; }

/* OVERLAY ICON */
.overlay-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.overlay-icon-wrap svg {
  width: 32px;
  height: 32px;
  color: #d4af37;
}

/* OVERLAY TITLE */
.overlay-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.25;
}

/* OVERLAY INTRO */
.overlay-intro {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  margin-bottom: 22px;
}

/* DIVIDER */
.overlay-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

/* TAGS */
.overlay-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  transition: border-color 0.22s, background 0.22s;
}
.tag::before {
  content: '';
  width: 5px;
  height: 5px;
  background: #d4af37;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.7;
}
.tag:hover {
  border-color: rgba(212,175,55,0.3);
  background: rgba(212,175,55,0.05);
}

/* ── MOBILE TWEAKS ── */
@media (max-width: 480px) {
  .glass-box { padding: 20px 18px; }

  .m-card {
    padding: 22px 18px 18px;
    border-radius: 14px;
  }
  .m-card__icon-wrap { width: 44px; height: 44px; border-radius: 11px; }
  .m-card__icon      { width: 24px; height: 24px; }
  .m-card__title     { font-size: 0.95rem; }
  .m-card__sub       { font-size: 0.7rem; }

  .overlay-panel     { padding: 24px 18px; border-radius: 18px; }
  .overlay-title     { font-size: 1.35rem; }
}