/* =====================================================
   Dar Manahij — دار مناهج
   style.css — Main Stylesheet
   Version: 1.0.0
   Luxury Academic Publishing House Design
   ===================================================== */

/* ── Google Fonts ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties (Design Tokens) ────────── */
:root {
  /* Brand Colors */
  --burgundy:       #6A1B2D;
  --burgundy-dark:  #4E1220;
  --burgundy-light: #8B2541;
  --gold:           #D4AF37;
  --gold-light:     #E8CC66;
  --gold-dark:      #B8941E;
  --charcoal:       #2C2C2C;
  --charcoal-light: #4A4A4A;
  --ivory:          #FAF7F2;
  --ivory-dark:     #F0EAE0;
  --white:          #FFFFFF;

  /* Typography */
  --font-arabic:    'Noto Naskh Arabic', 'Traditional Arabic', serif;
  --font-english:   'Playfair Display', Georgia, serif;
  --font-ui:        'Inter', 'Segoe UI', sans-serif;

  /* Spacing Scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width:     1280px;
  --nav-height:    80px;
  --border-radius: 8px;
  --card-radius:   12px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(106, 27, 45, 0.08);
  --shadow-md:  0 4px 20px rgba(106, 27, 45, 0.12);
  --shadow-lg:  0 8px 40px rgba(106, 27, 45, 0.18);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.25);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-med:  0.35s ease;
  --transition-slow: 0.6s ease;
}

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* Arabic (RTL) — Default */
html[lang="ar"] {
  direction: rtl;
}

/* English (LTR) */
html[lang="en"] {
  direction: ltr;
}

body {
  background-color: var(--ivory);
  color: var(--charcoal);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Arabic body uses Arabic font */
html[lang="ar"] body {
  font-family: var(--font-arabic);
  font-size: 1.05rem;
}

/* English body uses English fonts */
html[lang="en"] body {
  font-family: var(--font-ui);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--burgundy);
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 {
  font-family: var(--font-arabic);
  font-weight: 700;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4 {
  font-family: var(--font-english);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* ── Utility Classes ──────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--burgundy);
  margin-bottom: var(--space-xs);
  position: relative;
}

.section-subtitle {
  color: var(--charcoal-light);
  font-size: 1rem;
  margin-bottom: var(--space-lg);
  max-width: 680px;
}

html[lang="ar"] .section-subtitle {
  margin-inline-start: 0;
}

html[lang="en"] .section-subtitle {
  margin-inline-start: 0;
}

.gold-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin: var(--space-xs) 0 var(--space-md);
  border-radius: 2px;
}

html[lang="ar"] .gold-divider {
  margin-inline-start: 0;
}

.section-header {
  margin-bottom: var(--space-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-med);
  text-decoration: none;
  white-space: nowrap;
}

html[lang="ar"] .btn {
  font-family: var(--font-arabic);
}

html[lang="en"] .btn {
  font-family: var(--font-ui);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-burgundy {
  background: var(--burgundy);
  color: var(--white);
  border-color: var(--burgundy);
}

.btn-burgundy:hover {
  background: var(--burgundy-dark);
  border-color: var(--burgundy-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Language Toggle Visibility ───────────────────── */
/* Elements shown only in Arabic */
.ar-only { display: none; }
.en-only { display: none; }

html[lang="ar"] .ar-only { display: revert; }
html[lang="ar"] .en-only { display: none !important; }

html[lang="en"] .en-only { display: revert; }
html[lang="en"] .ar-only { display: none !important; }

/* Inline elements */
span.ar-only, a.ar-only, span.en-only, a.en-only {
  display: none;
}
html[lang="ar"] span.ar-only, html[lang="ar"] a.ar-only { display: inline; }
html[lang="en"] span.en-only, html[lang="en"] a.en-only { display: inline; }

/* ── Navigation ───────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--burgundy);
  z-index: 1000;
  transition: box-shadow var(--transition-med), background var(--transition-med);
}

#navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  background: var(--burgundy-dark);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-sm);
  min-width: 0;
}

html[lang="en"] .nav-inner {
  gap: 0.5rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--charcoal);
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(212,175,55,0.4);
  font-family: var(--font-arabic);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text .logo-ar {
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.logo-text .logo-en {
  font-family: var(--font-english);
  font-size: 0.75rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
  min-width: 0; /* allow flex shrinking */
  overflow: hidden;
}

.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
}

html[lang="ar"] .nav-link {
  font-family: var(--font-arabic);
}

/* English nav links: tighter to fit longer labels */
html[lang="en"] .nav-link {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0;
  padding: 0.4rem 0.5rem;
}

html[lang="en"] .nav-menu {
  gap: 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.1);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0.75rem;
  inset-inline-end: 0.75rem;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* Nav Controls (language + hamburger) */
.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-ui);
  letter-spacing: 0.05em;
}

