/* =========================================
   Vantelyo — Main Stylesheet
   ========================================= */
:root {
  --sage: #8FA68B;
  --sage-dark: #4F6F4F;
  --dark-green: #2D5A27;
  --cream: #FDFBF7;
  --cream-dark: #F5F1E9;
  --white: #FFFFFF;
  --text: #1F2A1F;
  --text-muted: #5F6D5F;
  --accent: #C9A227;
  --border: #E2DCCF;
  --shadow: 0 4px 20px rgba(45, 90, 39, 0.08);
  --radius: 12px;
  --transition: 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  lang: en;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Noto Sans Arabic", "Amiri";
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: var(--dark-green);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--sage-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--dark-green);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Header / Nav */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--dark-green);
}

.nav-brand span {
  color: var(--sage-dark);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

.nav-links a:hover {
  color: var(--sage-dark);
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
  margin-left: 1rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-muted);
}

.lang-btn.active {
  background: var(--dark-green);
  color: var(--white);
  border-color: var(--dark-green);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark-green);
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--dark-green) 0%, var(--sage-dark) 100%);
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.9);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--text);
}

.btn-primary:hover {
  background: #b8921f;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--dark-green);
  border: 2px solid var(--dark-green);
}

.btn-outline:hover {
  background: var(--dark-green);
  color: var(--white);
  border-color: var(--dark-green);
}

/* Light-on-dark variant for the hero section */
.hero .btn-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--sage-dark);
}

.card h3 {
  font-size: 1.25rem;
  color: var(--dark-green);
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* App Section */
.app-hero {
  background: var(--cream-dark);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.app-hero h2 {
  font-size: 2rem;
  color: var(--dark-green);
  margin-bottom: 1rem;
}

.app-hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--cream-dark);
}

.blog-content {
  padding: 1.5rem;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.blog-card h3 {
  font-size: 1.15rem;
  color: var(--dark-green);
  margin-bottom: 0.5rem;
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sage-dark);
}

.read-more:hover {
  color: var(--dark-green);
}

/* Footer */
footer {
  background: var(--dark-green);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.85);
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
    background: var(--white);
    border-top: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .lang-switch {
    margin-left: 0;
    order: -1;
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.5rem;
  }

  .hero {
    padding: 3rem 1rem;
    border-radius: 0 0 24px 24px;
  }

  .section {
    padding: 2.5rem 0;
  }
}

/* Utility */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
.highlight { color: var(--sage-dark); font-weight: 700; }

/* Article pages */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.article-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sage-dark);
}

.article-header h1 {
  color: var(--dark-green);
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.article-category {
  color: var(--dark-green);
  font-weight: 600;
}

.article-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  background: var(--cream-dark);
}

.article-body {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-body h2 {
  color: var(--dark-green);
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
}

.article-body h3 {
  color: var(--dark-green);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body strong {
  color: var(--dark-green);
}

.article-body a {
  color: var(--sage-dark);
  text-decoration: underline;
}

.article-figure {
  margin: 1.75rem 0;
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: var(--cream-dark);
}

.article-figure figcaption {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: var(--cream-dark);
  color: var(--dark-green);
  font-weight: 600;
}

[dir="rtl"] .article-body th,
[dir="rtl"] .article-body td {
  text-align: right;
}

.lang-alt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-green);
  background: var(--white);
}

.related-reading {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--cream-dark);
  border-radius: var(--radius);
}

.related-reading h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: var(--dark-green);
}

.related-reading ul {
  margin: 0 0 0 1.25rem;
  padding: 0;
}

.related-reading li {
  margin-bottom: 0.45rem;
  line-height: 1.5;
}

.related-reading a {
  color: var(--dark-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

[dir="rtl"] .related-reading ul {
  margin-right: 1.25rem;
  margin-left: 0;
}

.publisher-box {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--cream-dark);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.publisher-box strong {
  color: var(--dark-green);
}

.publisher-box a {
  color: var(--dark-green);
  text-decoration: underline;
}

/* Advertising */
.ad-slot {
  margin: 2rem auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.ad-slot--empty {
  display: none !important;
}

.ad-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Consent banner */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  padding: 1rem;
}

.consent-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: space-between;
}

.consent-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.consent-text strong {
  display: block;
  color: var(--dark-green);
  margin-bottom: 0.25rem;
}

.consent-text p {
  margin: 0;
}

.consent-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.consent-option {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  max-width: 220px;
}

.consent-option input {
  margin-top: 0.2rem;
  accent-color: var(--dark-green);
}

.consent-option-text strong {
  display: block;
  color: var(--dark-green);
  font-size: 0.85rem;
}

.consent-option-text small {
  display: block;
  line-height: 1.35;
}

.consent-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--dark-green);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 6px 0;
  z-index: 10000;
}

.skip-link:focus {
  left: 0;
}

@media (max-width: 640px) {
  .consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .consent-actions {
    justify-content: flex-end;
  }

  .article-header h1 {
    font-size: 1.6rem;
  }
}

[dir="rtl"] .article-body ul,
[dir="rtl"] .article-body ol {
  margin-right: 1.5rem;
  margin-left: 0;
}

[dir="rtl"] .consent-inner {
  text-align: right;
}