@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+Arabic:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

:root {
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --gold-500: #d4a843;
  --gold-400: #e5b94e;
  --gold-300: #f0d078;
  --red-flag: #c1272d;
  --bg-dark: #0a0f1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(212, 168, 67, 0.15);
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-gold: 0 0 40px rgba(212, 168, 67, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
}

.rtl { direction: rtl; text-align: right; font-family: 'Noto Sans Arabic', 'Inter', sans-serif; }
.ltr { direction: ltr; text-align: left; }

/* Language Toggle */
.lang-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 1000;
  display: flex; gap: 4px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50px; padding: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.lang-btn {
  padding: 10px 22px; border: none; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: all 0.3s ease; background: transparent;
  color: var(--text-secondary);
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--bg-dark); box-shadow: 0 4px 15px rgba(212,168,67,0.3);
}
.lang-btn:hover:not(.active) { color: var(--text-primary); }

/* Sections */
.lang-section { display: none; }
.lang-section.active { display: block; }

/* Hero */
.hero {
  position: relative; min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url('hero-banner.png') center/cover no-repeat;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,15,26,0.5) 0%, rgba(10,15,26,0.85) 60%, var(--bg-dark) 100%);
}
.hero-content {
  position: relative; z-index: 1; text-align: center;
  max-width: 900px; padding: 40px 20px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,168,67,0.12); border: 1px solid rgba(212,168,67,0.25);
  border-radius: 50px; padding: 8px 20px; margin-bottom: 24px;
  font-size: 0.85rem; color: var(--gold-400); font-weight: 500;
  animation: fadeInDown 0.8s ease;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald-500); animation: pulse 2s infinite;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.2; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-400) 50%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 4s ease infinite;
}
.rtl .hero h1 { font-family: 'Noto Sans Arabic', serif; }
.hero p {
  font-size: 1.15rem; color: var(--text-secondary);
  max-width: 700px; margin: 0 auto 30px;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: white; padding: 14px 32px; border-radius: 50px;
  text-decoration: none; font-weight: 600; font-size: 1rem;
  transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.1);
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(5,150,105,0.3);
}

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Section Titles */
.section-title {
  text-align: center; margin-bottom: 50px;
}
.section-title h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800;
  margin-bottom: 12px;
}
.section-title .accent { color: var(--gold-400); }
.section-title p { color: var(--text-secondary); font-size: 1.05rem; max-width: 650px; margin: 0 auto; }
.section-divider {
  width: 60px; height: 3px; margin: 16px auto;
  background: linear-gradient(90deg, var(--gold-500), var(--emerald-500));
  border-radius: 2px;
}

/* Cards */
section { padding: 80px 0; }
.card {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 32px;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { border-color: rgba(212,168,67,0.2); transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.card:hover::before { opacity: 1; }

/* Key Points Grid */
.key-points-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.key-point-card { padding: 28px; }
.key-point-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 16px;
}
.icon-green { background: rgba(16,185,129,0.12); }
.icon-gold { background: rgba(212,168,67,0.12); }
.icon-red { background: rgba(193,39,45,0.12); }
.icon-blue { background: rgba(59,130,246,0.12); }
.key-point-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.key-point-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Articles Accordion */
.accordion { display: flex; flex-direction: column; gap: 12px; }
.accordion-item {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); overflow: hidden; transition: all 0.3s;
}
.accordion-item:hover { border-color: rgba(212,168,67,0.15); }
.accordion-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; cursor: pointer; gap: 16px;
  background: transparent; border: none; width: 100%;
  color: var(--text-primary); font-size: 1rem; font-weight: 600;
  text-align: inherit; font-family: inherit; transition: background 0.2s;
}
.rtl .accordion-header { font-family: 'Noto Sans Arabic', sans-serif; }
.accordion-header:hover { background: rgba(255,255,255,0.02); }
.accordion-badge {
  flex-shrink: 0; padding: 4px 14px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 700;
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-700));
  color: var(--emerald-500);
}
.accordion-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.05); display: flex;
  align-items: center; justify-content: center;
  transition: transform 0.3s; font-size: 0.8rem; color: var(--text-muted);
}
.accordion-item.active .accordion-icon { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
}
.accordion-content {
  padding: 0 24px 24px; color: var(--text-secondary);
  font-size: 0.95rem; line-height: 1.9; border-top: 1px solid var(--glass-border);
  padding-top: 20px; margin-top: 0;
}
.accordion-content ul { padding-left: 20px; }
.rtl .accordion-content ul { padding-right: 20px; padding-left: 0; }
.accordion-content li { margin-bottom: 8px; }
.accordion-content strong { color: var(--text-primary); }

