@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', 'Inter', sans-serif;
  background: #f7f5f0;
  color: #1c1c1c;
  line-height: 1.6;
  direction: rtl;
}
body.en { direction: ltr; font-family: 'Inter', 'Tajawal', sans-serif; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ===== CSS VARIABLES ===== */
:root {
  --green: #2d6a4f;
  --green-light: #40916c;
  --green-pale: #d8f3dc;
  --green-bg: #f0f7f4;
  --coral: #e76f51;
  --coral-light: #f4a261;
  --coral-pale: #fef3ef;
  --dark: #1c1c1c;
  --dark2: #2c2c2c;
  --gray: #6b7280;
  --gray-light: #9ca3af;
  --gray-pale: #f3f4f6;
  --border: #e5e7eb;
  --white: #ffffff;
  --cream: #f7f5f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.25; color: var(--dark); }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p { color: var(--gray); line-height: 1.75; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; border: none;
  transition: all var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-light); transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--green); font-weight: 700; }
.btn-white:hover { background: var(--green-pale); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ===== HEADER / NAVBAR ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 26px; font-weight: 800; color: var(--green);
  letter-spacing: -1px; flex-shrink: 0;
}
.nav-logo .dot { color: var(--coral); }
.nav-logo-icon {
  width: 36px; height: 36px; background: var(--green);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 18px;
}
.nav-links {
  display: flex; align-items: center; gap: 4px; flex: 1;
  justify-content: center;
}
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  font-size: 15px; font-weight: 500; color: var(--gray);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--green); background: var(--green-bg);
}
.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lang-switch {
  display: flex; border: 1.5px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.lang-switch button {
  padding: 6px 12px; font-size: 13px; font-weight: 600;
  background: none; border: none; color: var(--gray);
  transition: all var(--transition);
}
.lang-switch button.active { background: var(--green); color: #fff; }
.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 24px; color: var(--dark); padding: 4px;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(145deg, var(--green-bg) 0%, var(--coral-pale) 100%);
  padding: 80px 0 0; overflow: hidden; position: relative;
}
.hero::before {
  content: ''; position: absolute; top: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(45,106,79,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: end; gap: 48px;
}
.hero-content { padding-bottom: 80px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white); color: var(--green);
  padding: 6px 16px; border-radius: 50px;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--green-pale);
  margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.hero h1 { margin-bottom: 16px; font-size: clamp(2.2rem, 4vw, 3.4rem); }
.hero h1 span { color: var(--green); }
.hero-sub {
  font-size: 17px; color: var(--gray); margin-bottom: 36px;
  max-width: 480px; line-height: 1.8;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; margin-top: 48px;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.hero-stat .num { font-size: 1.8rem; font-weight: 800; color: var(--green); }
.hero-stat .lbl { font-size: 13px; color: var(--gray); margin-top: 2px; }
.hero-visual {
  display: flex; flex-direction: column; gap: 16px;
  padding-bottom: 0; position: relative;
}
.hero-img-main {
  border-radius: 24px 24px 0 0; overflow: hidden;
  height: 380px; background: linear-gradient(160deg, #b7e4c7, #52b788);
  display: flex; align-items: center; justify-content: center;
  font-size: 100px; box-shadow: var(--shadow-lg);
}
.hero-cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero-mini-card {
  background: var(--white); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 12px;
}
.hero-mini-card .icon { font-size: 28px; }
.hero-mini-card .text .name { font-size: 13px; font-weight: 700; color: var(--dark); }
.hero-mini-card .text .tag { font-size: 11px; color: var(--green); font-weight: 500; }

/* ===== STATS BAR ===== */
.stats-bar { background: var(--green); padding: 28px 0; }
.stats-bar-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; text-align: center;
}
.stat-item { padding: 8px 16px; }
.stat-item:not(:last-child) {
  border-left: 1px solid rgba(255,255,255,0.15);
}
body.en .stat-item:not(:last-child) {
  border-left: none; border-right: 1px solid rgba(255,255,255,0.15);
}
.stat-item .num { font-size: 2rem; font-weight: 800; color: #fff; }
.stat-item .lbl { font-size: 13px; color: rgba(255,255,255,0.75); margin-top: 4px; }

/* ===== SECTION HEADER ===== */
.section-header { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  display: inline-block; background: var(--green-bg);
  color: var(--green); font-size: 13px; font-weight: 700;
  padding: 4px 14px; border-radius: 50px; margin-bottom: 12px;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { max-width: 540px; margin: 0 auto; font-size: 16px; }

/* ===== CONDITIONS ===== */
.conditions-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
}
.cond-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px 16px;
  text-align: center; cursor: pointer;
  transition: all var(--transition); display: flex;
  flex-direction: column; align-items: center; gap: 10px;
}
.cond-card:hover, .cond-card.active {
  border-color: var(--green); background: var(--green-bg);
  transform: translateY(-3px); box-shadow: var(--shadow-md);
}
.cond-card .icon { font-size: 36px; }
.cond-card .name { font-size: 14px; font-weight: 700; color: var(--dark); }
.cond-card .count { font-size: 12px; color: var(--gray-light); }

/* ===== STORY CARDS ===== */
.stories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.story-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  transition: all var(--transition); display: flex; flex-direction: column;
}
.story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green-pale); }
.story-card-img {
  height: 180px; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}
