/* ============================================================
   Heyat Foundation — Custom Theme (Emerald & White)
   ============================================================ */

/* ── CSS Variables ── */
:root {
  --emerald-50:  #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;

  --primary:       var(--emerald-600);
  --primary-hover: var(--emerald-700);
  --primary-light: var(--emerald-100);
  --primary-bg:    var(--emerald-50);
}

/* ── Base Typography ── */
body {
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Links ── */
a { color: var(--primary); }
a:hover { color: var(--primary-hover); text-decoration: underline; }

/* ── Logo ── */
.logo a,
.logo span {
  color: var(--primary) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Navigation border ── */
.nav {
  border-bottom: 2px solid var(--emerald-100);
}

/* ── Active / hover menu items ── */
.menu__item a:hover,
.menu__item.active a {
  color: var(--primary) !important;
}

/* ── Home hero info box ── */
.home-info {
  background: linear-gradient(135deg, var(--emerald-50) 0%, #ffffff 100%);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 2rem 2.5rem;
  margin-bottom: 2.5rem;
}

/* ── Post titles ── */
.post-title { color: var(--emerald-800); }
.post-content a { color: var(--primary); }

/* ── Tags ── */
.post-tags a {
  background: var(--primary-light);
  color: var(--emerald-800) !important;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
}

/* ── Buttons / read-more ── */
.read-more-link a,
.button {
  background: var(--primary);
  color: #fff !important;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  text-decoration: none !important;
  transition: background 0.2s;
}
.read-more-link a:hover,
.button:hover { background: var(--primary-hover); }

/* ── Footer ── */
.footer {
  border-top: 2px solid var(--emerald-100);
  color: #555;
}

/* ============================================================
   Program Cards
   ============================================================ */

.programs-intro {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 2rem;
  max-width: 680px;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 3rem;
}

.program-card {
  background: #fff;
  border: 1px solid var(--emerald-200);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.14);
}

.program-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--emerald-800);
  margin: 0 0 0.6rem;
}

.program-card__title a {
  color: inherit;
  text-decoration: none;
}

.program-card__title a:hover { color: var(--primary); }

.program-card__desc {
  color: #555;
  font-size: 0.93rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.program-card__meta {
  border-top: 1px solid var(--emerald-100);
  padding-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: #444;
}

.program-card__meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.program-card__meta-icon { font-size: 1em; }

/* ── Audience badge ── */
.program-card__audience {
  display: inline-block;
  margin-top: 0.8rem;
  background: var(--primary-light);
  color: var(--emerald-800);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  align-self: flex-start;
}

/* ============================================================
   Contact Page
   ============================================================ */

.contact-box {
  background: var(--emerald-50);
  border: 1px solid var(--emerald-200);
  border-radius: 14px;
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  max-width: 520px;
}

.contact-box h3 {
  color: var(--emerald-800);
  margin-top: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.97rem;
  color: #333;
  margin-bottom: 0.75rem;
}

.contact-item a { color: var(--primary); }

/* ============================================================
   RTL — Persian (Farsi) overrides
   ============================================================ */

[lang="fa"],
[dir="rtl"] {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif;
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .home-info {
  border-left: none;
  border-right: 4px solid var(--primary);
}

[dir="rtl"] .program-card__meta-item {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .contact-item {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .program-card__audience {
  align-self: flex-end;
}

/* ── RTL nav fix ── */
[dir="rtl"] .menu {
  flex-direction: row-reverse;
}
