/* ================================================================
   CCIP La Pocatière — Main Stylesheet
   ================================================================ */

/* ── Custom properties ─────────────────────────────────────── */
:root {
  --green: #1F6B4F;
  --green-dark: #17533d;
  --gold:  #D4A017;
  --gold-dark: #b8880f;
  --bg:    #F8FAFC;
  --text:  #1E293B;
}

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Bootstrap overrides ────────────────────────────────────── */
.bg-primary           { background-color: var(--green) !important; }
.text-primary         { color: var(--green) !important; }
.border-primary       { border-color: var(--green) !important; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  background-color: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(31, 107, 79, 0.4);
}

.btn-gold {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #fff;
  font-weight: 600;
}
.btn-gold:hover,
.btn-gold:focus {
  background-color: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff;
}
.btn-gold:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(212, 160, 23, 0.4);
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-gold { color: var(--gold) !important; }

/* ── Arabic text ────────────────────────────────────────────── */
.arabic-text {
  font-family: 'Scheherazade New', serif;
  direction: rtl;
  text-align: right;
  line-height: 2;
}

/* ── Section title ──────────────────────────────────────────── */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green);
  position: relative;
  padding-bottom: 0.625rem;
  margin-bottom: 1.75rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background-color: var(--gold);
  border-radius: 2px;
}
.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}
.section-title.text-white {
  color: #fff !important;
}

