/* ============================================================
   Investing Guide for Saudi Arabia — RTL Arabic Editorial Build
   Palette: deep teal/forest green + warm gold + cream
   Fonts:   Spectral (display) + Tajawal (body)
============================================================ */

:root {
  --bg:           #f6f1e7;
  --bg-soft:      #efe7d6;
  --bg-card:      #ffffff;
  --ink:          #15302b;
  --ink-soft:     #2c4a45;
  --muted:        #5e6663;
  --line:         #d9cfb9;
  --primary:      #0f5132;
  --primary-700:  #0a3d24;
  --accent:       #c19a3b;
  --accent-700:   #a07a26;
  --warn:         #b14a3a;

  --serif:   "Spectral", "Noto Naskh Arabic", "Amiri", Georgia, serif;
  --sans:    "Tajawal", "Noto Sans Arabic", system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --gap: 24px;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(15,42,32,0.07);
  --shadow-md: 0 6px 22px rgba(15,42,32,0.08);
  --shadow-lg: 0 14px 40px rgba(15,42,32,0.14);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  direction: rtl;
  unicode-bidi: isolate;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-700); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(246,241,231,0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
}
.nav-brand:hover { text-decoration: none; color: var(--primary-700); }
.nav-brand-mark {
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center; justify-content: center;
  background: var(--primary);
  color: var(--bg);
  border-radius: 50%;
  font-size: 0;
  position: relative;
}
.nav-brand-mark::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
}
.nav-brand-text {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0;
}
.nav-desktop {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-desktop a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
}
.nav-desktop a:hover { color: var(--primary); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(180deg, rgba(15,42,32,0.55), rgba(15,42,32,0.85)), url('images/hero.jpg');
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
  color: #f6f1e7;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  background: rgba(15,42,32,0.35);
  padding: 8px 16px;
  border-radius: 30px;
  margin-bottom: 22px;
}
.hero-heading {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.2;
  color: #f6f1e7;
  margin: 0 0 20px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.hero-lead {
  font-size: 19px;
  line-height: 1.7;
  color: rgba(246,241,231,0.92);
  max-width: 760px;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: #1f1305;
}
.btn-primary:hover {
  background: var(--accent-700);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: #f6f1e7;
  border-color: rgba(246,241,231,0.5);
}
.btn-ghost:hover {
  background: rgba(246,241,231,0.1);
  color: #f6f1e7;
  text-decoration: none;
}

/* ---------- Section Headings ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-700);
  margin-bottom: 12px;
}
.section-heading {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.25;
  color: var(--primary);
  margin: 0 0 16px;
  font-weight: 700;
}
.section-lead {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0;
}

/* ---------- Intro ---------- */
.intro {
  padding: 90px 0;
  background: var(--bg);
}
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.intro-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.intro-text p { font-size: 17px; color: var(--ink-soft); margin: 0 0 16px; }
.intro-features {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.intro-features li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  align-items: flex-start;
  border-top: 1px solid var(--line);
}
.intro-features li:first-child { border-top: none; }
.feature-mark {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center; justify-content: center;
  background: var(--primary);
  color: var(--accent);
  border-radius: 50%;
  font-size: 0;
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-text strong {
  display: block;
  color: var(--primary);
  font-family: var(--serif);
  margin-bottom: 4px;
}
.feature-text span { color: var(--ink-soft); font-size: 15px; }

/* ---------- Articles ---------- */
.articles {
  padding: 90px 0;
  background: var(--bg-soft);
}
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 28px;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.article-img {
  background: var(--bg-soft);
  aspect-ratio: 16/9;
  overflow: hidden;
}
.article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.article-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-700);
  font-weight: 600;
  margin-bottom: 8px;
}
.article-title {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.35;
  color: var(--primary);
  margin: 0 0 10px;
  font-weight: 700;
}
.article-lead {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0 0 12px;
}
.article-expand {
  display: none;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
  margin: 0 0 12px;
}
.article-expand.open {
  display: block;
}
.article-toggle {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  transition: all 0.2s ease;
}
.article-toggle:hover { background: var(--primary); color: #f6f1e7; }
.article-toggle[aria-expanded="true"] { background: var(--primary); color: #f6f1e7; }
.article-toggle .chev {
  width: 16px; height: 16px;
  transition: transform 0.2s ease;
}
.article-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ---------- Tips ---------- */
.tips { padding: 90px 0; background: var(--bg); }
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 30px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.tip-number {
  position: absolute;
  top: -22px;
  inset-inline-start: 22px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  box-shadow: var(--shadow-sm);
}
.tip-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--primary);
  margin: 8px 0 10px;
  font-weight: 700;
}
.tip-body {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0;
}

