/* 
   Collectif Sahara Humanitaire — Design System
   Modern, Vibrant, Professional Non-Profit Aesthetic
   Fully Mobile Responsive (iOS, Android, Tablet, Desktop)
*/

:root {
  --primary: #006233;        /* Moroccan Emerald */
  --primary-dark: #004222;
  --secondary: #C1272D;      /* Moroccan Ruby */
  --accent: #D97706;         /* Sahara Gold */
  --accent-light: #FBBF24;
  --bg-dark: #0F172A;
  --bg-light: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-white: #FFFFFF;
  --border: #E2E8F0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 35px -10px rgba(0,0,0,0.12);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* TOP ANNOUNCEMENT BAR */
.top-bar {
  background: var(--bg-dark);
  color: #94A3B8;
  font-size: 0.82rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.top-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-exempt {
  background: rgba(0, 98, 51, 0.25);
  color: #4ADE80;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid rgba(74, 222, 128, 0.35);
  white-space: nowrap;
}

/* LANGUAGE SWITCHER */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.lang-switcher a {
  color: #94A3B8;
  padding: 2px 8px;
  border-radius: 12px;
  text-decoration: none;
}

.lang-switcher a.active {
  background: var(--primary);
  color: white;
}

/* HEADER & NAV */
header {
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(0,98,51,0.25);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-toggle:hover {
  background: var(--primary);
  color: white;
}

/* BUTTON SYSTEM */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(0,98,51,0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,98,51,0.4);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(217,119,6,0.3);
}

.btn-accent:hover {
  background: #B45309;
  color: white;
}

/* DONATE BUTTON SPECIFIC */
.donate-btn {
  background: linear-gradient(135deg, #D97706, #F59E0B) !important;
  color: white !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(217,119,6,0.45) !important;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}
.donate-btn:hover {
  background: linear-gradient(135deg, #B45309, #D97706) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217,119,6,0.55) !important;
  color: white !important;
}
.donate-btn::before { content: "❤️"; font-size:1rem; }

/* HERO SECTION */
.hero {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(0, 98, 51, 0.88)), url('https://images.unsplash.com/photo-1509099836639-18ba1795216d?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 90px 0 110px;
  position: relative;
}

.hero-content {
  max-width: 780px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.2);
  flex-wrap: wrap;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.18;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.15rem;
  color: #E2E8F0;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* STATS STRIP */
.stats-strip {
  background: var(--surface);
  margin-top: -45px;
  position: relative;
  z-index: 10;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  border: 1px solid var(--border);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* SECTIONS */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px;
}

.section-title h2 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* GRID CARDS */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(0,98,51,0.1);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

/* LEADERSHIP BOX */
.leadership-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 36px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.avatar-placeholder {
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, var(--bg-dark), var(--primary));
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  text-align: center;
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.avatar-placeholder span {
  font-size: 2.8rem;
  margin-bottom: 6px;
}

/* FOOTER */
footer {
  background: var(--bg-dark);
  color: #94A3B8;
  padding: 60px 0 30px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.footer-col p {
  margin-bottom: 14px;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94A3B8;
}

.footer-links a:hover {
  color: white;
}

.compliance-box {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* DONATE MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,15,30,0.78);
  backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: #FFFFFF;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
  animation: slideUp 0.3s cubic-bezier(0.16,1,0.3,1);
}
@keyframes slideUp {
  from { opacity:0; transform:translateY(30px); }
  to   { opacity:1; transform:translateY(0); }
}

.modal-header {
  background: linear-gradient(135deg, #006233 0%, #004d27 100%);
  color: white;
  padding: 24px 28px 20px;
  position: relative;
}
.modal-header h2 { font-size:1.35rem; font-weight:900; margin-bottom:4px; }
.modal-header p  { font-size:.85rem; color:rgba(255,255,255,0.85); margin:0; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size:1.1rem;
  display: flex; align-items:center; justify-content:center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.35); }

.modal-body { padding: 24px 28px; }

.amounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.amount-btn {
  border: 2px solid #E2E8F0;
  background: #F8FAFC;
  color: #1E293B;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}
.amount-btn:hover, .amount-btn.selected {
  border-color: #006233;
  background: rgba(0,98,51,0.08);
  color: #006233;
}

.custom-amount {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 700;
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.2s;
}
.custom-amount:focus { border-color: #006233; }

.bank-box {
  background: #F0FFF4;
  border: 1px solid #BBF7D0;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
  font-size: 0.85rem;
}
.bank-box h4 {
  color: #006233;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: #1E293B;
  flex-wrap: wrap;
  gap: 4px;
}
.bank-row:last-child { border-bottom:none; }
.bank-row span:first-child { color:#64748B; font-weight:600; }
.bank-row span:last-child  { font-weight:700; font-size:0.82rem; word-break: break-all; }

.copy-btn {
  background: none;
  border: 1px solid #BBF7D0;
  color: #006233;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.72rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  margin-left: 4px;
  transition: all 0.2s;
}
.copy-btn:hover { background:#006233; color:white; }

.modal-cta {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #D97706, #F59E0B);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(217,119,6,0.35);
}
.modal-cta:hover {
  background: linear-gradient(135deg, #B45309, #D97706);
  transform: translateY(-1px);
}

.modal-note {
  text-align: center;
  font-size: 0.78rem;
  color: #64748B;
  margin-top: 12px;
}

/* ───────────────────────────────────────────────────────────── */
/* RESPONSIVE MEDIA QUERIES (TABLETS & SMARTPHONES)              */
/* ───────────────────────────────────────────────────────────── */

/* Tablets & Small Laptops (<= 992px) */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {

  /* Top Bar Mobile Fix */
  .top-bar .container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 6px 16px;
  }

  .top-info {
    justify-content: center;
    font-size: 0.78rem;
    gap: 10px;
  }

  .top-info span {
    margin-right: 0;
  }

  .badge-exempt {
    font-size: 0.72rem;
    padding: 2px 8px;
  }

  /* Header & Navigation Drawer */
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface);
    flex-direction: column;
    padding: 20px 24px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
    border-bottom: 2px solid var(--primary);
    gap: 16px;
    z-index: 1001;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 10px 0;
    font-size: 1.05rem;
  }

  .nav-links .btn {
    width: 100%;
    margin-top: 6px;
  }

  /* Hero Mobile Fixes */
  .hero {
    padding: 60px 0 80px;
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-tag {
    font-size: 0.78rem;
    padding: 6px 12px;
    justify-content: center;
    margin-bottom: 18px;
    line-height: 1.4;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 16px;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 26px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  /* Stats Strip Mobile Fix */
  .stats-strip {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px 16px;
    margin-top: -35px;
  }

  .stat-number {
    font-size: 1.85rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  /* Sections */
  .section {
    padding: 60px 0;
  }

  .section-title {
    margin-bottom: 36px;
  }

  .section-title h2 {
    font-size: 1.7rem;
  }

  .section-title p {
    font-size: 0.95rem;
  }

  /* Leadership Box Mobile */
  .leadership-box {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 28px 20px;
    gap: 20px;
  }

  .avatar-placeholder {
    margin: 0 auto;
    width: 130px;
    height: 130px;
  }

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

/* Small Smartphone Screens (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .stats-strip {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .amounts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .amount-btn {
    font-size: 0.85rem;
    padding: 10px 2px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-body {
    padding: 18px 16px;
  }
}