/* ── Navbar (legacy — desktop nav now uses .ccip-desktop-nav) ── */

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.card-img-top {
  border-radius: 0.75rem 0.75rem 0 0;
  object-fit: cover;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge-green {
  background-color: var(--green);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.3em 0.65em;
  border-radius: 0.375rem;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 0.2rem rgba(31, 107, 79, 0.2);
}

/* ── Progress bar (donations) ───────────────────────────────── */
.progress {
  height: 12px;
  border-radius: 6px;
  background-color: #e2e8f0;
}
.progress-bar {
  background-color: var(--green);
  border-radius: 6px;
  transition: width 0.8s ease;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .section-title { font-size: 1.4rem; }
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 65vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: stretch;
}
.hero-overlay {
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 5rem 0;
}
.hero-logo {
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 72px;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 72'><path fill='%23F8FAFC' d='M0,72 L0,45 C0,30 34,7 40,7 C46,7 80,30 80,45 L80,72 Z'/></svg>");
  background-repeat: repeat-x;
  background-size: 80px 72px;
  background-position: bottom;
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
  margin-bottom: 0.5rem;
}
.hero .arabic-subtitle {
  font-family: 'Scheherazade New', serif;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
  direction: rtl;
  margin-bottom: 2rem;
  line-height: 2;
}

/* ── Dhikr widget ────────────────────────────────────────────── */
.dhikr-section {
  background: linear-gradient(135deg, #f0fdf4 0%, #fefce8 100%);
}
.dhikr-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 32px rgba(31, 107, 79, 0.1);
  border: 1px solid #d1fae5;
}
.dhikr-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.dhikr-badge--quran  { background: var(--green); color: #fff; }
.dhikr-badge--hadith { background: var(--gold);  color: #fff; }
.dhikr-badge--dhikr  { background: #4f46e5;      color: #fff; }

.dhikr-arabic {
  font-family: 'Scheherazade New', serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--green);
  line-height: 2.2;
  direction: rtl;
  margin: 0.5rem 0 1rem;
}
.dhikr-translation {
  color: var(--text);
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}
.dhikr-source {
  color: #64748b;
  font-size: 0.82rem;
}
.dhikr-card {
  transition: opacity 0.3s ease;
}

/* ── News cards ──────────────────────────────────────────────── */
.news-card-img {
  height: 210px;
  object-fit: cover;
  width: 100%;
}
.news-card-placeholder {
  height: 210px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 2.5rem;
  border-radius: 0.75rem 0.75rem 0 0;
}

/* ── Donation card buttons ───────────────────────────────────── */
.btn-don {
  padding: 0.4rem 0.75rem;
}

/* ── Donation section ────────────────────────────────────────── */
.donation-section {
  background: linear-gradient(135deg, var(--green) 0%, #164f3a 100%);
}
.donation-section .progress {
  background: rgba(255, 255, 255, 0.2);
  height: 14px;
  border-radius: 999px;
}
.donation-section .progress-bar {
  background: var(--gold);
  border-radius: 999px;
}

/* ── Google Map ──────────────────────────────────────────────── */
.ccip-map-wrap {
  line-height: 0;
  overflow: hidden;
}
.ccip-map-wrap iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
}

/* ── Announcement cards ──────────────────────────────────────── */
.announcement-card {
  border-left: 4px solid var(--gold);
  border-radius: 0 0.75rem 0.75rem 0;
}

@media (max-width: 767.98px) {
  .hero { min-height: 70vh; }
  .hero-overlay { padding: 2.5rem 0; }
  .dhikr-card { padding: 1.5rem; }
  .donation-section .col-lg-5 { text-align: center !important; }
}

/* ── Desktop top bar ────────────────────────────────────────── */
.ccip-topbar {
  background: var(--green);
}

.ccip-topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 72px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.ccip-topbar-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ccip-topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.ccip-topbar-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ccip-topbar-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1.5rem;
}

.ccip-topbar-logo img {
  display: block;
  height: 52px !important;
  width: auto !important;
  object-fit: contain;
}

.ccip-topbar-cta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* ── Desktop sticky navbar ───────────────────────────────────── */
.ccip-desktop-nav {
  background: #164f3a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 1020;
}

.ccip-desktop-nav .nav {
  flex-wrap: nowrap;
}

.ccip-nav-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .02em;
  padding: .75rem 1.25rem;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
}

.ccip-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.ccip-nav-link:hover {
  color: #fff;
}

.ccip-nav-link:hover::after {
  transform: scaleX(0.6);
}

.ccip-nav-link.active {
  color: var(--gold);
  font-weight: 600;
}

.ccip-nav-link.active::after {
  transform: scaleX(1);
}

.ccip-nav-icon {
  display: inline-flex;
  align-items: center;
  font-size: 1em;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* ── Mobile top header ───────────────────────────────────────── */
.ccip-mobile-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background-color: var(--green);
  padding: 0.5rem 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  gap: 0.5rem;
}

.ccip-mob-hdr-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ccip-mob-hdr-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.ccip-mob-hdr-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ccip-mob-hdr-logo img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.ccip-mob-hdr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.ccip-mob-hdr-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ccip-mob-hdr-btn--gold {
  background: var(--gold);
  color: #fff;
  width: auto;
  padding: 0 0.75rem;
  font-size: .85rem;
  font-weight: 600;
}

.ccip-mob-hdr-btn--gold:hover {
  background: var(--gold-dark);
  color: #fff;
}

/* ── Mobile bottom nav ───────────────────────────────────────── */
.ccip-mobile-nav {
  display: flex;
  justify-content: center;
  background: #164f3a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ccip-mob-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  flex: 1;
}

.ccip-mob-item i {
  font-size: 1.1rem;
  transition: transform 0.2s, color 0.2s;
  line-height: 1;
}

.ccip-mob-item:hover {
  color: #fff;
}

.ccip-mob-item:hover i { transform: translateY(-2px); }

.ccip-mob-item.ccip-mob-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.ccip-mob-item.ccip-mob-active i { color: var(--gold); }

@media (max-width: 400px) {
  .ccip-mob-item { padding: 7px 8px; font-size: 0.52rem; }
  .ccip-mob-item i { font-size: 1rem; }
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer-nav-wrap {
  background: #0f172a;
  padding: 2rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover { background: var(--gold); color: #fff; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.25rem;
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] { color: var(--gold); }

.footer-credits {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  text-align: center;
  margin: 0;
}