.story-card-img.g1 { background: linear-gradient(135deg, #d8f3dc, #95d5b2); }
.story-card-img.g2 { background: linear-gradient(135deg, #fde8d8, #f9c784); }
.story-card-img.g3 { background: linear-gradient(135deg, #dde3f5, #b4c6e7); }
.story-card-img.g4 { background: linear-gradient(135deg, #fce4ec, #f48fb1); }
.story-card-img.g5 { background: linear-gradient(135deg, #e8f5e9, #a5d6a7); }
.story-card-img.g6 { background: linear-gradient(135deg, #fff3e0, #ffcc80); }
.story-tag {
  position: absolute; top: 12px;
  background: rgba(45,106,79,0.9); color: #fff;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 50px; backdrop-filter: blur(4px);
}
body[dir="rtl"] .story-tag { right: 12px; }
body[dir="ltr"] .story-tag { left: 12px; }
.story-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.story-title { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 8px; line-height: 1.5; }
.story-excerpt { font-size: 13px; color: var(--gray); line-height: 1.7; flex: 1; margin-bottom: 16px; }
.story-footer { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.story-author { font-size: 13px; font-weight: 600; color: var(--dark); }
.story-date { font-size: 11px; color: var(--gray-light); }
.story-likes { font-size: 13px; color: var(--coral); font-weight: 600; margin-right: auto; }
body.en .story-likes { margin-right: 0; margin-left: auto; }

/* ===== HOW IT WORKS ===== */
.how-bg { background: var(--green-bg); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step-card { text-align: center; }
.step-num {
  width: 60px; height: 60px; background: var(--green);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 22px; font-weight: 800;
  color: #fff; margin: 0 auto 20px;
}
.step-icon {
  width: 80px; height: 80px; background: var(--white);
  border-radius: 20px; display: flex; align-items: center;
  justify-content: center; font-size: 36px;
  margin: 0 auto 20px; box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.step-card h3 { margin-bottom: 8px; }

/* ===== TESTIMONIAL ===== */
.testimonial-strip {
  background: var(--green); padding: 60px 0; text-align: center;
}
.testimonial-strip blockquote {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: #fff; font-weight: 300; max-width: 700px;
  margin: 0 auto 24px; line-height: 1.6;
}
.testimonial-strip .author {
  color: rgba(255,255,255,0.75); font-size: 14px; font-weight: 500;
}

/* ===== SHARE CTA ===== */
.share-cta {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  border-radius: var(--radius-lg); padding: 56px 48px;
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 40px;
}
.share-cta h2 { color: #fff; margin-bottom: 8px; }
.share-cta p { color: rgba(255,255,255,0.8); font-size: 16px; }

/* ===== FOOTER ===== */
.footer { background: var(--dark); padding: 60px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo {
  font-size: 24px; font-weight: 800; color: #fff;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.footer-brand .logo .dot { color: var(--coral); }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 14px; line-height: 1.7; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.social-icon {
  width: 36px; height: 36px; background: rgba(255,255,255,0.08);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; color: rgba(255,255,255,0.6);
  font-size: 16px; transition: all var(--transition);
}
.social-icon:hover { background: var(--green); color: #fff; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.5); font-size: 14px; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--green-pale); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; color: rgba(255,255,255,0.35); font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,0.35); }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ===== STORIES PAGE ===== */
.page-hero {
  background: linear-gradient(145deg, var(--green-bg), var(--coral-pale));
  padding: 60px 0;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { font-size: 17px; max-width: 520px; }
.filters-bar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 20px 0; position: sticky; top: 68px; z-index: 50;
}
.filters-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.filter-tab {
  padding: 8px 18px; border-radius: 50px; font-size: 14px;
  font-weight: 600; border: 1.5px solid var(--border);
  background: none; color: var(--gray); transition: all var(--transition);
}
.filter-tab:hover, .filter-tab.active {
  border-color: var(--green); background: var(--green); color: #fff;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-pale); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 8px 14px; min-width: 220px;
}
.search-box input {
  border: none; background: none; outline: none;
  font-size: 14px; color: var(--dark); flex: 1;
  font-family: inherit; direction: inherit;
}
.search-box input::placeholder { color: var(--gray-light); }
.search-icon { color: var(--gray-light); font-size: 16px; }
.stories-page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.load-more-wrap { text-align: center; padding: 48px 0 0; }
.featured-story {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr;
  margin-bottom: 40px; box-shadow: var(--shadow-md);
}
.featured-story-img {
  height: 100%; min-height: 300px;
  background: linear-gradient(135deg, #b7e4c7, #52b788);
  display: flex; align-items: center; justify-content: center;
  font-size: 120px;
}
.featured-story-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-tag {
  display: inline-block; background: var(--green-bg);
  color: var(--green); font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 50px; margin-bottom: 16px;
}
.featured-story-body h2 { font-size: 1.5rem; margin-bottom: 12px; }
.featured-story-body p { font-size: 15px; margin-bottom: 24px; }

/* ===== PAGE NAV (breadcrumb) ===== */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gray-light); padding: 16px 0;
}
.breadcrumb a { color: var(--green); }
.breadcrumb span { color: var(--gray-light); }

/* ===== EMPTY / PAGINATION ===== */
.pagination { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 40px 0; }
.page-btn {
  width: 40px; height: 40px; border-radius: 8px;
  border: 1.5px solid var(--border); background: none;
  font-size: 14px; font-weight: 600; color: var(--gray);
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { border-color: var(--green); background: var(--green); color: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .conditions-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .stats-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .stories-grid, .stories-page-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .share-cta { grid-template-columns: 1fr; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .featured-story { grid-template-columns: 1fr; }
  .featured-story-img { min-height: 200px; }
}
@media (max-width: 520px) {
  .conditions-grid { grid-template-columns: repeat(2, 1fr); }
  .stories-grid, .stories-page-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .hero-btns { flex-direction: column; }
}