/* Sanctions Table */
.table-wrapper {
  overflow-x: auto; border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.92rem;
}
th {
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-800));
  color: var(--gold-400); padding: 16px 20px;
  font-weight: 700; text-align: inherit; white-space: nowrap;
}
td {
  padding: 14px 20px; border-bottom: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
tr:hover td { background: rgba(255,255,255,0.02); }
.severity-high {
  color: #ef4444; font-weight: 700;
}
.severity-medium {
  color: var(--gold-400); font-weight: 600;
}
.severity-low {
  color: var(--emerald-500); font-weight: 600;
}

/* Who Is Affected */
.affected-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.affected-card {
  text-align: center; padding: 32px 20px;
}
.affected-emoji {
  font-size: 2.5rem; margin-bottom: 14px; display: block;
}
.affected-card h3 { font-size: 1.1rem; margin-bottom: 8px; font-weight: 700; }
.affected-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* Timeline */
.timeline { position: relative; padding-left: 40px; }
.rtl .timeline { padding-right: 40px; padding-left: 0; }
.timeline::before {
  content: ''; position: absolute; left: 14px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(180deg, var(--gold-500), var(--emerald-500));
}
.rtl .timeline::before { left: auto; right: 14px; }
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-dot {
  position: absolute; left: -33px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold-500); border: 3px solid var(--bg-dark);
  box-shadow: 0 0 10px rgba(212,168,67,0.3);
}
.rtl .timeline-dot { left: auto; right: -33px; }
.timeline-item h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--gold-400); }
.timeline-item p { color: var(--text-secondary); font-size: 0.95rem; }

/* Definitions */
.definitions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.def-card { padding: 24px; }
.def-term {
  font-weight: 700; font-size: 1.05rem; margin-bottom: 6px;
  color: var(--gold-400);
}
.def-desc { color: var(--text-secondary); font-size: 0.92rem; }

/* FAQ */
.faq-grid { display: flex; flex-direction: column; gap: 12px; }

/* Footer */
footer {
  background: var(--bg-card); border-top: 1px solid var(--glass-border);
  padding: 40px 0; text-align: center; color: var(--text-muted);
  font-size: 0.85rem;
}
footer .morocco-flag { font-size: 1.2rem; margin-bottom: 8px; }

/* Alert Box */
.alert-box {
  background: rgba(212,168,67,0.06);
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: var(--radius-sm); padding: 24px 28px;
  margin: 30px 0; display: flex; gap: 16px; align-items: flex-start;
}
.alert-icon { font-size: 1.5rem; flex-shrink: 0; }
.alert-box p { color: var(--text-secondary); font-size: 0.95rem; }
.alert-box strong { color: var(--gold-400); }

/* Animations */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0%,100% { background-position: 0% center; } 50% { background-position: 200% center; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.animate-in.visible { opacity: 1; transform: translateY(0); }

/* Scroll to top */
.scroll-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--bg-dark); border: none; cursor: pointer;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px);
  transition: all 0.3s; box-shadow: 0 4px 20px rgba(212,168,67,0.3);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); }

/* Responsive */
@media (max-width: 768px) {
  .hero { min-height: 60vh; }
  section { padding: 50px 0; }
  .key-points-grid, .affected-grid, .definitions-grid { grid-template-columns: 1fr; }
  .lang-toggle { top: 10px; right: 10px; }
  .lang-btn { padding: 8px 16px; font-size: 0.8rem; }
  .table-wrapper { font-size: 0.82rem; }
  th, td { padding: 10px 12px; }
  .alert-box { flex-direction: column; }
}
