/* ───────────────────────────────────────────────────────────────
 * Tanmiya Mahd — Shared design system (Ehsan-inspired)
 * Loaded by every public HTML page. Classes are namespaced with `.tm-`
 * to avoid collisions with existing page-specific styles.
 * ─────────────────────────────────────────────────────────────── */

:root {
  /* Brand colors — forest green + saudi gold */
  --tm-forest-50:  #f0f7f4;
  --tm-forest-100: #d8ece6;
  --tm-forest-300: #4d7a70;
  --tm-forest-500: #2D5A4C;
  --tm-forest-700: #1f4035;
  --tm-forest-900: #152b24;

  --tm-gold-50:  #FEFBE8;
  --tm-gold-100: #FDF5D0;
  --tm-gold-300: #D4AF37;
  --tm-gold-500: #A88B25;
  --tm-gold-700: #7D6818;

  --tm-cream:    #F9F8F3;
  --tm-cream-2:  #FBF9EE;

  --tm-text:     #111827;
  --tm-muted:    #6b7280;
  --tm-line:     #eef0ef;

  /* Brand gradients used across CTAs */
  --tm-grad-gold:   linear-gradient(135deg, #A88B25 0%, #D4AF37 100%);
  --tm-grad-forest: linear-gradient(135deg, #1f4035 0%, #2D5A4C 100%);

  --tm-radius:    16px;
  --tm-radius-lg: 22px;
  --tm-shadow:    0 12px 32px -18px rgba(45,90,76,.28);
  --tm-shadow-lg: 0 22px 44px -22px rgba(45,90,76,.36);
}

/* ────────  Section helpers — full-bleed background, constrained content  ──────── */
.tm-section {
  padding-block: 72px; padding-inline: 18px;
  /* No max-width here — the section itself spans the viewport so any
     background (color, gradient, image) reaches the screen edges. */
}
/* Every direct child is centered & capped at the content width.
   This keeps the layout identical to before but lets backgrounds bleed. */
.tm-section > * { max-width: 1100px; margin-inline: auto; }

@media (max-width: 640px) {
  .tm-section { padding-block: 48px; padding-inline: 14px; }
}
.tm-section--narrow > * { max-width: 880px; }
.tm-section-title { text-align:center; margin-bottom: 40px; position: relative; }
/* Eyebrow hidden site-wide per user feedback — the h2 alone is cleaner */
.tm-section-title .tm-eyebrow { display: none; }

/* ───────  Animated plant watermark behind every main heading  ───────
 * A faint forest seedling that gently sways/breathes behind the h2.
 * Unified across all pages via the shared .tm-section-title container.
 */
.tm-section-title::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 132px; height: 152px;
  transform: translate(-50%, -56%) rotate(-2.5deg) scale(1);
  transform-origin: 50% 92%;
  z-index: 0;
  pointer-events: none;
  opacity: .08;
  background-repeat: no-repeat; background-position: center bottom; background-size: contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120' fill='%232D5A4C'><ellipse cx='50' cy='114' rx='26' ry='5' fill='%237D6818' opacity='.7'/><rect x='47.5' y='52' width='5' height='62' rx='2.5'/><path d='M50 96 C30 94 17 79 15 59 C39 61 53 76 50 96 Z'/><path d='M50 86 C70 84 83 69 85 49 C61 51 47 66 50 86 Z'/><path d='M50 70 C33 68 22 55 21 37 C42 39 53 54 50 70 Z'/><path d='M50 60 C67 58 78 45 79 27 C58 29 47 44 50 60 Z'/><path d='M50 46 C43 39 40 26 45 13 C55 22 57 35 50 46 Z'/><circle cx='50' cy='12' r='5' fill='%23A88B25'/></svg>");
  animation: tm-bg-plant-sway 7.5s ease-in-out infinite;
}
.tm-section-title > * { position: relative; z-index: 1; }
@keyframes tm-bg-plant-sway {
  0%, 100% { transform: translate(-50%, -56%) rotate(-2.5deg) scale(1); }
  50%      { transform: translate(-50%, -58%) rotate(2.5deg) scale(1.045); }
}
@media (prefers-reduced-motion: reduce) {
  .tm-section-title::after { animation: none; transform: translate(-50%, -56%) rotate(0); }
}

/* ───────  Brand headline ornament — leaf + gold seed  ───────
 * Unique to us: forest leaf (نبتة Tanmiya) with a small gold sparkle
 * (dot of value). Sits before every h2 inline in RTL using ::before.
 */
.tm-section-title h2 {
  display: inline-flex; align-items: center; gap: 12px;
}
.tm-section-title h2::before {
  content: '';
  width: 34px; height: 34px;
  flex-shrink: 0;
  /* Refined ornament — stylised leaf with central vein + gold drop accent */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' fill='none'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%25' stop-color='%23A88B25'/><stop offset='100%25' stop-color='%23D4AF37'/></linearGradient><linearGradient id='g2' x1='0' y1='1' x2='1' y2='0'><stop offset='0%25' stop-color='%231f4035'/><stop offset='100%25' stop-color='%232D5A4C'/></linearGradient></defs><path d='M24 4 C12 4 4 14 4 24 C 4 30 8 32 14 32 C 26 32 32 22 32 12 C 32 8 28 4 24 4 Z' fill='url(%23g2)'/><path d='M30 8 Q 20 16 8 28' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' opacity='.55' fill='none'/><path d='M22 12 Q 18 16 16 22' stroke='%23ffffff' stroke-width='1.1' stroke-linecap='round' opacity='.35' fill='none'/><circle cx='29' cy='9' r='4' fill='url(%23g1)'/><circle cx='28' cy='8' r='1.4' fill='%23ffffff' opacity='.85'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: contain;
  transform: rotate(0deg);
  animation: tm-ornament-bob 4s ease-in-out infinite;
}
@keyframes tm-ornament-bob {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(3deg)  translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .tm-section-title h2::before { animation: none; transform: rotate(0); }
}

/* Standalone leaf ornament — attach to any inner-page main section <h2>
 * (matches the home-page section headings without restructuring markup). */
h2.tm-leaf-head { display: inline-flex; align-items: center; gap: 12px; position: relative; }
h2.tm-leaf-head::before {
  content: '';
  width: 32px; height: 32px; flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' fill='none'><defs><linearGradient id='g1' x1='0' y1='0' x2='1' y2='1'><stop offset='0%25' stop-color='%23A88B25'/><stop offset='100%25' stop-color='%23D4AF37'/></linearGradient><linearGradient id='g2' x1='0' y1='1' x2='1' y2='0'><stop offset='0%25' stop-color='%231f4035'/><stop offset='100%25' stop-color='%232D5A4C'/></linearGradient></defs><path d='M24 4 C12 4 4 14 4 24 C 4 30 8 32 14 32 C 26 32 32 22 32 12 C 32 8 28 4 24 4 Z' fill='url(%23g2)'/><path d='M30 8 Q 20 16 8 28' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' opacity='.55' fill='none'/><path d='M22 12 Q 18 16 16 22' stroke='%23ffffff' stroke-width='1.1' stroke-linecap='round' opacity='.35' fill='none'/><circle cx='29' cy='9' r='4' fill='url(%23g1)'/><circle cx='28' cy='8' r='1.4' fill='%23ffffff' opacity='.85'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: contain;
  animation: tm-ornament-bob 4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { h2.tm-leaf-head::before { animation: none; } }
.tm-section-title h2 {
  font-weight: 900; font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--tm-text); letter-spacing:-.015em; line-height:1.3;
}
.tm-section-title h2 .tm-accent { color: var(--tm-forest-500); }
.tm-section-title p {
  margin-top: 10px; font-size:.92rem; color: var(--tm-muted);
  max-width: 560px; margin-inline:auto; line-height:1.7;
}

/* Unify standalone leaf headings (inner pages) with the section-title
 * typography so every section headline looks identical site-wide. */
h2.tm-leaf-head {
  font-weight: 900; font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--tm-text); letter-spacing: -.015em; line-height: 1.3;
}
h2.tm-leaf-head .tm-accent { color: var(--tm-forest-500); }