.lang-btn.active {
  background: var(--gold);
  color: var(--charcoal);
}

.lang-btn:hover:not(.active) {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition-med);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero Section ─────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--burgundy-dark) 0%,
    var(--burgundy) 50%,
    #7D2038 100%
  );
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* Decorative background pattern */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(212,175,55,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(212,175,55,0.05) 0%, transparent 40%);
  pointer-events: none;
}

/* Gold geometric accent */
#hero::after {
  content: '';
  position: absolute;
  inset-inline-end: -80px;
  top: 10%;
  width: 400px;
  height: 400px;
  border: 2px solid rgba(212,175,55,0.15);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

html[lang="ar"] .hero-content {
  text-align: start;
}

html[lang="en"] .hero-content {
  text-align: start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--gold-light);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}

html[lang="ar"] .hero-badge { font-family: var(--font-arabic); }
html[lang="en"] .hero-badge { font-family: var(--font-ui); letter-spacing: 0.04em; }

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

html[lang="ar"] .hero-title { font-family: var(--font-arabic); }
html[lang="en"] .hero-title { font-family: var(--font-english); }

.hero-title .gold-word {
  color: var(--gold);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-lg);
  max-width: 580px;
  line-height: 1.8;
}

html[lang="ar"] .hero-subtitle { font-family: var(--font-arabic); }
html[lang="en"] .hero-subtitle { font-family: var(--font-ui); }

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Hero decorative right panel */
.hero-decoration {
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-emblem {
  width: 280px;
  height: 280px;
  position: relative;
}

.hero-emblem .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.2);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-ring 4s ease-in-out infinite;
}

.hero-emblem .ring-1 { width: 100%; height: 100%; animation-delay: 0s; }
.hero-emblem .ring-2 { width: 75%; height: 75%; border-color: rgba(212,175,55,0.3); animation-delay: 0.5s; }
.hero-emblem .ring-3 { width: 50%; height: 50%; border-color: rgba(212,175,55,0.5); animation-delay: 1s; }

.hero-emblem .center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-arabic);
  font-size: 2rem;
  font-weight: 700;
  color: var(--charcoal);
  box-shadow: 0 8px 32px rgba(212,175,55,0.4);
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.03); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  animation: bounce 2s ease-in-out infinite;
}

html[lang="ar"] .scroll-indicator { font-family: var(--font-arabic); }
html[lang="en"] .scroll-indicator { font-family: var(--font-ui); }

.scroll-indicator::after {
  content: '\2193';
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── Stats Section ────────────────────────────────── */
#stats {
  background: var(--charcoal);
  padding: var(--space-xl) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(212,175,55,0.15);
}

.stat-item {
  background: var(--charcoal);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  position: relative;
  transition: background var(--transition-med);
}

.stat-item:hover {
  background: #363636;
}

.stat-number {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: var(--font-english);
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}

html[lang="ar"] .stat-label { font-family: var(--font-arabic); }
html[lang="en"] .stat-label { font-family: var(--font-ui); }

/* ── Section Base ─────────────────────────────────── */
.section {
  padding: var(--space-2xl) 0;
}

.section--ivory {
  background: var(--ivory);
}

.section--ivory-dark {
  background: var(--ivory-dark);
}

.section--white {
  background: var(--white);
}

.section--burgundy {
  background: var(--burgundy);
}