/* ---------- FAQ ---------- */
.faq { padding: 90px 0; background: var(--bg-soft); }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-question {
  background: transparent;
  border: none;
  width: 100%;
  text-align: start;
  padding: 22px 0;
  font-family: var(--serif);
  color: var(--primary);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-question:hover { color: var(--accent-700); }
.faq-question .chev {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--accent);
}
.faq-question[aria-expanded="true"] .chev { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 0 22px;
}
.faq-answer.open { display: block; }
.faq-answer p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.85;
  font-size: 16px;
}

/* ---------- Newsletter ---------- */
.newsletter {
  padding: 90px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #0a3d24 100%);
  color: #f6f1e7;
}
.newsletter-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.newsletter-text .section-eyebrow { color: var(--accent); }
.newsletter-text .section-heading { color: #f6f1e7; }
.newsletter-text .section-lead { color: rgba(246,241,231,0.85); }
.newsletter-form {
  background: rgba(246,241,231,0.05);
  border: 1px solid rgba(246,241,231,0.18);
  padding: 28px 26px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.form-row input {
  background: rgba(255,255,255,0.06);
  color: #f6f1e7;
  border: 1px solid rgba(246,241,231,0.3);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 15px;
  direction: rtl;
  text-align: right;
}
.form-row input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.10);
}
.form-row input::placeholder {
  color: rgba(246,241,231,0.45);
}
.lead-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: rgba(246,241,231,0.82);
  line-height: 1.6;
}
.lead-consent input { margin-top: 4px; accent-color: var(--accent); }
.newsletter-form .btn-primary { margin-top: 6px; }
.nl-status {
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  text-align: center;
}
.nl-status.error {
  background: rgba(177, 74, 58, 0.2);
  color: #ffe1db;
  border: 1px solid rgba(177, 74, 58, 0.5);
}
.nl-status.success {
  background: rgba(193, 154, 59, 0.2);
  color: #f9f1d6;
  border: 1px solid rgba(193, 154, 59, 0.5);
  padding: 22px 18px;
  text-align: start;
}
.nl-status.success h3 {
  font-family: var(--serif);
  color: var(--accent);
  margin: 0 0 8px;
  font-size: 20px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0a3d24;
  color: rgba(246,241,231,0.8);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(246,241,231,0.16);
}
.footer-brand-col .footer-brand-link {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  font-weight: 700;
}
.footer-brand-col .footer-brand-link:hover { color: #f6f1e7; text-decoration: none; }
.footer-tagline {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(246,241,231,0.7);
  max-width: 360px;
}
.footer-col h4 {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--accent);
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: rgba(246,241,231,0.8);
  font-size: 14.5px;
}
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  padding-top: 22px;
  text-align: center;
}
.footer-bottom p {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: rgba(246,241,231,0.6);
}
.footer-disclaimer {
  font-size: 13px;
  color: rgba(246,241,231,0.5) !important;
  max-width: 820px;
  margin: 0 auto !important;
  line-height: 1.7;
}

/* ---------- Page Hero (legal pages) ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  padding: 70px 0 50px;
}
.page-hero .hero-eyebrow { background: rgba(15,81,50,0.08); color: var(--primary); }
.page-hero .hero-heading { color: var(--primary); text-shadow: none; }
.page-hero .hero-lead { color: var(--ink-soft); text-shadow: none; }

/* ---------- Legal content ---------- */
.legal-content {
  padding: 50px 0 90px;
  background: var(--bg);
}
.legal-content .container {
  max-width: 820px;
}
.legal-content h2 {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--primary);
  margin: 38px 0 14px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}
.legal-content h2:first-of-type { margin-top: 8px; }
.legal-content p {
  margin: 12px 0;
  color: var(--ink-soft);
  line-height: 1.85;
  font-size: 16.5px;
}
.legal-content ul { margin: 12px 0; padding: 0 22px; }
.legal-content ul li {
  margin: 8px 0;
  color: var(--ink-soft);
  line-height: 1.85;
  font-size: 16.5px;
}
.back-link {
  display: inline-block;
  color: var(--accent-700);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 28px;
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 30px;
  transition: all 0.2s ease;
}
.back-link:hover {
  background: var(--accent);
  color: #1f1305;
  text-decoration: none;
}
.back-link-bottom { margin-top: 40px; }
.last-updated {
  font-size: 13px;
  color: var(--muted);
  margin-top: 30px;
  text-align: center;
  font-style: italic;
}

/* ---------- Desktop responsive (large screens) ---------- */
@media (min-width: 1024px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-row { min-height: 64px; }
  .nav-desktop { display: none; }
  .hero { min-height: 380px; padding: 60px 0; }
  .hero-heading { font-size: 30px; }
  .hero-lead { font-size: 17px; }
  .intro, .articles, .tips, .faq, .newsletter { padding: 60px 0; }
  .intro-grid, .newsletter-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 19px; }
  .legal-content h2 { font-size: 22px; }
  .legal-content p, .legal-content ul li { font-size: 15.5px; }
  .section-heading { font-size: 26px; }
  .nav-brand-text { font-size: 18px; }
}
