:root {
  --primary-green: #0d4a36;
  /* Deep Emerald Green */
  --light-green: #1a7156;
  --accent-gold: #c5a861;
  /* Soft Gold */
  --light-gold: #e2cca1;
  --text-dark: #2d3748;
  --text-light: #f7fafc;
  --bg-light: #fdfbf7;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* Navbar */
.navbar-custom {
  background-color: var(--primary-green);
  padding: 15px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar-custom .navbar-brand {
  color: var(--accent-gold);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.navbar-custom .navbar-brand img {
  height: 80px;
}

.navbar-custom .nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  margin: 0 10px;
  position: relative;
  transition: color 0.3s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--accent-gold) !important;
}

.navbar-custom .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  display: block;
  margin-top: 5px;
  right: 0;
  background: var(--accent-gold);
  transition: width 0.3s ease;
  -webkit-transition: width 0.3s ease;
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
  width: 100%;
  left: 0;
  background: var(--accent-gold);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Islamic Geometric Pattern Section */
.pattern-bg {
  background-color: var(--primary-green);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c5a861' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: white;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--accent-gold);
  color: var(--primary-green);
  border: none;
  font-weight: 600;
  padding: 10px 25px;
  border-radius: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(197, 168, 97, 0.4);
}

.btn-primary-custom:hover {
  background-color: var(--light-gold);
  color: var(--primary-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 168, 97, 0.6);
}

/* Hero Section */
.hero {
  position: relative;
  height: 70vh;
  min-height: 550px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(13, 74, 54, 0.6), rgba(13, 74, 54, 0.8));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInDown 1s ease;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.3s;
  animation-fill-mode: both;
}

/* Sections */
section {
  padding: 80px 0;
}

.section-title {
  color: var(--primary-green);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
  font-size: 2.25rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-gold);
}

/* Cards */
.card-custom {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  height: 100%;
  background: white;
}

.card-custom:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--accent-gold);
  margin-bottom: 20px;
}

/* Prayer Times */
.prayer-card {
  background: var(--primary-green);
  color: white;
  border-radius: 15px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(13, 74, 54, 0.2);
}

.prayer-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--accent-gold) 0%, transparent 60%);
  opacity: 0.1;
  border-radius: 50%;
}

.prayer-table {
  width: 100%;
  color: white;
}

.prayer-table th,
.prayer-table td {
  padding: 15px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.1rem;
}

.prayer-table tr:last-child th,
.prayer-table tr:last-child td {
  border-bottom: none;
}

.prayer-table th {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-gold);
}

.prayer-table td {
  text-align: right;
  font-weight: 600;
}

.prayer-row.active-prayer {
  background-color: rgba(197, 168, 97, 0.2);
  border-radius: 8px;
}

.prayer-row.active-prayer th,
.prayer-row.active-prayer td {
  color: var(--accent-gold);
}

/* Footer */
footer {
  background-color: #082d21;
  /* Very Dark Green */
  color: #fff;
  padding: 60px 0 20px;
  margin-top: auto;
}

footer h5 {
  color: var(--accent-gold);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-gold);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--accent-gold);
  padding-left: 5px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  margin-right: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  background-color: var(--accent-gold);
  transform: translateY(-3px);
  color: var(--primary-green);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 40px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Form Styling */
.form-control {
  border: 1px solid #e2e8f0;
  padding: 12px 15px;
  border-radius: 8px;
  background-color: #f8fafc;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 0.25rem rgba(197, 168, 97, 0.25);
  background-color: #fff;
}

/* Blockquote Quote */
.islamic-quote {
  font-style: italic;
  font-size: 1.5rem;
  color: var(--primary-green);
  text-align: center;
  border-left: 4px solid var(--accent-gold);
  padding: 20px;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: 0 10px 10px 0;
  margin: 40px auto;
  max-width: 800px;
}

.islamic-quote .reference {
  display: block;
  margin-top: 15px;
  font-size: 1rem;
  color: var(--accent-gold);
  font-weight: 600;
  font-style: normal;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -30px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Map specific styling */
#map-placeholder {
  width: 100%;
  height: 400px;
  background-color: #e5e7eb;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #6b7280;
  font-weight: 500;
}

/* =========================================================
   Navbar – Donate button highlight
   ========================================================= */
.nav-donate {
  color: var(--accent-gold) !important;
  font-weight: 600 !important;
}

/* =========================================================
   Event cards (home + events page)
   ========================================================= */
.event-date-badge {
  background: var(--primary-green);
  color: white;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 72px;
  flex-shrink: 0;
}
.event-date-badge .day  { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1; }
.event-date-badge .month{ display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-gold); }
.event-date-badge .year { display: block; font-size: .7rem; color: rgba(255,255,255,.6); }
.event-date-badge.past  { background: #9ca3af; }

.event-card { border-left: 4px solid var(--accent-gold) !important; transition: transform .2s, box-shadow .2s; }
.event-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,.1) !important; }
.event-card.event-past { opacity: .75; border-left-color: #9ca3af !important; }

.event-card-home {
  border-left: 4px solid var(--accent-gold) !important;
  transition: transform .2s, box-shadow .2s;
}
.event-card-home:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.08) !important; }

/* =========================================================
   Gallery grid + lightbox
   ========================================================= */
.gallery-grid {
  columns: 3 280px;
  gap: 14px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #e5e7eb;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: white;
  padding: 20px 12px 10px;
  font-size: .8rem;
  opacity: 0;
  transition: opacity .3s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

/* Lightbox */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-content { max-width: 90vw; max-height: 90vh; position: relative; }
.lightbox-content img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 8px; display: block; }
.lightbox-caption { color: rgba(255,255,255,.8); text-align: center; margin-top: 10px; font-size: .9rem; }
.lightbox-close {
  position: fixed; top: 20px; right: 28px;
  background: none; border: none;
  color: white; font-size: 2.5rem; line-height: 1;
  cursor: pointer; opacity: .8; z-index: 10000;
}
.lightbox-close:hover { opacity: 1; }

/* =========================================================
   Quran verse
   ========================================================= */
.quran-widget-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(197,168,97,.3);
  border-radius: 16px;
  padding: 36px;
}
.surah-badge {
  background: rgba(197,168,97,.2);
  color: var(--accent-gold);
  border: 1px solid rgba(197,168,97,.4);
  padding: 6px 18px;
  border-radius: 30px;
  font-size: .85rem;
  font-weight: 600;
}
.arabic-text {
  font-size: 1.9rem;
  line-height: 2;
  color: white;
  direction: rtl;
  font-family: 'Amiri', 'Scheherazade New', serif;
}
.english-text {
  color: rgba(255,255,255,.85);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Full quran page */
.quran-verse-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(13,74,54,.1);
  border-top: 4px solid var(--accent-gold);
}
.arabic-text-lg {
  font-size: 2.2rem;
  line-height: 2;
  color: var(--primary-green);
  direction: rtl;
  font-family: 'Amiri', 'Scheherazade New', serif;
}
.english-translation {
  font-size: 1.1rem;
  color: #4a5568;
  line-height: 1.9;
}
.reciter-card {
  background: var(--bg-light);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: box-shadow .2s;
}
.reciter-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.reciter-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-green); color: var(--accent-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0;
}
audio.quran-audio-player { width: 280px; max-width: 100%; }