/* ── About Section ────────────────────────────────── */
#about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-text p {
  margin-bottom: var(--space-md);
  color: var(--charcoal-light);
  font-size: 1.05rem;
  line-height: 1.9;
}

.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.fact-card {
  background: var(--ivory);
  border: 1px solid var(--ivory-dark);
  border-inline-start: 3px solid var(--gold);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
}

.fact-card .fact-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--burgundy);
  font-family: var(--font-english);
}

.fact-card .fact-desc {
  font-size: 0.85rem;
  color: var(--charcoal-light);
}

html[lang="ar"] .fact-card .fact-desc { font-family: var(--font-arabic); }
html[lang="en"] .fact-card .fact-desc { font-family: var(--font-ui); }

/* About Visual */
.about-visual {
  position: relative;
  height: 420px;
  border-radius: var(--card-radius);
  overflow: hidden;
}

.about-visual-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--burgundy-dark), var(--burgundy));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  text-align: center;
}

.about-visual-icon {
  font-size: 4rem;
  margin-bottom: var(--space-sm);
}

.about-visual-text {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  font-weight: 600;
}

html[lang="ar"] .about-visual-text { font-family: var(--font-arabic); }
html[lang="en"] .about-visual-text { font-family: var(--font-english); }

.about-visual-sub {
  color: var(--gold-light);
  font-size: 0.9rem;
}

html[lang="ar"] .about-visual-sub { font-family: var(--font-arabic); }
html[lang="en"] .about-visual-sub { font-family: var(--font-ui); }

.about-visual-badge {
  position: absolute;
  bottom: var(--space-md);
  inset-inline-end: var(--space-md);
  background: var(--gold);
  color: var(--charcoal);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

/* ── Services Section ─────────────────────────────── */
#services {
  background: var(--ivory);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.service-card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: var(--space-lg);
  border: 1px solid var(--ivory-dark);
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(to bottom, var(--gold), var(--burgundy));
  transition: height var(--transition-slow);
}

.service-card:hover::before {
  height: 100%;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(212,175,55,0.3);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(106,27,45,0.08), rgba(106,27,45,0.15));
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(106,27,45,0.1);
}

.service-title {
  font-size: 1.2rem;
  color: var(--burgundy);
  margin-bottom: var(--space-xs);
}

html[lang="ar"] .service-title { font-family: var(--font-arabic); }
html[lang="en"] .service-title { font-family: var(--font-english); }

.service-desc {
  color: var(--charcoal-light);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--charcoal);
}

.feature-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Academic Publishing ──────────────────────────── */
#publishing {
  background: var(--white);
}

.publishing-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--ivory-dark);
  padding-bottom: 1px;
}

.pub-tab {
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: all var(--transition-fast);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

html[lang="ar"] .pub-tab { font-family: var(--font-arabic); }
html[lang="en"] .pub-tab { font-family: var(--font-ui); }

.pub-tab.active,
.pub-tab:hover {
  color: var(--burgundy);
  border-bottom-color: var(--gold);
  background: rgba(106,27,45,0.03);
}

.pub-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.pub-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.publishing-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.pub-description p {
  margin-bottom: var(--space-md);
  color: var(--charcoal-light);
  line-height: 1.9;
}

.pub-category-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.pub-category {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: var(--ivory);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  color: var(--charcoal);
  border: 1px solid var(--ivory-dark);
}

.pub-category .cat-icon {
  color: var(--gold-dark);
  font-size: 1rem;
}

.pub-visual-card {
  background: linear-gradient(135deg, var(--ivory), var(--ivory-dark));
  border-radius: var(--card-radius);
  padding: var(--space-lg);
  border: 1px solid rgba(212,175,55,0.2);
  text-align: center;
}

.pub-visual-icon-large {
  font-size: 4rem;
  margin-bottom: var(--space-md);
}

.pub-visual-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
  color: var(--burgundy);
}

html[lang="ar"] .pub-visual-card h3 { font-family: var(--font-arabic); }
html[lang="en"] .pub-visual-card h3 { font-family: var(--font-english); }

.pub-visual-card p {
  color: var(--charcoal-light);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ── GEMZ Platform ────────────────────────────────── */
#gemz {
  background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 100%);
  position: relative;
  overflow: hidden;
}