/* ─────── Scroll reveal — shared site-wide (JS in _supabase-bootstrap.js) ───────
 * Elements with .sr fade/slide in when scrolled into view and out when away.
 * Reduced-motion users (and no-JS fallback in the bootstrap) see content fully. */
.sr { opacity: 0; transform: translateY(28px); transition: opacity .65s cubic-bezier(.23,1,.32,1), transform .65s cubic-bezier(.23,1,.32,1); }
.sr.visible { opacity: 1; transform: translateY(0); }
.sr-delay-1 { transition-delay: .1s; }
.sr-delay-2 { transition-delay: .2s; }
.sr-delay-3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .sr { opacity: 1; transform: none; transition: none; } }

/* ────────  Opportunity card (Ehsan-style)  ──────── */
.tm-opp-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width:640px) { .tm-opp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width:1024px) { .tm-opp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tm-opp {
  background: #fff; border: 1px solid var(--tm-line); border-radius: var(--tm-radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.tm-opp:hover { transform: translateY(-4px); box-shadow: var(--tm-shadow-lg); border-color: #dceee7; }

.tm-opp__media { position: relative; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--tm-forest-300), var(--tm-forest-500));
  overflow: hidden; }

/* Slim brand band variant — no cover image (used on homepage) */
.tm-opp--noimage .tm-opp__media {
  aspect-ratio: auto;
  height: 70px;
  background: linear-gradient(135deg, var(--tm-forest-700) 0%, var(--tm-forest-500) 55%, var(--tm-gold-500) 130%);
}
.tm-opp--noimage .tm-opp__media::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 30%, rgba(212,175,55,.18) 0%, transparent 50%);
  pointer-events: none;
}
.tm-opp__media img { width:100%; height:100%; object-fit: cover; display: block; }
.tm-opp__fallback { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color: rgba(255,255,255,.45); }
.tm-opp__cat { position:absolute; top:12px; right:12px;
  background: rgba(255,255,255,.94); color: var(--tm-forest-500);
  font-size: 10.5px; font-weight: 900; padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.10); }

