:root {
  --green: #2e7d52;
  --green-light: #e8f5ee;
  --text: #1c1c1c;
  --muted: #5c5c5c;
  --border: #e5e5e5;
  --bg: #fafafa;
  --white: #fff;
  --max: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Tahoma, 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-head {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green);
}
.brand span { color: var(--text); font-weight: 400; font-size: 0.85rem; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.85rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--green); text-decoration: none; }

/* Hero */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 36px;
  text-align: center;
}
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 14px;
}
.hero .lead {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 540px;
  margin: 0 auto 24px;
}
.stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 20px;
}
.stats div { text-align: center; }
.stats strong { display: block; font-size: 1.25rem; color: var(--green); }
.stats span { font-size: 0.8rem; color: var(--muted); }

/* Semesters (mnhaji-style cards) */
.wrap-wide { max-width: 480px; }
.semesters {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 32px;
  text-align: center;
}
.semesters-title {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 2px dashed var(--border);
}
.term-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.term-card {
  width: 150px;
  cursor: pointer;
  user-select: none;
}
.term-card:hover .term-img { outline-color: #ccc; }
.term-card:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.term-img {
  border: 4px solid var(--white);
  outline: 1px solid #ddd;
  background: #f8f8f8;
  margin-bottom: 10px;
  overflow: hidden;
}
.term-img img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  display: block;
}
.term-card span {
  display: block;
  font-size: 0.88rem;
  color: #555;
}

/* Sections */
section { padding: 36px 0; }
section:nth-child(even) { background: var(--white); border-block: 1px solid var(--border); }
h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.section-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Services */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.service {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
}
.service h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.service p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* Grades */
.grades { display: flex; flex-wrap: wrap; gap: 8px; }
.grade {
  font-size: 0.82rem;
  padding: 6px 12px;
  background: var(--green-light);
  color: var(--green);
  border-radius: 4px;
  border: 1px solid transparent;
}

/* SEO */
.seo h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green);
  margin: 20px 0 8px;
}
.seo p { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }
.note {
  background: var(--green-light);
  border-right: 3px solid var(--green);
  padding: 12px 14px;
  font-size: 0.88rem;
  margin: 16px 0;
  border-radius: 0 4px 4px 0;
}

/* Roadmap */
.roadmap { list-style: none; }
.roadmap li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.roadmap li:last-child { border-bottom: none; }
.status {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  margin-top: 2px;
}
.status.done { background: var(--green-light); color: var(--green); }
.status.work { background: #fff3e0; color: #e65100; }
.status.soon { background: #f0f0f0; color: var(--muted); }
.roadmap strong { display: block; font-size: 0.9rem; color: var(--text); }

/* Footer */
.site-foot {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .services { grid-template-columns: 1fr; }
  .nav { display: none; }
  .hero h1 { font-size: 1.35rem; }
}