#gemz::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(212,175,55,0.08), transparent 60%);
  pointer-events: none;
}

.gemz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.gemz-content .section-title {
  color: var(--white);
}

.gemz-content .section-subtitle {
  color: rgba(255,255,255,0.8);
}

.gemz-content .gold-divider {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.gemz-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.gemz-feature {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.gemz-feature-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.gemz-feature-text .feat-title {
  color: var(--gold-light);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

html[lang="ar"] .gemz-feature-text .feat-title { font-family: var(--font-arabic); }
html[lang="en"] .gemz-feature-text .feat-title { font-family: var(--font-ui); }

.gemz-feature-text .feat-desc {
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  line-height: 1.6;
}

html[lang="ar"] .gemz-feature-text .feat-desc { font-family: var(--font-arabic); }
html[lang="en"] .gemz-feature-text .feat-desc { font-family: var(--font-ui); }

.gemz-cta {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.gemz-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gemz-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: var(--card-radius);
  padding: var(--space-lg);
  max-width: 380px;
  width: 100%;
}

.gemz-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(212,175,55,0.2);
}

.gemz-logo-badge {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--charcoal);
  font-family: var(--font-english);
}

.gemz-card-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
}

html[lang="ar"] .gemz-card-title { font-family: var(--font-arabic); }
html[lang="en"] .gemz-card-title { font-family: var(--font-english); }

.gemz-card-sub {
  color: var(--gold-light);
  font-size: 0.8rem;
}

html[lang="ar"] .gemz-card-sub { font-family: var(--font-arabic); }
html[lang="en"] .gemz-card-sub { font-family: var(--font-ui); }

.gemz-specs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.gemz-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.gemz-spec-label {
  color: rgba(255,255,255,0.6);
}

html[lang="ar"] .gemz-spec-label { font-family: var(--font-arabic); }
html[lang="en"] .gemz-spec-label { font-family: var(--font-ui); }

.gemz-spec-value {
  color: var(--gold-light);
  font-weight: 600;
}

html[lang="ar"] .gemz-spec-value { font-family: var(--font-arabic); }
html[lang="en"] .gemz-spec-value { font-family: var(--font-ui); }

/* ── News & Data Providers ────────────────────────── */
#providers {
  background: var(--ivory);
}

.providers-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-xl);
}

.provider-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}

.prov-filter-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--ivory-dark);
  background: var(--white);
  border-radius: 30px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--charcoal-light);
}

html[lang="ar"] .prov-filter-btn { font-family: var(--font-arabic); }
html[lang="en"] .prov-filter-btn { font-family: var(--font-ui); }

.prov-filter-btn.active,
.prov-filter-btn:hover {
  background: var(--burgundy);
  color: var(--white);
  border-color: var(--burgundy);
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-sm);
}

.provider-card {
  background: var(--white);
  border: 1px solid var(--ivory-dark);
  border-radius: var(--card-radius);
  padding: var(--space-sm);
  text-align: center;
  transition: all var(--transition-med);
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.provider-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(212,175,55,0.4);
  transform: translateY(-2px);
}

.provider-logo-placeholder {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(106,27,45,0.07), rgba(212,175,55,0.12));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid rgba(212,175,55,0.15);
}

.provider-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
  font-family: var(--font-ui);
}

.provider-category-tag {
  font-size: 0.7rem;
  color: var(--charcoal-light);
  background: var(--ivory-dark);
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-ui);
}

/* ── eLibrary Section ─────────────────────────────── */
#elibrary {
  background: var(--white);
}

.elibrary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-xl);
}

.elibrary-features-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.elibrary-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--ivory);
  border-radius: var(--border-radius);
  border: 1px solid var(--ivory-dark);
  transition: all var(--transition-fast);
}

.elibrary-feature:hover {
  border-color: rgba(212,175,55,0.35);
  background: rgba(250,247,242,0.8);
}

.elibrary-feature-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.elibrary-feature-body .ef-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--burgundy);
  margin-bottom: 0.2rem;
}

html[lang="ar"] .elibrary-feature-body .ef-title { font-family: var(--font-arabic); }
html[lang="en"] .elibrary-feature-body .ef-title { font-family: var(--font-ui); }

