/* =========================================================
   Prophet AA Emmanuel Ministries — Custom styles
   Built on top of Tailwind (CDN). Uses @apply-free utility
   classes defined here so the markup stays clean & editable.
   ========================================================= */

:root {
  --navy: #0b1f4d;
  --navy-light: #16306e;
  --navy-dark: #081634;
  --gold: #c9a227;
  --gold-light: #e6c45a;
  --gold-dark: #a8851a;
}

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
section[id] { scroll-margin-top: 5.5rem; }   /* offset for the fixed header */
::selection { background: var(--gold-light); color: var(--navy-dark); }

/* Font-weight helpers used in markup */
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }

/* ---------- Header: two-tier (utility bar + dark nav) ---------- */
/* The whole header is position:fixed, so the address bar stays put. */
#navbar { background: var(--navy-dark); }
#header.scrolled #navbar { box-shadow: 0 6px 24px rgba(8, 22, 52, 0.35); }

.nav-text     { color: #fff; }
.nav-subtext  { color: rgba(230, 196, 90, 0.9); }
.nav-link     { color: rgba(255, 255, 255, 0.92); position: relative; transition: color .25s; }
.nav-link:hover, .nav-link.active { color: var(--gold-light); }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -8px; height: 2px; width: 0;
  background: var(--gold-light); transition: width .3s;
}
.nav-link:hover::after { width: 100%; }

/* ---------- Desktop dropdowns ---------- */
.nav-item { position: relative; }
.nav-caret { transition: transform .25s; }
.nav-item:hover .nav-caret { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 220px; background: var(--navy-dark); border: 1px solid rgba(255,255,255,.08);
  border-radius: .75rem; padding: .5rem; box-shadow: 0 18px 44px rgba(8,22,52,.45);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease; z-index: 60;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(10px); }
.dropdown::before { content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 12px; }
.dropdown a {
  display: block; padding: .6rem .85rem; border-radius: .5rem; font-size: .9rem;
  color: rgba(255,255,255,.85); transition: background .18s, color .18s; cursor: pointer; white-space: nowrap;
}
.dropdown a:hover { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy-dark); }

/* ---------- Top utility bar links ---------- */
.top-link { color: #475569; transition: color .2s; }
.top-link:hover { color: var(--gold-dark); }
.top-social { color: #64748b; transition: color .2s, transform .2s; }
.top-social:hover { color: var(--gold-dark); transform: translateY(-2px); }

/* ---------- Mobile dropdown accordion ---------- */
.m-sub { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.m-sub.open { max-height: 400px; }

.mobile-link {
  display: block; padding: .65rem .25rem; border-radius: .5rem;
  color: rgba(255, 255, 255, 0.9); transition: background .2s, color .2s;
}
.mobile-link:hover { background: rgba(255, 255, 255, 0.08); color: var(--gold-light); }

/* ---------- Buttons ---------- */
.btn-gold, .btn-navy, .btn-outline-light {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.6rem; border-radius: 9999px; font-weight: 600;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
  cursor: pointer; line-height: 1; text-align: center;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-dark); box-shadow: 0 8px 22px rgba(201, 162, 39, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(201, 162, 39, 0.45); }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 8px 22px rgba(11, 31, 77, 0.25); }
.btn-navy:hover { background: var(--navy-dark); transform: translateY(-2px); }
.btn-outline-light { border: 1.5px solid rgba(255, 255, 255, 0.6); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }

/* ---------- Section headings ---------- */
.section-eyebrow {
  display: inline-block; font-weight: 600; font-size: .8rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--gold-dark); margin-bottom: .75rem;
}
.section-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; line-height: 1.1;
  color: var(--navy);
}
.text-white .section-title, .section-title.text-white { color: #fff; }

/* ---------- Cards ---------- */
.card-soft {
  background: #fff; border: 1px solid #eef1f6; border-radius: 1rem; padding: 1.4rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card-soft:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11, 31, 77, 0.1); border-color: #e6c45a55; }
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.75rem; width: 2.75rem; border-radius: .75rem; font-size: 1.25rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: var(--gold-light);
}

.timeline-dot {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  height: 2rem; width: 2rem; border-radius: 9999px; font-weight: 700; font-size: .85rem;
  background: var(--gold); color: var(--navy-dark);
}

/* ---------- Stats ---------- */
.stat-card {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem; padding: 1.75rem 1rem; backdrop-filter: blur(4px);
  transition: transform .25s, background .25s;
}
.stat-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.1); }
.stat-number {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem); color: var(--gold-light); line-height: 1;
}
.stat-label { margin-top: .5rem; font-size: .85rem; color: rgba(255, 255, 255, 0.8); }

/* ---------- Gallery ---------- */
.gallery-item {
  position: relative; overflow: hidden; border-radius: 1rem; cursor: pointer;
  box-shadow: 0 6px 18px rgba(11, 31, 77, 0.08);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1rem .9rem .8rem;
  color: #fff; font-weight: 600; font-size: .9rem;
  background: linear-gradient(to top, rgba(8, 22, 52, 0.85), transparent);
  transform: translateY(8px); opacity: 0; transition: .35s;
}
.gallery-item:hover figcaption { transform: translateY(0); opacity: 1; }

