/* ============================================
   MUKATANAND GIRI BAPUJI - Modern Theme
   Bootstrap 5 + Custom Styles
   ============================================ */

:root {
  --gold: #d4a853;
  --gold-dark: #b8923a;
  --saffron: #ff9933;
  --saffron-dark: #e68a00;
  --dark: #1a1a2e;
  --darker: #0f0f23;
  --card-shadow: 0 8px 32px rgba(0,0,0,0.1);
  --hover-shadow: 0 12px 40px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', sans-serif;
  color: #333;
  overflow-x: hidden;
}

/* Typography */
.text-gold { color: var(--gold) !important; }
.text-saffron { color: var(--saffron) !important; }
.bg-gold { background: var(--gold) !important; }
.bg-dark-hero { background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%) !important; }
.bg-soft { background: #f8f7f4 !important; }

/* Navbar */
.navbar-dark { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important; }
.navbar .nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold) !important;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff !important;
  border: none;
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  transition: var(--transition);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 168, 83, 0.4);
  color: #fff !important;
}
.btn-outline-gold {
  border: 2px solid var(--gold);
  color: var(--gold);
  background: transparent;
  border-radius: 50px;
  transition: var(--transition);
}
.btn-outline-gold:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}
.hover-gold:hover { color: var(--gold) !important; }

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 75vh;
  min-height: 450px;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,15,35,0.85) 0%, rgba(26,26,46,0.6) 50%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.4rem);
  opacity: 0.9;
  max-width: 600px;
}

/* Cards */
.feature-card, .blog-card, .event-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
}
.feature-card:hover, .blog-card:hover, .event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--hover-shadow);
}
.card-img-wrap {
  overflow: hidden;
  height: 220px;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.feature-card:hover .card-img-wrap img,
.blog-card:hover .card-img-wrap img {
  transform: scale(1.08);
}

/* Section Titles */
.section-title {
  position: relative;
  font-weight: 700;
  margin-bottom: 2rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--saffron));
  border-radius: 2px;
  margin-top: 0.75rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Sermon List */
.sermon-item {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border-left: 4px solid var(--gold);
}
.sermon-item:hover {
  transform: translateX(6px);
  box-shadow: var(--hover-shadow);
}

/* Page Hero */
.page-hero {
  background: linear-gradient(135deg, var(--darker), var(--dark));
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: 'ॐ';
  position: absolute;
  right: -50px;
  top: -50px;
  font-size: 300px;
  opacity: 0.05;
  color: var(--gold);
  font-family: 'Tiro Devanagari Hindi', serif;
}

/* Contact Form */
.contact-form .form-control, .contact-form .form-select {
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  border: 2px solid #e5e7eb;
  transition: var(--transition);
}
.contact-form .form-control:focus, .contact-form .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.15);
}

/* Pagination */
.pagination-custom .page-link {
  border: none;
  border-radius: 10px;
  margin: 0 4px;
  color: var(--dark);
  font-weight: 500;
  transition: var(--transition);
}
.pagination-custom .page-link:hover,
.pagination-custom .page-item.active .page-link {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 4px 15px rgba(212, 168, 83, 0.3);
}

/* Loading spinner */
.loader {
  width: 48px; height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Sermon Audio Player */
.audio-player-wrap {
  background: #f8f7f4;
  border-radius: 50px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sermon-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: #fff;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  font-size: 1.2rem;
}
.sermon-play-btn:hover { background: var(--gold); color: #fff; }
.sermon-audio-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  overflow: hidden;
}
.sermon-audio-status { font-size: 0.75rem; color: var(--gold); white-space: nowrap; }
.sermon-audio-time { font-size: 0.7rem; color: #999; }
.audio-player-wrap audio { display: none; }

/* Back to Top */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 999;
  cursor: pointer;
  transition: var(--transition);
}
#backToTop:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(212, 168, 83, 0.5);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-slider { height: 55vh; min-height: 350px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .page-hero { padding: 3rem 0 2rem; }
  .page-hero::before { font-size: 150px; right: -30px; top: -30px; }
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}
.animate-slide-up {
  animation: slideUp 0.6s ease forwards;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stat counter */
.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--hover-shadow); }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--gold); }
.stat-label { color: #6b7280; font-weight: 500; }