.elibrary-feature-body .ef-desc {
  font-size: 0.85rem;
  color: var(--charcoal-light);
  line-height: 1.6;
}

html[lang="ar"] .elibrary-feature-body .ef-desc { font-family: var(--font-arabic); }
html[lang="en"] .elibrary-feature-body .ef-desc { font-family: var(--font-ui); }

.elibrary-portal-visual {
  background: linear-gradient(135deg, var(--burgundy-dark), var(--burgundy));
  border-radius: var(--card-radius);
  padding: var(--space-lg);
  color: var(--white);
}

.portal-mockup {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: var(--border-radius);
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.portal-bar {
  background: rgba(212,175,55,0.15);
  height: 8px;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.portal-bar.short { width: 60%; }
.portal-bar.med { width: 80%; }
.portal-bar.full { width: 100%; }
.portal-bar.gold { background: rgba(212,175,55,0.5); }

.portal-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: var(--space-sm);
}

.portal-stat {
  text-align: center;
  padding: 0.6rem;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  border: 1px solid rgba(212,175,55,0.15);
}

.portal-stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-english);
}

.portal-stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
}

html[lang="ar"] .portal-stat-label { font-family: var(--font-arabic); }
html[lang="en"] .portal-stat-label { font-family: var(--font-ui); }

/* Publishers sub-grid */
.publishers-title {
  font-size: 1.3rem;
  color: var(--burgundy);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--ivory-dark);
}

html[lang="ar"] .publishers-title { font-family: var(--font-arabic); }
html[lang="en"] .publishers-title { font-family: var(--font-english); }

.publishers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
}

.publisher-card {
  background: var(--ivory);
  border: 1px solid var(--ivory-dark);
  border-radius: var(--card-radius);
  padding: var(--space-sm);
  text-align: center;
  transition: all var(--transition-med);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.publisher-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(106,27,45,0.2);
  transform: translateY(-2px);
}

.publisher-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, rgba(106,27,45,0.08), rgba(106,27,45,0.15));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1px solid rgba(106,27,45,0.1);
}

.publisher-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
  font-family: var(--font-ui);
}

.publisher-type {
  font-size: 0.7rem;
  color: var(--charcoal-light);
  font-family: var(--font-ui);
}

/* ── Partners Section ─────────────────────────────── */
#partners {
  background: var(--ivory-dark);
}

.partners-intro-text {
  max-width: 700px;
  color: var(--charcoal-light);
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

/* ── Contact Section ──────────────────────────────── */
#contact {
  background: var(--charcoal);
  color: var(--white);
  padding: var(--space-2xl) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info .section-title {
  color: var(--white);
}

.contact-info .section-subtitle {
  color: rgba(255,255,255,0.7);
}

.contact-info .gold-divider {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--gold);
}

.contact-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  font-family: var(--font-ui);
}

.contact-value {
  color: var(--white);
  font-size: 0.95rem;
}

html[lang="ar"] .contact-value { font-family: var(--font-arabic); }
html[lang="en"] .contact-value { font-family: var(--font-ui); }

.contact-address {
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
}

html[lang="ar"] .contact-address { font-family: var(--font-arabic); }
html[lang="en"] .contact-address { font-family: var(--font-ui); }

/* Map Container */
.map-container {
  border-radius: var(--card-radius);
  padding-bottom: var(--space-sm);
}

.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: rgba(255,255,255,0.6);
}

.map-icon {
  font-size: 3rem;
  color: var(--gold);
}

.map-label {
  font-size: 0.95rem;
  text-align: center;
}

html[lang="ar"] .map-label { font-family: var(--font-arabic); }
html[lang="en"] .map-label { font-family: var(--font-ui); }

.map-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  font-family: var(--font-ui);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

html[lang="ar"] .form-label { font-family: var(--font-arabic); }
html[lang="en"] .form-label { font-family: var(--font-ui); }

.form-input,
.form-textarea {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  color: var(--white);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
  outline: none;
  width: 100%;
  font-family: inherit;
}

html[lang="ar"] .form-input,
html[lang="ar"] .form-textarea {
  font-family: var(--font-arabic);
  text-align: right;
}

