/* Rise Church Amherst — Custom Styles */

/* ── Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: #1a1a2e; }

/* ── Navigation ─────────────────────────────────────── */
#main-nav {
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
#main-nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(13, 31, 60, 0.1);
}
#main-nav.nav-scrolled .nav-link { color: #374151 !important; }
#main-nav.nav-scrolled .nav-link:hover { color: #E87040 !important; }
#main-nav.nav-scrolled .nav-logo-text { color: #0D1F3C !important; }

/* Dropdown menus — controlled by JS (see initDropdowns in main.js) */
.nav-dropdown {
  display: none;
  animation: dropIn 0.15s ease forwards;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-item:hover { background: #F8F4EE; color: #E87040; }

/* Mobile menu */
#mobile-menu { transition: max-height 0.35s ease, opacity 0.3s ease; }
.mobile-accordion-content { display: none; }
.mobile-accordion-content.open { display: block; }

/* ── Hero ────────────────────────────────────────────── */
.hero-bg {
  background:
    radial-gradient(ellipse at 50% 110%, rgba(232, 112, 64, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 40%, rgba(196, 154, 60, 0.12) 0%, transparent 50%),
    linear-gradient(175deg, #0A1628 0%, #0D1F3C 55%, #122545 100%);
}
.hero-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero-glow {
  position: absolute;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(232, 112, 64, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Typography ─────────────────────────────────────── */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.text-gradient {
  background: linear-gradient(135deg, #E87040 0%, #C49A3C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-light {
  background: linear-gradient(135deg, #fca06a 0%, #e4bf6e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section Styles ─────────────────────────────────── */
.section-cream { background-color: #F8F4EE; }
.section-navy  { background-color: #0D1F3C; }
.section-white { background-color: #ffffff; }

/* Page sub-hero (not home) */
.page-hero {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(232, 112, 64, 0.28) 0%, transparent 60%),
    linear-gradient(160deg, #0A1628 0%, #0D1F3C 100%);
}

/* ── Cards ───────────────────────────────────────────── */
.card-hover {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(13, 31, 60, 0.14);
}

/* ── Video Embed ─────────────────────────────────────── */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 1rem;
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-primary {
  background: #E87040;
  color: #ffffff;
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #E87040;
}
.btn-primary:hover {
  background: #d4633a;
  border-color: #d4633a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 112, 64, 0.35);
}
.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #ffffff;
}
.btn-dark {
  background: #0D1F3C;
  color: #ffffff;
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #0D1F3C;
}
.btn-dark:hover {
  background: #1a3258;
  border-color: #1a3258;
  transform: translateY(-2px);
}

/* ── Animations (AOS fallback) ───────────────────────── */
[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-aos="fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}
[data-aos="fade-right"] {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-aos="fade-right"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}
[data-aos="fade-left"] {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-aos="fade-left"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}
[data-aos="zoom-in"] {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-aos="zoom-in"].aos-animate {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }
[data-aos-delay="500"] { transition-delay: 0.5s; }

/* ── Ministry / Card Gradients ───────────────────────── */
.grad-kids    { background: linear-gradient(135deg, #E87040, #f4a261); }
.grad-youth   { background: linear-gradient(135deg, #0D1F3C, #1a3258); }
.grad-groups  { background: linear-gradient(135deg, #C49A3C, #e2b96a); }
.grad-outreach{ background: linear-gradient(135deg, #2d6a4f, #52b788); }
.grad-missions{ background: linear-gradient(135deg, #6d3a7a, #a85bc4); }
.grad-music   { background: linear-gradient(135deg, #c62828, #e57373); }

/* ── Form Inputs ─────────────────────────────────────── */
.form-input {
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 0.625rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: #1a1a2e;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: 'Inter', sans-serif;
}
.form-input:focus {
  border-color: #E87040;
  box-shadow: 0 0 0 3px rgba(232, 112, 64, 0.15);
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #0D1F3C; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #E87040; }

/* ── Giving app: amount button ──────────────────────── */
.amount-btn.selected {
  border-color: #E87040 !important;
  background: rgba(232, 112, 64, 0.08) !important;
  color: #E87040 !important;
}
.freq-btn.selected {
  background: #0D1F3C !important;
  color: #ffffff !important;
  border-color: #0D1F3C !important;
}

/* ── Scroll-to-top button ────────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #E87040;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(232,112,64,0.4);
}
#scroll-top.visible { opacity: 1; transform: translateY(0); }
#scroll-top:hover { background: #d4633a; }

/* ── Decorative divider ─────────────────────────────── */
.divider-wave {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.divider-wave svg { display: block; width: 100%; }

/* ── Ministry page large cards ──────────────────────── */
.ministry-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #fff;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ministry-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,0.85) 0%, rgba(10,22,40,0.2) 60%, transparent 100%);
}
.ministry-card:hover { transform: translateY(-6px); box-shadow: 0 28px 56px rgba(10,22,40,0.25); }
.ministry-card-content { position: relative; z-index: 1; }

/* ── Tag / Badge ─────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E87040;
  background: rgba(232, 112, 64, 0.1);
  border-radius: 9999px;
  padding: 0.3rem 0.875rem;
}

/* ── Section divider line ────────────────────────────── */
.section-line {
  width: 3.5rem;
  height: 3px;
  background: linear-gradient(90deg, #E87040, #C49A3C);
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* ── Testimonial cards ────────────────────────────────── */
.quote-mark {
  font-size: 5rem;
  line-height: 1;
  color: rgba(232, 112, 64, 0.25);
  font-family: 'Playfair Display', serif;
  position: absolute;
  top: -0.5rem;
  left: 1.5rem;
}

/* ── Giving steps ─────────────────────────────────────── */
.step-number {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #E87040, #C49A3C);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Prayer card ─────────────────────────────────────── */
.prayer-bg {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(232, 112, 64, 0.15) 0%, transparent 50%),
    #0D1F3C;
}

/* ── Image placeholder ────────────────────────────────── */
.img-placeholder {
  background: linear-gradient(135deg, #0D1F3C, #1a3258);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.15);
  font-size: 3rem;
  overflow: hidden;
  position: relative;
}
.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,255,255,0.02) 20px,
    rgba(255,255,255,0.02) 40px
  );
}

/* ── Media Slider ─────────────────────────────────────── */
.slider-track { min-height: 200px; }

.slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.slider-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Progress bar animates from 0→100% over 5s via JS class toggle */
.slider-progress-bar { width: 0%; transition: width 5s linear; }
.slider-progress-bar.running { width: 100%; }

/* Thumbnail buttons */
.slider-thumb-img {
  border: 2px solid transparent;
  opacity: 0.55;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.slider-thumb:hover .slider-thumb-img { opacity: 0.8; }
.slider-thumb.active .slider-thumb-img { border-color: #E87040; opacity: 1; }
.slider-thumb.active .slider-thumb-label { color: rgba(255,255,255,0.9); }

/* Prev/Next arrow hover */
#slider-prev:hover, #slider-next:hover { background: rgba(0,0,0,0.7) !important; }

/* ── Responsive nav ──────────────────────────────────── */
@media (max-width: 1023px) {
  .nav-dropdown { display: none !important; }
}