/* ---------- Sermons ---------- */
.sermon-card {
  background: #fff; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 8px 26px rgba(11, 31, 77, 0.08); transition: transform .25s, box-shadow .25s;
}
.sermon-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(11, 31, 77, 0.14); }
.sermon-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(11, 31, 77, 0.25); opacity: 0; transition: opacity .3s;
}
.sermon-card:hover .play-overlay { opacity: 1; }
.play-overlay svg {
  background: var(--gold); color: var(--navy-dark); border-radius: 9999px; padding: .55rem;
  height: 3rem; width: 3rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.btn-watch {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem;
  color: var(--navy); transition: color .2s;
}
.btn-watch:hover { color: var(--gold-dark); }

/* ---------- Donation ---------- */
.amount-card {
  border: 1.5px solid #e2e8f0; border-radius: .75rem; padding: .85rem .5rem;
  font-weight: 700; color: var(--navy); background: #fff; transition: .2s; font-size: .95rem;
}
.amount-card:hover { border-color: var(--gold); color: var(--gold-dark); }
.amount-card.active {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff; border-color: var(--navy);
}
.partner-check {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  height: 1.75rem; width: 1.75rem; border-radius: 9999px;
  background: var(--gold); color: var(--navy-dark); font-weight: 700; font-size: .9rem;
}

/* ---------- Partnership tiers ---------- */
.tier-card {
  position: relative; background: #fff; border: 1px solid #eef1f6; border-radius: 1rem;
  padding: 1.6rem; box-shadow: 0 8px 26px rgba(11, 31, 77, 0.12); transition: transform .25s, box-shadow .25s;
}
.tier-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(11, 31, 77, 0.18); }
.tier-featured {
  background: linear-gradient(160deg, var(--navy), var(--navy-light));
  border-color: var(--gold); box-shadow: 0 16px 40px rgba(201, 162, 39, 0.3);
}
.tier-badge {
  position: absolute; top: -.7rem; right: 1rem; background: var(--gold); color: var(--navy-dark);
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .25rem .7rem; border-radius: 9999px;
}
.tier-choose {
  margin-top: 1.1rem; width: 100%; border-radius: 9999px; padding: .65rem 1rem; font-weight: 600;
  background: var(--navy); color: #fff; transition: .2s;
}
.tier-choose:hover { background: var(--navy-dark); }
.tier-choose-light { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy-dark); }
.tier-choose-light:hover { filter: brightness(1.05); }

/* ---------- Forms ---------- */
.form-label { display: block; font-size: .85rem; font-weight: 600; color: #334155; margin-bottom: .35rem; }
.form-input {
  width: 100%; border: 1.5px solid #e2e8f0; border-radius: .65rem; padding: .7rem .9rem;
  font-size: .95rem; color: var(--navy-dark); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15); }
.form-input.invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }

/* ---------- Testimonies ---------- */
.testimony-card {
  background: #fff; border: 1px solid #eef1f6; border-radius: 1rem; padding: 1.6rem;
  box-shadow: 0 6px 20px rgba(11, 31, 77, 0.06); transition: transform .25s, box-shadow .25s;
}
.testimony-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11, 31, 77, 0.1); }

/* ---------- Contact ---------- */
.contact-row { display: flex; gap: 1rem; align-items: flex-start; }
.contact-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  height: 2.75rem; width: 2.75rem; border-radius: .75rem; font-size: 1.15rem;
  background: #fff; box-shadow: 0 4px 14px rgba(11, 31, 77, 0.08);
}

/* ---------- Footer ---------- */
.footer-title { color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .03em; }
.footer-link { transition: color .2s; }
.footer-link:hover { color: var(--gold-light); }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center; height: 2.4rem; width: 2.4rem;
  border-radius: 9999px; background: rgba(255, 255, 255, 0.08); color: #fff; transition: .25s;
}
.social-icon:hover { background: var(--gold); color: var(--navy-dark); transform: translateY(-3px); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Hero slider ---------- */
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.1s ease; will-change: opacity;
}
.hero-slide.active { opacity: 1; }
.hero-arrow {
  height: 3rem; width: 3rem; display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; background: rgba(8, 22, 52, 0.4); color: #fff; border: 1px solid rgba(255,255,255,.25);
  transition: background .2s; cursor: pointer; backdrop-filter: blur(2px);
}
.hero-arrow:hover { background: var(--gold); color: var(--navy-dark); }
.hero-dots { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; gap: .5rem; }
.hero-dot { height: .55rem; width: .55rem; border-radius: 9999px; background: rgba(255,255,255,.45); cursor: pointer; transition: .25s; }
.hero-dot.active { background: var(--gold-light); width: 1.5rem; }

/* ---------- Watch Live poster (fallback when no embeddable URL) ---------- */
.live-poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; background-size: cover; background-position: center; cursor: pointer; text-align: center;
}
.live-poster::before { content: ""; position: absolute; inset: 0; background: rgba(8, 22, 52, 0.6); }
.live-poster > * { position: relative; }
.live-play {
  height: 4.5rem; width: 4.5rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--navy-dark); box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .2s;
}
.live-poster:hover .live-play { transform: scale(1.08); }

/* ---------- Modal (shared) ---------- */
#donationModal.open, #giveModal.open { display: block; }
#donationModal.open #modalPanel, #giveModal.open #givePanel { animation: modalIn .35s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- Admin dashboard ---------- */
.admin-tab {
  padding: .85rem 1.1rem; font-weight: 600; font-size: .9rem; color: #64748b;
  border-bottom: 3px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s;
}
.admin-tab:hover { color: var(--navy); }
.admin-tab.active { color: var(--navy); border-color: var(--gold); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