html[lang="en"] .form-input,
html[lang="en"] .form-textarea {
  font-family: var(--font-ui);
  text-align: left;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255,255,255,0.3);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/* ── Footer ───────────────────────────────────────── */
#footer {
  background: #1a1a1a;
  padding: var(--space-xl) 0 var(--space-md);
  color: rgba(255,255,255,0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-md);
  text-decoration: none;
}

.footer-brand .logo-mark-sm {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
}

.footer-brand .ft-logo-text .ft-ar {
  font-family: var(--font-arabic);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
}

.footer-brand .ft-logo-text .ft-en {
  font-family: var(--font-english);
  color: var(--gold-light);
  font-size: 0.72rem;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  max-width: 280px;
}

html[lang="ar"] .footer-desc { font-family: var(--font-arabic); }
html[lang="en"] .footer-desc { font-family: var(--font-ui); }

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: var(--space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212,175,55,0.2);
}

html[lang="ar"] .footer-heading { font-family: var(--font-arabic); }
html[lang="en"] .footer-heading { font-family: var(--font-ui); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition-fast);
  text-decoration: none;
}

html[lang="ar"] .footer-link { font-family: var(--font-arabic); }
html[lang="en"] .footer-link { font-family: var(--font-ui); }

.footer-link:hover {
  color: var(--gold-light);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}

html[lang="ar"] .footer-contact-item { font-family: var(--font-arabic); }
html[lang="en"] .footer-contact-item { font-family: var(--font-ui); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

html[lang="ar"] .footer-bottom { font-family: var(--font-arabic); }
html[lang="en"] .footer-bottom { font-family: var(--font-ui); }

.footer-bottom-links {
  display: flex;
  gap: var(--space-md);
}

.footer-bottom-links a {
  color: rgba(255,255,255,0.3);
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--gold-light);
}

/* ── Scroll Animations ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Gold Shimmer Effect ──────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.gold-shimmer {
  background: linear-gradient(
    90deg,
    var(--gold-dark) 0%,
    var(--gold-light) 50%,
    var(--gold-dark) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── Mobile Navigation Drawer ─────────────────────── */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  inset-inline-start: 0;
  width: 100%;
  background: var(--burgundy-dark);
  z-index: 999;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-med);
  border-top: 1px solid rgba(212,175,55,0.2);
}

.mobile-menu.open {
  transform: scaleY(1);
}

.mobile-menu-inner {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-nav-link {
  padding: 0.85rem 1rem;
  border-radius: var(--border-radius);
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  display: block;
  text-decoration: none;
}

html[lang="ar"] .mobile-nav-link { font-family: var(--font-arabic); text-align: right; }
html[lang="en"] .mobile-nav-link { font-family: var(--font-ui); text-align: left; }

.mobile-nav-link:hover {
  background: rgba(212,175,55,0.1);
  color: var(--gold-light);
}

/* ── Responsive — Tablet (≤1280px) ───────────────── */
/* Raised from 1024 to 1280 so English labels never overflow */
@media (max-width: 1280px) {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .about-grid,
  .contact-grid,
  .gemz-grid,
  .publishing-content-grid,
  .elibrary-grid,
  .providers-intro {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .hero-decoration {
    display: none;
  }
}

/* ── Responsive — Mobile (≤640px) ────────────────── */
@media (max-width: 640px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pub-category-list {
    grid-template-columns: 1fr;
  }

  .gemz-features {
    grid-template-columns: 1fr;
  }

  .providers-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .publishers-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-facts {
    grid-template-columns: 1fr;
  }

  .portal-stats-row {
    grid-template-columns: 1fr;
  }
}

/* ── RTL-Specific Overrides ───────────────────────── */
html[lang="ar"] .hero-emblem {
  right: auto;
  left: -80px;
}

html[lang="ar"] .about-visual-badge {
  inset-inline-end: var(--space-md);
  inset-inline-start: auto;
}

/* Print styles */
@media print {
  #navbar, .hamburger, .mobile-menu, .lang-switcher { display: none; }
  body { background: white; }
  .section { padding: 2rem 0; }
}