.tm-opp__progress { position:absolute; left:0; right:0; bottom:0; height:30px; background:#e9ecef; }
.tm-opp__progress .bar {
  position:absolute; inset:0 auto 0 0;
  background: linear-gradient(90deg, var(--tm-gold-300), var(--tm-forest-500));
  display:flex; align-items:center; justify-content:flex-end;
  padding-inline-end:10px; color:#fff; font-size:11.5px; font-weight:900;
  min-width:38px; transition: width .8s ease;
}
.tm-opp__progress .bar.empty {
  background: transparent; color: var(--tm-forest-500);
  padding-inline-end:0; padding-inline-start:10px; justify-content:flex-start;
}

.tm-opp__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tm-opp__meta { display:flex; align-items:center; justify-content:space-between;
  font-size:10.5px; font-weight:700; color: var(--tm-muted); }
.tm-opp__case  { color: var(--tm-forest-500); direction: ltr; font-weight:800; }
.tm-opp__since { color: #16a34a; font-weight:800; }
.tm-opp__title { font-size: .95rem; font-weight: 900; color: var(--tm-forest-500); line-height: 1.4;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.66em; margin:0; }
.tm-opp__title a { color: inherit; text-decoration: none; }
.tm-opp__title a:hover { color: var(--tm-forest-700); }

.tm-opp__stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px 0; border-top: 1px solid #f1f5f4; border-bottom: 1px solid #f1f5f4;
  text-align:center;
}
.tm-opp__stats .lbl { font-size: 10.5px; color: var(--tm-forest-500); font-weight: 700; }
.tm-opp__stats .val { font-size: 13px; color: var(--tm-text); font-weight: 900; direction: ltr;
  display: inline-flex; align-items: baseline; gap: 3px; }

.tm-opp__actions { display:flex; gap:6px; }
.tm-opp__amt {
  flex:1; min-width:0; border:1.5px solid #e5e7eb; border-radius:12px;
  padding:9px 12px; font-size:13px; font-family:'Tajawal',sans-serif;
  background:#fafbfa; color:var(--tm-text); outline:none;
  transition: border-color .15s, background .15s;
}
.tm-opp__amt:focus { border-color: var(--tm-forest-500); background:#fff; box-shadow: 0 0 0 3px rgba(45,90,76,.08); }
.tm-opp__go {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 12px;
  background: var(--tm-grad-gold); color:#fff; font-weight: 900; font-size: 13px;
  border: none; cursor: pointer; transition: filter .15s, transform .1s;
  white-space: nowrap; box-shadow: 0 4px 14px -4px rgba(212,175,55,.45);
}
.tm-opp__go:hover { filter: brightness(1.06); }
.tm-opp__go:active { transform: scale(.97); }
.tm-opp__cart {
  flex: 0 0 auto; width: 40px; border: 1.5px solid #e5e7eb; border-radius: 12px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: var(--tm-muted); cursor: pointer; transition: all .15s;
}
.tm-opp__cart:hover { border-color: var(--tm-gold-300); color: var(--tm-gold-500); background: var(--tm-gold-50); }

.tm-opp__details {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 800; color: var(--tm-forest-500); padding: 11px 12px;
  border-top: 1px solid #f1f5f4; text-decoration: none; transition: background .15s;
}
.tm-opp__details:hover { background: #f7faf9; }

/* ────────  Categories tile (image-tinted, Ehsan)  ──────── */
.tm-cat-grid { display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width:640px) { .tm-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tm-cat {
  position: relative; aspect-ratio: 4/3; border-radius: 18px; overflow: hidden;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 26px -18px rgba(0,0,0,.35);
  transition: transform .25s;
}
.tm-cat:hover { transform: translateY(-4px); }
.tm-cat__bg { position:absolute; inset:0; background-size:cover; background-position:center; transition: transform .6s; }
.tm-cat:hover .tm-cat__bg { transform: scale(1.06); }
.tm-cat__gradient { position:absolute; inset:0;
  background: linear-gradient(to top, rgba(45,90,76,.92) 0%, rgba(45,90,76,.55) 40%, rgba(45,90,76,.05) 100%); }
.tm-cat__text { position:absolute; inset-inline-start:14px; inset-inline-end:14px; bottom:14px; color:#fff; z-index:2; }
.tm-cat__text h4 { font-weight:900; font-size:14px; margin:0 0 4px; }
.tm-cat__text p  { font-weight:600; font-size:11px; margin:0; color:rgba(255,255,255,.85); line-height:1.5; }
.tm-cat__arrow { position:absolute; bottom:12px; inset-inline-end:12px; width:24px; height:24px; border-radius:50%;
  background: rgba(255,255,255,.20); color:#fff; display:flex; align-items:center; justify-content:center;
  backdrop-filter: blur(4px); }

/* ────────  Service tile (small icon card, Ehsan)  ──────── */
.tm-svc-grid { display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width:640px) { .tm-svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width:1024px) { .tm-svc-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tm-svc {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px 14px 16px; background: #fff; border: 1px solid var(--tm-line);
  border-radius: 14px; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tm-svc:hover { transform: translateY(-3px); border-color: #dceee7; box-shadow: var(--tm-shadow); }
.tm-svc__icon { width: 36px; height: 36px; border-radius: 10px;
  background: var(--tm-forest-50); color: var(--tm-forest-500);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tm-svc__title { font-weight: 900; font-size: 13.5px; color: var(--tm-forest-700); margin: 4px 0 0; }
.tm-svc__sub   { font-size: 11px; color: var(--tm-muted); font-weight: 600; margin: 0; line-height: 1.5; }

/* ───────────────────────────────────────────────────────────────
 * Nav polish — Ehsan-inspired, applied via attribute selectors so
 * no HTML changes needed. Targets the existing [data-nav], [data-nav-group]
 * pattern shared across all 19 public pages.
 * ─────────────────────────────────────────────────────────────── */

/* All top-level nav links + group buttons share a position:relative
   so we can add a sliding underline via ::after. */
header [data-nav]:not(.tm-navlink),
header [data-nav-group] > button:not(.tm-navlink) {
  position: relative !important;
  overflow: visible !important;
  transition: color .2s ease, background .2s ease;
}

/* Sliding underline — grows from center on hover, locks in for active */
header [data-nav]:not(.tm-navlink)::after,
header [data-nav-group] > button:not(.tm-navlink)::after {
  content: '';
  position: absolute;
  left: 50%; right: 50%;
  bottom: 2px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--tm-gold-300), var(--tm-forest-500));
  border-radius: 2px;
  transition: left .28s cubic-bezier(.4,0,.2,1), right .28s cubic-bezier(.4,0,.2,1), opacity .2s;
  opacity: 0;
  pointer-events: none;
}
header [data-nav]:not(.tm-navlink):hover::after,
header [data-nav-group] > button:not(.tm-navlink):hover::after,
header .nav-item:hover > button:not(.tm-navlink)::after,
header .nav-item:focus-within > button:not(.tm-navlink)::after {
  left: 12%; right: 12%; opacity: 1;
}

/* Active state — JS adds inline color #2D5A4C (or #7D6818 for donate).
   We override with a STRONG solid-pill look matching Ehsan's "الرئيسية".
   The hidden underline is preserved as a fallback for keyboard focus. */
header [data-nav][style*="2D5A4C"],
header [data-nav-group][style*="2D5A4C"] > button {
  background: var(--tm-forest-500) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px -4px rgba(45,90,76,.45);
}
header [data-nav][style*="2D5A4C"]:hover,
header [data-nav-group][style*="2D5A4C"] > button:hover {
  background: var(--tm-forest-700) !important;
  color: #fff !important;
}
/* Donate active variant (gold pill) */
header [data-nav="donate"][style*="7D6818"],
header [data-nav="donate"][style*="FEFBE8"] {
  background: var(--tm-grad-gold) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px -4px rgba(212,175,55,.5);
}
/* Hide the underline pseudo when the pill background is solid */
header [data-nav][style*="2D5A4C"]::after,
header [data-nav-group][style*="2D5A4C"] > button::after,
header [data-nav="donate"][style*="7D6818"]::after,
header [data-nav="donate"][style*="FEFBE8"]::after { display: none; }

/* Subtle lift on hover (non-active items) */
header [data-nav]:not(.tm-navlink):hover,
header [data-nav-group] > button:not(.tm-navlink):hover {
  color: var(--tm-forest-500) !important;
}

/* ───── Nav icon buttons (cart / search) ───── */
header .tm-nav-icon {
  position: relative;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1.5px solid transparent;
  background: transparent; color: var(--tm-forest-500);
  transition: all .2s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
}
header .tm-nav-icon:hover {
  background: var(--tm-forest-50);
  border-color: rgba(45,90,76,.18);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(45,90,76,.5);
}
header .tm-nav-icon svg { width: 18px; height: 18px; }
header .tm-nav-cart-count {
  position: absolute; top: -4px; left: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--tm-grad-gold); color: #fff;
  font-size: 10.5px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  transform: scale(0); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
header .tm-nav-cart-count.visible { transform: scale(1); }

/* ─── Dropdown / mega menu enhancements ─── */
header .nav-drop {
  min-width: 280px !important;
  padding: 8px !important;
  border-radius: 18px !important;
  box-shadow: 0 22px 50px -16px rgba(0,0,0,.20), 0 0 0 1px rgba(0,0,0,.05) !important;
  border: 1px solid rgba(212,175,55,.18) !important;
  background:
    linear-gradient(180deg, rgba(254,251,232,.7) 0%, #fff 30%, #fff 100%) !important;
}

header .nav-drop::before {
  content:''; position:absolute; top:-6px; right:24px; width:12px; height:12px;
  background: linear-gradient(135deg, rgba(254,251,232,.95), #fff);
  border-top: 1px solid rgba(212,175,55,.18);
  border-right: 1px solid rgba(212,175,55,.18);
  transform: rotate(-45deg);
  border-radius: 2px;
}

header .nav-drop a {
  padding: 11px 14px !important;
  font-size: 13px !important;
  border-radius: 12px !important;
  transition: background .15s, color .15s, transform .15s, padding .15s !important;
  position: relative;
}
header .nav-drop a:hover {
  background: linear-gradient(90deg, rgba(212,175,55,.10), rgba(45,90,76,.06)) !important;
  color: var(--tm-forest-700) !important;
  padding-inline-end: 18px !important;     /* shifts text away from edge on hover */
}
header .nav-drop a > span:first-child {
  width: 8px !important; height: 8px !important;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
header .nav-drop a:hover > span:first-child {
  transform: scale(1.35);
}

/* "drop-go" footer link in mega menu — stronger styling */
header .nav-drop .drop-go {
  margin-top: 4px;
  background: var(--tm-forest-50) !important;
  color: var(--tm-forest-500) !important;
  border-top: 1px solid rgba(45,90,76,.08);
}
header .nav-drop .drop-go:hover {
  background: var(--tm-forest-500) !important;
  color: #fff !important;
}

/* ───── Mega-menu: Ehsan-style horizontal icon pills ───── */
header .nav-drop--mega {
  min-width: 480px !important;
  padding: 18px !important;
}
header .nav-drop--mega .mega-title {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--tm-gold-700);
  letter-spacing: .08em;
  margin: 0 4px 10px;
}
header .nav-drop--mega .mega-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
header .nav-drop--mega .mega-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 8px 14px 8px 10px !important;
  background: #fff !important;
  border-radius: 999px !important;
  border: 1.5px solid var(--tm-line) !important;
  text-decoration: none !important;
  color: var(--tm-text) !important;
  font-weight: 800 !important;
  font-size: 12.5px !important;
  transition: all .2s cubic-bezier(.4,0,.2,1) !important;
  flex: 0 0 auto;
}
header .nav-drop--mega .mega-pill:hover {
  border-color: var(--tm-forest-500) !important;
  background: var(--tm-forest-50) !important;
  color: var(--tm-forest-500) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -10px rgba(45,90,76,.5);
  padding-inline-end: 14px !important;     /* reset the global hover shift */
}
header .nav-drop--mega .mp-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--tm-forest-50);
  color: var(--tm-forest-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, color .2s, transform .2s;
}
header .nav-drop--mega .mega-pill:hover .mp-icon {
  background: var(--tm-forest-500);
  color: #fff;
  transform: scale(1.08) rotate(-6deg);
}
header .nav-drop--mega .mp-icon.mp-gold {
  background: var(--tm-gold-50);
  color: var(--tm-gold-700);
}
header .nav-drop--mega .mega-pill:hover .mp-icon.mp-gold {
  background: var(--tm-gold-300);
  color: #fff;
}
header .nav-drop--mega .mp-all {
  border: 1.5px dashed var(--tm-gold-300) !important;
  background: var(--tm-gold-50) !important;
  color: var(--tm-gold-700) !important;
}
header .nav-drop--mega .mp-all:hover {
  background: var(--tm-gold-300) !important;
  color: #fff !important;
  border-color: var(--tm-gold-300) !important;
}
header .nav-drop--mega .mp-all:hover .mp-icon { background: #fff; color: var(--tm-gold-700); }
header .nav-drop--mega .mega-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(45,90,76,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header .nav-drop--mega .mega-footer p {
  font-size: 11px; color: var(--tm-muted); margin: 0;
}

/* Login button — sharper hover */
header a[href="/login"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(212,175,55,.55) !important;
}

/* ────────  Floating quick-donate FAB  ──────── */
.tm-fab {
  position: fixed; top: 92px; left: 14px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: var(--tm-forest-900); color: #fff;
  padding: 9px 14px 9px 9px; border-radius: 999px; border: none; cursor: pointer;
  font-family: 'Tajawal', sans-serif; font-weight: 900; font-size: 12.5px;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.45); transition: transform .2s, background .2s;
}
.tm-fab:hover { background: var(--tm-forest-700); transform: translateY(-2px); }
.tm-fab__ic { width: 26px; height: 26px; border-radius: 50%; background: rgba(212,175,55,.95);
  color: var(--tm-forest-900); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
@media (max-width:480px) { .tm-fab { top: auto; bottom: 84px; padding: 8px 12px 8px 8px; font-size: 11.5px; } }

/* ────────  Hero variants  ──────── */
.tm-hero-cream {
  background: linear-gradient(135deg, #FBF9EE 0%, #F4EED7 100%);
  position: relative; overflow: hidden;
  border-bottom: 1px solid #ece5c3;
}
.tm-hero-cream::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 20%, rgba(212,175,55,.12) 0%, transparent 40%),
              radial-gradient(circle at 10% 80%, rgba(45,90,76,.08) 0%, transparent 45%);
  pointer-events: none;
}

/* ────────────────────────────────────────────
 * Inner-page hero override — all pages with .mini-hero get the cream
 * brand tone matching the homepage. High specificity (body .x) beats
 * the per-page <style> definitions.
 * ──────────────────────────────────────────── */
body .mini-hero,
body section.mini-hero {
  background: linear-gradient(135deg, #FBF9EE 0%, #F4EED7 100%) !important;
  position: relative; overflow: hidden;
  border-bottom: 1px solid #ece5c3;
}
body .mini-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 20%, rgba(212,175,55,.14) 0%, transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(45,90,76,.08) 0%, transparent 50%);
  pointer-events: none;
}
body .mini-hero::after { display: none !important; }

/* Switch text colors inside the mini-hero from white-on-dark to dark-on-cream */
body .mini-hero h1 { color: #152b24 !important; }
body .mini-hero h1 span { color: #A88B25 !important; }
body .mini-hero p { color: #4b5563 !important; }
body .mini-hero nav,
body .mini-hero nav a,
body .mini-hero nav span,
body .mini-hero nav svg { color: #6b7280 !important; }
body .mini-hero nav a:hover { color: #2D5A4C !important; }
body .mini-hero nav span[style] { color: #2D5A4C !important; }
body .mini-hero [class*="border-t"] { border-color: rgba(45,90,76,.12) !important; }
body .mini-hero strong { color: #2D5A4C !important; }
body .mini-hero [class*="text-white"] { color: #152b24 !important; }
body .mini-hero [style*="color:rgba(255,255,255"] { color: #4b5563 !important; }

/* Hide the small eyebrow label above headlines (site-wide cleanup) */
.section-label,
body .mini-hero .section-label { display: none !important; }

/* ────────  Impact stats strip  ──────── */
.tm-impact { background: var(--tm-forest-900); color:#fff; padding: 40px 16px; }
.tm-impact-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: center;
}
@media (min-width: 640px) { .tm-impact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tm-impact-stat .num { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; color: var(--tm-gold-300); }
.tm-impact-stat .lbl { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 4px; }

/* ────────  Donation form (Ehsan-style, used on /program-detail) ──────── */
.tm-donate-card {
  background: #fff; border: 1.5px solid var(--tm-line); border-radius: 20px;
  padding: 22px; box-shadow: 0 14px 36px -22px rgba(45,90,76,.25);
}
.tm-donate-tabs {
  display:flex; align-items:center; justify-content:center; gap:30px; margin-bottom: 22px;
  padding-bottom: 18px; border-bottom: 1px dashed #e5e7eb;
}
.tm-donate-tab { display:flex; flex-direction:column; align-items:center; gap:6px; color:#9ca3af; font-size:12px; font-weight:800; }
.tm-donate-tab .dot { width:28px; height:28px; border-radius:50%; background:#e5e7eb; color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:900; font-size:13px; }
.tm-donate-tab.active { color: var(--tm-forest-500); }
.tm-donate-tab.active .dot { background: var(--tm-forest-500); }

.tm-donate-label { display:block; font-size:13px; font-weight:900; color:var(--tm-text); margin-bottom:10px; }

.tm-donate-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.tm-donate-amt {
  border: 1.5px solid #e5e7eb; background:#fff; border-radius: 12px;
  padding: 10px 8px; font-family:'Tajawal',sans-serif; font-weight:900; font-size:13px;
  color: var(--tm-text); cursor:pointer; transition: all .15s; text-align:center;
}
.tm-donate-amt:hover { border-color: var(--tm-gold-300); color: var(--tm-gold-700); background: var(--tm-gold-50); }
.tm-donate-amt.selected { border-color: var(--tm-gold-300); background: var(--tm-grad-gold); color:#fff; box-shadow: 0 4px 14px rgba(212,175,55,.4); }
.tm-donate-custom {
  width:100%; border: 1.5px solid #e5e7eb; border-radius: 12px;
  padding: 12px 14px; font-family:'Tajawal',sans-serif; font-size:14px;
  background:#fafbfa; color: var(--tm-text); outline:none; transition: all .15s;
}
.tm-donate-custom:focus { border-color: var(--tm-forest-500); background:#fff; box-shadow: 0 0 0 3px rgba(45,90,76,.12); }

.tm-donate-checkbox { display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:12px;
  background:#fafbfa; border:1px solid var(--tm-line); cursor:pointer; }
.tm-donate-checkbox input { accent-color: var(--tm-forest-500); width:16px; height:16px; flex-shrink:0; }
.tm-donate-checkbox span { font-size: 12.5px; color: var(--tm-text); font-weight:700; }

.tm-donate-submit {
  width:100%; padding: 14px 16px; border-radius: 14px; border:none; cursor:pointer;
  background: var(--tm-grad-gold); color:#fff; font-weight: 900; font-size: 15px;
  display:flex; align-items:center; justify-content:center; gap:8px;
  box-shadow: 0 8px 26px -10px rgba(212,175,55,.55);
  transition: filter .15s, transform .1s;
  font-family:'Tajawal',sans-serif;
}
.tm-donate-submit:hover { filter: brightness(1.06); }
.tm-donate-submit:active { transform: scale(.99); }
.tm-donate-submit:disabled { background:#9ca3af; cursor:not-allowed; box-shadow:none; filter:none; }

/* ────────  Stats cards (4-up grid, Ehsan-style) ──────── */
.tm-stats-grid { display:grid; gap:14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width:768px) { .tm-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tm-stat {
  background:#fff; border:1px solid var(--tm-line); border-radius:14px;
  padding: 16px; display:flex; align-items:center; gap: 12px;
}
.tm-stat__icon { width:40px; height:40px; border-radius:11px;
  background: var(--tm-forest-50); color: var(--tm-forest-500);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.tm-stat__lbl { font-size:11px; color: var(--tm-muted); font-weight:700; }
.tm-stat__val { font-size:15px; font-weight:900; color: var(--tm-forest-500); margin-top:2px; }

/* ────────  Buttons (shared) — with proper hover lift ──────── */
.tm-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 12px 22px; border-radius: 14px;
  font-family:'Tajawal',sans-serif; font-weight: 900; font-size: 14px;
  text-decoration: none; cursor: pointer; border: none; position: relative;
  transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .25s, filter .18s, background .18s;
  will-change: transform, box-shadow;
}
.tm-btn:hover  { transform: translateY(-2px); }
.tm-btn:active { transform: translateY(0) scale(.98); transition-duration: .08s; }
.tm-btn svg { transition: transform .25s cubic-bezier(.4,0,.2,1); }
.tm-btn:hover svg { transform: translateX(-3px); }    /* arrow shifts toward end in RTL */
.tm-btn:focus-visible { outline: 2px solid var(--tm-gold-300); outline-offset: 3px; }

.tm-btn--primary  { background: var(--tm-grad-gold); color: #fff; box-shadow: 0 6px 18px -6px rgba(212,175,55,.45); }
.tm-btn--primary:hover  { filter: brightness(1.06); box-shadow: 0 12px 28px -8px rgba(212,175,55,.6); }

.tm-btn--ghost { background: rgba(45,90,76,.08); color: var(--tm-forest-500); }
.tm-btn--ghost:hover { background: rgba(45,90,76,.14); box-shadow: 0 8px 18px -10px rgba(45,90,76,.35); }

.tm-btn--gold { background: var(--tm-grad-gold); color:#fff; box-shadow: 0 6px 18px -6px rgba(212,175,55,.45); }
.tm-btn--gold:hover { filter: brightness(1.06); box-shadow: 0 12px 28px -8px rgba(212,175,55,.6); }

.tm-btn--forest { background: var(--tm-grad-forest); color:#fff; box-shadow: 0 6px 18px -6px rgba(45,90,76,.45); }
.tm-btn--forest:hover { filter: brightness(1.08); box-shadow: 0 12px 28px -8px rgba(45,90,76,.6); }

/* Ripple-like shine on hover for primary CTAs (subtle) */
.tm-btn--primary::after, .tm-btn--gold::after {
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: translateX(120%); transition: transform .7s ease;
}
.tm-btn--primary:hover::after, .tm-btn--gold:hover::after { transform: translateX(-120%); }

/* Lift hover for opportunity-card CTAs */
.tm-opp__go:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -6px rgba(212,175,55,.55); }
.tm-opp__cart:hover { transform: translateY(-1px); }

/* ────────  Progress bar (standalone) ──────── */
.tm-progress { height: 8px; border-radius: 999px; background: #f3f4f6; overflow: hidden; }
.tm-progress > div { height: 100%; background: linear-gradient(90deg, var(--tm-gold-300), var(--tm-forest-500));
  border-radius: 999px; transition: width .8s ease; }

/* ───────────────────────────────────────────────────────────────
 * IBAN / bank-transfer card — shown wherever donors are pointed
 * to the bank since the payment gateway is not yet connected.
 * ─────────────────────────────────────────────────────────────── */
.tm-iban {
  position: relative;
  background: linear-gradient(135deg, #FBF9EE 0%, #f0f7f4 100%);
  border: 1.5px solid rgba(212,175,55,.35);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 12px 32px -18px rgba(45,90,76,.30);
}
.tm-iban__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--tm-forest-500), var(--tm-forest-700));
  color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tm-iban__body { flex: 1; min-width: 0; }
.tm-iban__label { font-size: 11px; font-weight: 800; color: var(--tm-gold-700); letter-spacing: .04em; margin: 0 0 4px; }
.tm-iban__num {
  font-size: 16px; font-weight: 900; color: var(--tm-forest-700);
  direction: ltr; text-align: right; letter-spacing: .03em;
  font-family: 'Tajawal', sans-serif;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  word-break: break-all;
}
.tm-iban__copy {
  background: var(--tm-grad-gold); color: #fff;
  border: none; border-radius: 10px;
  padding: 6px 12px; font-size: 11px; font-weight: 900;
  cursor: pointer; flex-shrink: 0; font-family: 'Tajawal', sans-serif;
  transition: filter .15s, transform .12s;
}
.tm-iban__copy:hover  { filter: brightness(1.06); }
.tm-iban__copy:active { transform: scale(.96); }
.tm-iban__copy.copied { background: var(--tm-grad-forest); }
.tm-iban__meta { font-size: 12px; color: var(--tm-muted); margin: 6px 0 0; line-height: 1.7; }
.tm-iban__bank { font-weight: 800; color: var(--tm-forest-500); }

/* Compact variant — for footer + cart success */
.tm-iban--compact { padding: 14px 16px; gap: 12px; border-radius: 16px; }
.tm-iban--compact .tm-iban__icon { width: 42px; height: 42px; border-radius: 11px; }
.tm-iban--compact .tm-iban__num { font-size: 14px; }

/* ───────────────────────────────────────────────────────────────
 * Cart drawer — fully site-wide (auto-injected by bootstrap)
 * ─────────────────────────────────────────────────────────────── */
.tm-cart-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 32, 26, .55);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  z-index: 1000;
}
.tm-cart-backdrop.open { opacity: 1; pointer-events: auto; }

.tm-cart-drawer {
  position: fixed; top: 0; bottom: 0;
  inset-inline-start: 0;            /* left in LTR, right in RTL */
  width: min(420px, 92vw);
  background: #fff;
  display: flex; flex-direction: column;
  transform: translateX(-100%);     /* slides out to the left (RTL: right) */
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  z-index: 1001;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.4);
}
html[dir="rtl"] .tm-cart-drawer { transform: translateX(100%); }
.tm-cart-drawer.open { transform: translateX(0) !important; }

.tm-cart-header {
  padding: 16px 18px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--tm-line); flex-shrink: 0;
  background: linear-gradient(180deg, var(--tm-cream-2) 0%, #fff 80%);
}
.tm-cart-header h2 { font-size: 16px; font-weight: 900; color: var(--tm-text); margin: 0; }
.tm-cart-header .tm-cart-count-pill {
  background: var(--tm-forest-50); color: var(--tm-forest-500);
  font-size: 11px; font-weight: 900; padding: 3px 10px; border-radius: 999px; margin-inline-start: 8px;
}
.tm-cart-close {
  width: 34px; height: 34px; border-radius: 10px;
  background: transparent; color: var(--tm-muted); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.tm-cart-close:hover { background: #f3f4f6; color: var(--tm-text); }

.tm-cart-body {
  flex: 1; overflow-y: auto;
  padding: 14px 18px;
  display: flex; flex-direction: column;
}
.tm-cart-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px; text-align: center;
}
.tm-cart-empty__icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--tm-forest-50); color: var(--tm-forest-500);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.tm-cart-empty p:first-of-type { font-weight: 900; color: var(--tm-text); margin: 0 0 4px; }
.tm-cart-empty p:last-of-type { font-size: 12px; color: var(--tm-muted); margin: 0; }

.tm-cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--tm-line);
  margin-bottom: 8px;
  transition: border-color .15s, transform .15s;
}
.tm-cart-item:hover { border-color: var(--tm-gold-300); }
.tm-cart-item__icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--tm-gold-50); color: var(--tm-gold-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tm-cart-item__body { flex: 1; min-width: 0; }
.tm-cart-item__label { font-size: 12.5px; font-weight: 800; color: var(--tm-text); margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-cart-item__amount { font-size: 13px; font-weight: 900; color: var(--tm-forest-500); margin: 2px 0 0; direction: ltr; text-align: end; }
.tm-cart-item__remove {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: transparent; color: #cbd5e1; cursor: pointer; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.tm-cart-item__remove:hover { background: #fef2f2; color: #ef4444; }

.tm-cart-quick {
  padding: 14px 18px; border-top: 1px solid var(--tm-line); flex-shrink: 0;
  background: #fafbfa;
}
.tm-cart-quick__label { font-size: 11px; font-weight: 800; color: var(--tm-muted); margin: 0 0 8px; }
.tm-cart-quick__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px;
}
.tm-cart-quick__btn {
  padding: 9px 0; border-radius: 10px;
  border: 1.5px solid #e5e7eb; background: #fff;
  font-size: 11.5px; font-weight: 900; color: var(--tm-forest-500);
  cursor: pointer; transition: all .15s;
  font-family: 'Tajawal', sans-serif;
}
.tm-cart-quick__btn:hover { border-color: var(--tm-gold-300); background: var(--tm-gold-50); color: var(--tm-gold-700); transform: translateY(-1px); }
.tm-cart-quick__row { display: flex; gap: 6px; }
.tm-cart-quick__custom {
  flex: 1; min-width: 0;
  padding: 9px 12px; border-radius: 10px; border: 1.5px solid #e5e7eb;
  font-size: 13px; font-family: 'Tajawal', sans-serif;
  text-align: right; background: #fff; outline: none;
  transition: border-color .15s;
}
.tm-cart-quick__custom:focus { border-color: var(--tm-forest-500); }
.tm-cart-quick__add {
  padding: 9px 16px; border-radius: 10px; border: none;
  background: var(--tm-grad-forest); color: #fff; font-weight: 900; font-size: 12px;
  cursor: pointer; flex-shrink: 0; font-family: 'Tajawal', sans-serif;
}

.tm-cart-summary {
  padding: 16px 18px; border-top: 2px solid var(--tm-line); flex-shrink: 0;
  background: #fff;
}
.tm-cart-summary__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tm-cart-summary__label { font-size: 12px; color: var(--tm-muted); font-weight: 700; }
.tm-cart-summary__value { font-size: 13px; font-weight: 900; color: var(--tm-forest-500); }
.tm-cart-summary__total {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 900; padding: 8px 0; margin-bottom: 14px;
  border-top: 1px dashed var(--tm-line); margin-top: 6px;
}
.tm-cart-summary__total span:first-child { color: var(--tm-text); font-size: 14px; }
.tm-cart-summary__total span:last-child  { color: var(--tm-forest-500); font-size: 22px; direction: ltr; }
.tm-cart-checkout {
  width: 100%; padding: 13px 16px; border-radius: 13px; border: none;
  background: var(--tm-grad-gold); color: #fff; font-weight: 900; font-size: 14px;
  cursor: pointer; box-shadow: 0 8px 22px -8px rgba(212,175,55,.55);
  transition: filter .15s, transform .15s, box-shadow .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Tajawal', sans-serif;
}
.tm-cart-checkout:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(212,175,55,.7); }
.tm-cart-checkout:disabled { background: #d1d5db; cursor: not-allowed; box-shadow: none; }
.tm-cart-secure {
  text-align: center; font-size: 10.5px; color: var(--tm-muted); margin: 8px 0 0;
}

/* Checkout panel (slides into the body when "إتمام التبرع" is clicked) */
.tm-cart-checkout-panel {
  position: absolute; inset: 0; background: #fff;
  display: none; flex-direction: column;
  padding: 20px 18px;
  overflow-y: auto;
}
.tm-cart-drawer.checkout-step .tm-cart-checkout-panel { display: flex; }
.tm-cart-checkout-panel h3 {
  font-size: 16px; font-weight: 900; color: var(--tm-text); margin: 0 0 4px;
}
.tm-cart-checkout-panel p.lead { font-size: 12px; color: var(--tm-muted); margin: 0 0 18px; }
.tm-cart-checkout-panel label.row {
  display: flex; align-items: center; gap: 9px; padding: 11px 12px;
  border-radius: 11px; background: var(--tm-forest-50);
  font-size: 12.5px; font-weight: 700; color: var(--tm-text);
  cursor: pointer; margin-bottom: 12px;
}
.tm-cart-checkout-panel input[type="text"],
.tm-cart-checkout-panel input[type="tel"],
.tm-cart-checkout-panel input[type="email"] {
  width: 100%; padding: 11px 13px; border-radius: 11px;
  border: 1.5px solid #e5e7eb; font-size: 13px;
  font-family: 'Tajawal', sans-serif; background: #fafbfa;
  outline: none; transition: border-color .15s;
}
.tm-cart-checkout-panel input:focus { border-color: var(--tm-forest-500); background: #fff; }
.tm-cart-checkout-panel .field { margin-bottom: 10px; }
.tm-cart-checkout-panel .actions {
  display: flex; gap: 8px; margin-top: auto; padding-top: 14px;
}
.tm-cart-back-btn {
  padding: 11px 14px; border-radius: 11px;
  background: #f3f4f6; color: var(--tm-text); border: none;
  font-weight: 800; font-size: 12.5px; cursor: pointer; font-family: 'Tajawal', sans-serif;
}
.tm-cart-error {
  background: #fef2f2; color: #dc2626; border: 1px solid #fecaca;
  padding: 10px 12px; border-radius: 10px; font-size: 12px; font-weight: 700;
  margin-top: 8px;
}
.tm-cart-success {
  text-align: center; padding: 40px 20px;
}
.tm-cart-success__icon {
  width: 76px; height: 76px; margin: 0 auto 14px;
  border-radius: 22px;
  background: var(--tm-grad-gold);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}

/* ────────  Subtle section divider (decorative)  ──────── */
.tm-divider { display:flex; align-items:center; justify-content:center; gap:14px;
  max-width:880px; margin: 16px auto 0; opacity:.65; }
.tm-divider::before, .tm-divider::after {
  content:''; flex:1 0 auto; max-width:140px; height:1px;
  background: linear-gradient(to var(--tm-divider-dir, right), transparent, var(--tm-gold-300));
}
.tm-divider svg { color: var(--tm-gold-300); flex-shrink:0; }

/* ────────  Story card (success stories grid) ──────── */
.tm-story-grid { display:grid; gap:18px;
  grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width:768px) { .tm-story-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.tm-story {
  background:#fff; border:1px solid var(--tm-line); border-radius: var(--tm-radius-lg);
  overflow:hidden; display:flex; flex-direction:column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.tm-story:hover { transform: translateY(-4px); border-color:#dceee7; box-shadow: var(--tm-shadow-lg); }
.tm-story__media { aspect-ratio: 4/3; background: var(--tm-forest-50); overflow:hidden; }
.tm-story__media img { width:100%; height:100%; object-fit: cover; }
.tm-story__body { padding: 18px 18px 22px; flex:1; display:flex; flex-direction:column; gap:10px; }
.tm-story__quote { font-size: 13.5px; color: var(--tm-text); line-height: 1.85; position:relative; padding-inline-start: 22px; }
.tm-story__quote::before { content:'\201C'; position:absolute; right:0; top:-10px; font-size: 38px; line-height:1; color: var(--tm-gold-300); font-family: serif; }
.tm-story__person { display:flex; align-items:center; gap:10px; padding-top: 12px; border-top: 1px solid var(--tm-line); margin-top:auto; }
.tm-story__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--tm-forest-500); color: #fff;
  display:flex; align-items:center; justify-content:center; font-weight:900; font-size:13px; flex-shrink:0; overflow:hidden; }
.tm-story__avatar img { width:100%; height:100%; object-fit:cover; }
.tm-story__name { font-weight: 900; font-size: 13px; color: var(--tm-forest-500); }
.tm-story__prog { font-size: 11px; color: var(--tm-muted); }

/* ────────  Vision/Mission triple card ──────── */
.tm-vmv-grid { display:grid; gap:16px;
  grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width:768px) { .tm-vmv-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.tm-vmv {
  background:#fff; border:1px solid var(--tm-line); border-radius: var(--tm-radius-lg);
  padding: 24px 22px; transition: transform .25s, box-shadow .25s;
}
.tm-vmv:hover { transform: translateY(-3px); box-shadow: var(--tm-shadow); }
.tm-vmv__icon { width:44px; height:44px; border-radius:12px;
  background: var(--tm-forest-50); color: var(--tm-forest-500);
  display:flex; align-items:center; justify-content:center; margin-bottom: 14px; }
.tm-vmv__icon.gold { background: var(--tm-gold-50); color: var(--tm-gold-700); }
.tm-vmv__title { font-weight: 900; font-size: 15px; color: var(--tm-forest-500); margin-bottom:6px; }
.tm-vmv__text  { font-size: 13px; color: var(--tm-muted); line-height: 1.85; }

/* ────────  News teaser card  ──────── */
.tm-news-grid { display:grid; gap:18px;
  grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width:768px) { .tm-news-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.tm-news {
  background:#fff; border:1px solid var(--tm-line); border-radius: var(--tm-radius-lg);
  overflow:hidden; display:flex; flex-direction:column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  text-decoration: none; color: inherit;
}
.tm-news:hover { transform: translateY(-4px); border-color:#dceee7; box-shadow: var(--tm-shadow); }
.tm-news__media { aspect-ratio: 16/9; background: var(--tm-forest-50); overflow:hidden; }
.tm-news__media img { width:100%; height:100%; object-fit:cover; }
.tm-news__body { padding: 14px 16px 18px; display:flex; flex-direction:column; gap:6px; flex:1; }
.tm-news__cat  { display:inline-block; font-size:10.5px; font-weight:800; color: var(--tm-forest-500);
  background: var(--tm-forest-50); padding: 3px 9px; border-radius:999px; align-self:flex-start; }
.tm-news__title { font-weight: 900; font-size: 14px; color: var(--tm-text); line-height: 1.5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tm-news__date { font-size: 11px; color: var(--tm-muted); margin-top: auto; padding-top: 8px; }

/* ────────────────────────────────────────────
 * Brand ornaments — wheat ear / leaf accents
 * (Ehsan-style decorative dividers)
 * ──────────────────────────────────────────── */

/* Wheat-ear divider between sections */
.tm-wheat-divider { display:flex; align-items:center; justify-content:center; gap:14px;
  max-width: 360px; margin: 8px auto 0; opacity: .7; user-select:none; pointer-events:none; }
.tm-wheat-divider::before, .tm-wheat-divider::after {
  content:''; flex: 1 0 auto; height: 1px;
  background: linear-gradient(to var(--tm-divider-dir, right), transparent, var(--tm-gold-300));
}
.tm-wheat-divider svg { color: var(--tm-gold-500); flex-shrink: 0; }
/* mirror gradient on the left half so it fades outward both sides */
.tm-wheat-divider::before { background: linear-gradient(to left, transparent, var(--tm-gold-300)); }
.tm-wheat-divider::after  { background: linear-gradient(to right, transparent, var(--tm-gold-300)); }

/* Decorative corner accents for cards / heroes */
.tm-corner-leaf {
  position: absolute; pointer-events: none; opacity: .12; color: var(--tm-forest-500);
}
.tm-corner-leaf.top-right    { top: -10px;   right: -10px;  transform: rotate(20deg); }
.tm-corner-leaf.bottom-left  { bottom: -10px; left: -10px;  transform: rotate(200deg); }

/* (Removed the duplicate gold pip under h2 — the eyebrow lines above
   the title already provide brand accent; the pip created visual noise.) */

/* ────────────────────────────────────────────
 * Growing-plant animation for hero SVG
 * Targeted via .tm-plant-anim wrapper class
 * ──────────────────────────────────────────── */
.tm-plant-anim .stem    { transform-origin: 160px 198px; transform: scaleY(0); animation: tm-grow-stem 1.5s cubic-bezier(.34,1.56,.64,1) .2s forwards; }
.tm-plant-anim .leaf-l2 { transform-origin: 160px 178px; transform: scale(.05); opacity: 0; animation: tm-grow-leaf 1.0s cubic-bezier(.34,1.56,.64,1) .85s forwards; }
.tm-plant-anim .leaf-r2 { transform-origin: 160px 178px; transform: scale(.05); opacity: 0; animation: tm-grow-leaf 1.0s cubic-bezier(.34,1.56,.64,1) 1.0s forwards; }
.tm-plant-anim .leaf-l  { transform-origin: 160px 150px; transform: scale(.05); opacity: 0; animation: tm-grow-leaf 1.1s cubic-bezier(.34,1.56,.64,1) 1.15s forwards; }
.tm-plant-anim .leaf-r  { transform-origin: 160px 150px; transform: scale(.05); opacity: 0; animation: tm-grow-leaf 1.1s cubic-bezier(.34,1.56,.64,1) 1.35s forwards; }
.tm-plant-anim .leaf-l3 { transform-origin: 160px 130px; transform: scale(.05); opacity: 0; animation: tm-grow-leaf 1.0s cubic-bezier(.34,1.56,.64,1) 1.55s forwards; }
.tm-plant-anim .leaf-r3 { transform-origin: 160px 130px; transform: scale(.05); opacity: 0; animation: tm-grow-leaf 1.0s cubic-bezier(.34,1.56,.64,1) 1.75s forwards; }
.tm-plant-anim .spark   { transform-origin: 160px 104px; transform: scale(0); opacity: 0; animation: tm-pop 0.9s cubic-bezier(.34,1.56,.64,1) 2.1s forwards, tm-pulse 3s ease-in-out 3.1s infinite; }
.tm-plant-anim .spark-i { transform-origin: 160px 104px; transform: scale(0); opacity: 0; animation: tm-pop 0.9s cubic-bezier(.34,1.56,.64,1) 2.25s forwards, tm-pulse 3s ease-in-out 3.25s infinite; }
.tm-plant-anim .hand    { transform-origin: 160px 260px; transform: scaleY(.85); opacity: 0; animation: tm-hand-in 1.0s cubic-bezier(.34,1.56,.64,1) 0s forwards; }
.tm-plant-anim .soil    { transform-origin: 160px 200px; transform: scaleX(.4); opacity: 0; animation: tm-pop 0.8s ease-out .3s forwards; }
.tm-plant-anim .soil-2  { transform-origin: 160px 198px; transform: scaleX(.4); opacity: 0; animation: tm-pop 0.8s ease-out .45s forwards; }

@keyframes tm-grow-stem { to { transform: scaleY(1); } }
@keyframes tm-grow-leaf { to { transform: scale(1); opacity: 1; } }
@keyframes tm-pop       { to { transform: scale(1); opacity: 1; } }
@keyframes tm-hand-in   { 0% { transform: scaleY(.85) translateY(20px); opacity: 0; } 100% { transform: scaleY(1) translateY(0); opacity: 1; } }
@keyframes tm-pulse     { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(212,175,55,.6)); }
                          50%      { transform: scale(1.15); filter: drop-shadow(0 0 10px rgba(212,175,55,.9)); } }

/* Gentle sway on the leaves after they've grown */
@keyframes tm-sway-l { 0%,100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1) rotate(-3deg); } }
@keyframes tm-sway-r { 0%,100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1) rotate(3deg); } }
.tm-plant-anim .leaf-l2 { animation: tm-grow-leaf 1.0s cubic-bezier(.34,1.56,.64,1) .85s forwards, tm-sway-l 5.6s ease-in-out 2.3s infinite; }
.tm-plant-anim .leaf-r2 { animation: tm-grow-leaf 1.0s cubic-bezier(.34,1.56,.64,1) 1.0s forwards, tm-sway-r 6.0s ease-in-out 2.5s infinite; }
.tm-plant-anim .leaf-l  { animation: tm-grow-leaf 1.1s cubic-bezier(.34,1.56,.64,1) 1.15s forwards, tm-sway-l 5s ease-in-out 2.6s infinite; }
.tm-plant-anim .leaf-r  { animation: tm-grow-leaf 1.1s cubic-bezier(.34,1.56,.64,1) 1.35s forwards, tm-sway-r 5.5s ease-in-out 2.8s infinite; }
.tm-plant-anim .leaf-l3 { animation: tm-grow-leaf 1.0s cubic-bezier(.34,1.56,.64,1) 1.55s forwards, tm-sway-l 4.6s ease-in-out 3.0s infinite; }
.tm-plant-anim .leaf-r3 { animation: tm-grow-leaf 1.0s cubic-bezier(.34,1.56,.64,1) 1.75s forwards, tm-sway-r 4.9s ease-in-out 3.2s infinite; }

@media (prefers-reduced-motion: reduce) {
  .tm-plant-anim * { animation: none !important; transform: none !important; opacity: 1 !important; }
}

/* ════════════════════════════════════════════════
 * Ehsan-style navbar v2 — clean links, green active
 * pill, simple login, full-width mega menu panel
 * ════════════════════════════════════════════════ */
header .tm-navlink {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .55rem .8rem; border-radius: 12px;
  min-height: 42px;
  font-weight: 600; font-size: .86rem; color: #5b6471;
  background: transparent; border: none; cursor: pointer;
  white-space: nowrap; line-height: 1;
  transition: background .16s, color .16s;
}
header .tm-navlink:hover { background: var(--tm-forest-50); color: var(--tm-forest-500); }
header .tm-navitem { position: relative; }
/* Active = solid green pill (الرئيسية in reference) — clean filled, crisp white text */
header .tm-navlink.tm-active { background: var(--tm-forest-500); color: #fff;
  font-weight: 800; letter-spacing: .005em;
  box-shadow: 0 6px 16px -7px rgba(45,90,76,.5); }
header .tm-navlink.tm-active:hover { background: var(--tm-forest-700); color: #fff; }
/* Caret + open state */
header .tm-navlink .nav-caret { transition: transform .2s; margin-inline-start: 2px; }
header .tm-navitem.tm-open .tm-navlink .nav-caret { transform: rotate(180deg); }
header .tm-navitem.tm-open .tm-navlink:not(.tm-active) { background: var(--tm-forest-50); color: var(--tm-forest-500); }

/* Login — simple outline (annotated "Simple") */
header .tm-login-btn {
  padding: .5rem .95rem; border-radius: 11px;
  border: 1.5px solid #d9e2de; color: var(--tm-forest-500);
  font-weight: 800; font-size: .85rem; background: #fff;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
header .tm-login-btn:hover { border-color: var(--tm-forest-500); background: var(--tm-forest-50);
  transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(45,90,76,.45); }

/* Full-width mega menu panel (drops below the nav) */
header .tm-mega-panel {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid rgba(45,90,76,.10);
  box-shadow: 0 24px 44px -18px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 40;
}
header .tm-mega-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }
header .tm-mega-inner { max-width: 1152px; margin: 0 auto; padding: 22px 24px 26px; }
header .tm-mega-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding: 0 4px; }
header .tm-mega-eyebrow { font-size: .78rem; font-weight: 900; color: var(--tm-gold-700); letter-spacing: .01em; }
header .tm-mega-go { font-size: .8rem; font-weight: 800; color: var(--tm-forest-500); }
header .tm-mega-go:hover { color: var(--tm-forest-700); }
header .tm-mega-row { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
@media (max-width: 1100px) { header .tm-mega-row { grid-template-columns: repeat(3, minmax(0,1fr)); } }
header .tm-mega-pill { display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: #f7faf8; border: 1px solid #eef3f0;
  transition: background .18s, border-color .18s, transform .18s, box-shadow .18s; }
header .tm-mega-pill:hover { background: var(--tm-forest-500); border-color: var(--tm-forest-500);
  transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(45,90,76,.45); }
header .tm-mega-pill .ic { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #e9f3ee; color: var(--tm-forest-500); transition: background .18s, color .18s; }
header .tm-mega-pill .ic.ic-gold { background: #FBF3DA; color: var(--tm-gold-700); }
header .tm-mega-pill:hover .ic { background: rgba(255,255,255,.18); color: #fff; }
header .tm-mega-pill .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
header .tm-mega-pill .tx b { font-size: .88rem; font-weight: 800; color: #1f2937; }
header .tm-mega-pill .tx small { font-size: .72rem; color: #6b7280; }
header .tm-mega-pill:hover .tx b, header .tm-mega-pill:hover .tx small { color: #fff; }
header .tm-mega-pill.tm-mega-active { border-color: var(--tm-forest-500);
  box-shadow: 0 0 0 1.5px var(--tm-forest-500) inset; }
header .tm-mega-pill--all { background: linear-gradient(135deg, #FEFBE8, #fff); border-color: rgba(212,175,55,.3); }
@media (prefers-reduced-motion: reduce) {
  header .tm-mega-panel { transition: opacity .15s; transform: none; }
}
