*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:        #f7f9fb;
  --card:      #ffffff;
  --header-bg: #2d5f8a;
  --nav-bg:    #1e4266;
  --subnav-bg: #f0f4f8;
  --text:      #222;
  --muted:     #888;
  --accent:    #4a82b4;
  --border:    #dde5ee;
  /* typography scale */
  --fs-h1:     1.5rem;
  --fs-h2:     1.1rem;
  --fs-h3:     0.95rem;
  --fs-body:   0.95rem;
  --fs-small:  0.82rem;
  --fs-meta:   0.76rem;
  --lh-body:   2.2;
  --lh-tight:  1.6;
}
body { font-family: 'Segoe UI', Tahoma, Geneva, sans-serif; background: var(--bg); color: var(--text); direction: rtl; }
.site-header { background: #fff; border-bottom: 2px solid var(--border); padding: 0.7rem 2rem; display: flex; align-items: center; gap: 1.4rem; }
.site-header a { display: inline-block; line-height: 0; flex-shrink: 0; }
.site-header img.logo { height: 76px; width: auto; display: block; }
.site-tagline { font-family: 'Amiri', serif; font-size: 1.55rem; color: #3d3d3d; line-height: 1.4; }
nav { background: var(--nav-bg); padding: 0 2rem; }
nav ul { list-style: none; display: flex; flex-direction: row; flex-wrap: wrap; }
nav ul li a { display: block; padding: 0.75rem 1.1rem; color: #a8c4db; text-decoration: none; font-size: 0.88rem; font-weight: 500; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
nav ul li a:hover, nav ul li a.active { color: #fff; border-bottom-color: #7ab8e0; }
.subnav { background: var(--subnav-bg); border-bottom: 1px solid var(--border); padding: 0 2rem; }
.subnav ul { list-style: none; display: flex; flex-direction: row; flex-wrap: wrap; }
.subnav ul li a { display: block; padding: 0.4rem 0.9rem; color: var(--header-bg); text-decoration: none; font-size: 0.83rem; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.subnav ul li a:hover, .subnav ul li a.active { color: #1e4266; border-bottom-color: var(--accent); font-weight: 600; }
.container { max-width: 940px; margin: 2rem auto; padding: 0 1.5rem; }
.ayah-banner { border-right: 3px solid var(--accent); padding: 0.9rem 1.2rem; margin-bottom: 1.5rem; background: #fff; }
.ayah-banner .ayah-text { font-size: var(--fs-body); color: #555; line-height: 1.9; margin-bottom: 0.2rem; }
.ayah-banner .hadith-source { font-size: var(--fs-meta); color: var(--muted); }
.content-card { background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.content-inner { display: flex; gap: 2rem; padding: 2rem; align-items: flex-start; }
.content-text { flex: 1; }
.content-text h2 { font-size: var(--fs-h2); color: var(--header-bg); margin-bottom: 0.9rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.content-text p { font-size: var(--fs-body); line-height: var(--lh-body); color: #444; margin-bottom: 0.85rem; }
.content-image { flex-shrink: 0; width: 200px; }
.content-image img { width: 100%; }
.form-card { background: var(--card); border: 1px solid var(--border); padding: 2rem; max-width: 600px; margin: 0 auto; }
.form-card h2 { font-size: var(--fs-h2); color: var(--header-bg); margin-bottom: 1.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: var(--fs-small); color: #555; margin-bottom: 0.3rem; }
.form-group input, .form-group textarea { width: 100%; padding: 0.55rem 0.8rem; border: 1px solid var(--border); font-size: var(--fs-body); font-family: inherit; direction: rtl; color: var(--text); background: #fff; transition: border-color 0.2s; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit { background: var(--header-bg); color: #fff; border: none; padding: 0.65rem 2.2rem; font-size: var(--fs-body); font-family: inherit; cursor: pointer; transition: background 0.2s; }
.btn-submit:hover { background: var(--accent); }
.thankyou-card { background: var(--card); border: 1px solid var(--border); padding: 3rem 2rem; text-align: center; }
.thankyou-card h2 { font-size: var(--fs-h1); color: var(--header-bg); margin-bottom: 1rem; }
.thankyou-card p { font-size: var(--fs-body); color: #555; line-height: var(--lh-body); margin-bottom: 2rem; }
.thankyou-card a { display: inline-block; background: var(--header-bg); color: #fff; padding: 0.65rem 2rem; text-decoration: none; font-size: var(--fs-body); transition: background 0.2s; }
.thankyou-card a:hover { background: var(--accent); }
.quote-block { font-family: 'Amiri', serif; font-size: 1.45rem; color: var(--header-bg); line-height: 2.1; border-right: 3px solid var(--accent); padding-right: 1rem; margin: 0.5rem 0; }
.vm-card { display: flex; flex-direction: row; border: 1px solid var(--border); overflow: hidden; background: var(--card); min-height: 300px; }
.vm-image { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; background: transparent; }
.vm-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vm-image-sm { flex: 0 0 180px; }
.vm-image-contain { background: transparent; }
.vm-image-contain img { object-fit: contain; width: auto; max-width: 90%; max-height: 320px; }
.vm-text { flex: 1; background: #f0f4f8; padding: 2rem; }
.vm-title { font-size: var(--fs-h2); color: var(--header-bg); font-weight: 700; border-right: 3px solid var(--accent); padding-right: 0.7rem; margin-bottom: 0.8rem; }
.vm-text p { line-height: var(--lh-body); font-size: var(--fs-body); color: #444; margin-bottom: 0.8rem; }
.vm-divider { border: none; border-top: 1px solid var(--border); margin: 1.3rem 0; }
.tags-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.6rem; }
.tags-list span { background: var(--subnav-bg); border: 1px solid var(--border); padding: 0.28rem 0.85rem; font-size: var(--fs-small); color: var(--header-bg); }
.tags-list span.featured { font-size: var(--fs-h2); font-weight: 700; background: var(--header-bg); color: #fff; border-color: var(--header-bg); padding: 0.32rem 1.1rem; }
.goals-list { list-style: none; padding: 0; margin-top: 0.6rem; }
.goals-list li { padding: 0.4rem 0; font-size: var(--fs-body); color: #444; display: flex; align-items: center; gap: 0.8rem; line-height: var(--lh-tight); }
.goals-list li::before { content: '◆'; color: var(--accent); font-size: 0.5rem; flex-shrink: 0; }
.location-grid { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.8rem; }
.location-country { background: var(--subnav-bg); border: 1px solid var(--border); padding: 0.7rem 1rem; min-width: 130px; flex: 1; }
.location-country h3 { font-size: var(--fs-h3); color: var(--header-bg); font-weight: 700; margin-bottom: 0.35rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--accent); }
.location-country p { font-size: var(--fs-small); color: #555; margin: 0; line-height: var(--lh-tight); }
footer { text-align: center; padding: 1rem 1rem 1.2rem; font-size: var(--fs-meta); color: var(--muted); border-top: 1px solid var(--border); margin-top: 2.5rem; line-height: 1.9; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.tree-wrap { width: 100%; height: calc(100vh - 145px); border-top: 1px solid var(--border); }
.tree-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.tree-wrap + footer { margin-top: 0; }
.notable-list { display: flex; flex-direction: column; gap: 0; }
.notable-card + .notable-card { border-top: none; }
.notable-card { display: flex; flex-direction: row; border: 1px solid var(--border); overflow: hidden; background: var(--card); }
.notable-photo { flex: 0 0 200px; display: flex; align-items: center; justify-content: center; background: var(--subnav-bg); }
.notable-photo img { width: 160px; height: 160px; object-fit: cover; object-position: top center; filter: grayscale(100%); display: block; }
.notable-photo img[src=""], .notable-photo img:not([src]) { display: none; }
.notable-info { flex: 1; background: #f0f4f8; padding: 2rem; }
.notable-name { font-size: var(--fs-h2); color: var(--header-bg); font-weight: 700; border-right: 3px solid var(--accent); padding-right: 0.7rem; padding-bottom: 0.4rem; margin-bottom: 0.9rem; border-bottom: 1px solid var(--border); }
.notable-info p { font-size: var(--fs-body); line-height: var(--lh-body); color: #444; margin-bottom: 0.8rem; }
.notable-info p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .content-inner { flex-direction: column; }
  .content-image { width: 100%; }
  .vm-card { flex-direction: column; }
  .vm-image img { height: 180px; }
  .vm-text { padding: 1.2rem; }
  .site-header { padding: 0.5rem 1rem; gap: 0.8rem; }
  .site-header img.logo { height: 52px; }
  .site-tagline { font-size: 1.1rem; }
  nav ul, .subnav ul { justify-content: center; }
  nav ul li a { padding: 0.6rem 0.8rem; font-size: 0.84rem; }
  .notable-card { flex-direction: column; }
  .notable-photo { width: 100%; padding: 1.2rem 0; }
  .notable-photo img { width: 120px; height: 120px; }
  .notable-info { padding: 1.2rem; }
  .notable-name { font-size: var(--fs-body); }
}
