/* =============================================
   TALEEMY.ORG — Main Stylesheet
   Brand: #BD1E2D (crimson) | #1D70B7 (blue) | #FFFFFF
   Fonts: Montserrat (headings) | Open Sans (body) | Tajawal (Arabic)
   ============================================= */

:root {
  --red: #BD1E2D;
  --red-dark: #9a1825;
  --red-light: #f5e6e8;
  --blue: #1D70B7;
  --blue-dark: #155a95;
  --blue-light: #e6f0fa;
  --white: #ffffff;
  --off-white: #f8f9fc;
  --gray-50: #f4f5f7;
  --gray-100: #e8eaed;
  --gray-300: #bdc1c9;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-arabic: 'Tajawal', sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.18);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}
[dir="rtl"] body { font-family: var(--font-arabic); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: var(--font-arabic); }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* TYPOGRAPHY */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.2; }

/* UTILITIES */
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.section-title--center { text-align: center; }
.section-subtitle {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
  color: var(--gray-500);
  font-size: 1.05rem;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(189,30,45,0.35);
}
.btn-primary:hover {
  background: var(--red-dark);
  box-shadow: 0 6px 20px rgba(189,30,45,0.45);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}
.btn-full { width: 100%; justify-content: center; }

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 1rem 0;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0;
}
.navbar.scrolled .nav-link { color: var(--gray-700); }
.navbar.scrolled .nav-logo .logo-primary { color: var(--red); }
.navbar.scrolled .nav-logo .logo-arabic { color: var(--blue); }
.navbar.scrolled .lang-toggle { color: var(--gray-700); border-color: var(--gray-300); }
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.nav-logo .logo-primary {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: -0.02em;
  transition: color var(--transition);
}
.nav-logo .logo-arabic {
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.75);
  transition: color var(--transition);
}
.nav-links { display: flex; align-items: center; gap: 0.5rem; }
.nav-link {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.navbar.scrolled .nav-link:hover { background: var(--gray-50); color: var(--gray-900); }
.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  margin-left: 0.5rem;
}
.nav-cta:hover { background: var(--red-dark); transform: translateY(-1px); }
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--transition);
  margin-left: 0.5rem;
  font-family: var(--font-heading);
}
.lang-toggle:hover { border-color: var(--white); color: var(--white); }
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}
.navbar.scrolled .mobile-menu-btn span { background: var(--gray-700); }
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  gap: 0.5rem;
}
.mobile-menu .nav-link { color: var(--gray-700); }
.mobile-menu.open { display: flex; }

/* ===================== HERO ===================== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d1b2e 0%, #1a2a4a 40%, #1D70B7 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 7rem 0 5rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #BD1E2D, transparent 70%);
  top: -200px; right: -100px;
}
.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #1D70B7, transparent 70%);
  bottom: -100px; left: -100px;
}
.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease both;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.7s 0.1s ease both;
}
.hero-title-line { display: block; color: rgba(255,255,255,0.85); }
.hero-title-accent {
  display: block;
  color: var(--white);
  position: relative;
}
.hero-title-accent::after {
  content: '';
  display: block;
  height: 5px;
  width: 80px;
  background: var(--red);
  border-radius: 3px;
  margin-top: 0.5rem;
}
.hero-subtitle {
  max-width: 640px;
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem;
  line-height: 1.75;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.7s 0.2s ease both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  animation: fadeInUp 0.7s 0.3s ease both;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeInUp 0.7s 0.4s ease both;
}
.stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.6); font-weight: 500; }
.stat-divider { width: 1px; height: 48px; background: rgba(255,255,255,0.2); }
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-scroll-indicator span {
  display: block;
  width: 1.5px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ===================== ABOUT ===================== */
.about {
  padding: 7rem 0;
  background: var(--white);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-text {
  color: var(--gray-500);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.about-pillars { display: flex; flex-direction: column; gap: 1.5rem; }
.pillar {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.pillar:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.pillar-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pillar-icon--red { background: var(--red-light); color: var(--red); }
.pillar-icon--blue { background: var(--blue-light); color: var(--blue); }
.pillar-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.3rem;
  font-family: var(--font-heading);
}
.pillar-text { font-size: 0.875rem; color: var(--gray-500); line-height: 1.6; }
[dir="rtl"] .pillar { border-left: none; border-right: 3px solid transparent; }
[dir="rtl"] .pillar:hover { transform: translateX(-4px); }

/* About visual */
.about-visual { display: flex; align-items: center; justify-content: center; }
.about-card-stack { position: relative; width: 320px; height: 220px; }
.visual-card {
  position: absolute;
  border-radius: var(--radius-lg);
  transition: all 0.4s ease;
}
.visual-card--back {
  inset: 0;
  background: var(--blue);
  opacity: 0.2;
  transform: rotate(6deg) translateY(8px);
}
.visual-card--mid {
  inset: 0;
  background: var(--red);
  opacity: 0.25;
  transform: rotate(3deg) translateY(4px);
}
.visual-card--front {
  inset: 0;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.visual-card-logo {
  font-family: var(--font-arabic);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.visual-card-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-900);
}
.visual-card-meta {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}
.visual-card-divider { height: 1px; background: var(--gray-100); margin-bottom: 1rem; }
.visual-card-platforms { display: flex; gap: 1.5rem; }
.vcp { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; color: var(--gray-700); }
.vcp-dot { width: 8px; height: 8px; border-radius: 50%; }
.vcp-dot--red { background: var(--red); }
.vcp-dot--blue { background: var(--blue); }

/* ===================== SUBSIDIARIES ===================== */
.subsidiaries {
  padding: 7rem 0;
  background: var(--off-white);
}
.platforms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.platform-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--gray-100);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.platform-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.platform-card-header { display: flex; align-items: center; justify-content: space-between; }
.platform-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.platform-card--qatared .platform-icon { background: var(--red-light); color: var(--red); }
.platform-card--maharaty .platform-icon { background: var(--blue-light); color: var(--blue); }
.platform-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}
.platform-card--qatared .platform-tag { background: var(--red-light); color: var(--red); }
.platform-card--maharaty .platform-tag { background: var(--blue-light); color: var(--blue); }
.platform-name {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--gray-900);
  font-family: var(--font-heading);
}
.platform-name-ar { font-family: var(--font-arabic); font-size: 1.4rem; }
.platform-card--qatared .platform-name { color: var(--red); }
.platform-card--maharaty .platform-name { color: var(--blue); }
.platform-desc { color: var(--gray-500); font-size: 0.95rem; line-height: 1.75; }
.platform-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.platform-features li {
  font-size: 0.875rem;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.platform-features li::before {
  content: '✓';
  font-weight: 700;
  font-size: 0.75rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.platform-card--qatared .platform-features li::before { background: var(--red-light); color: var(--red); }
.platform-card--maharaty .platform-features li::before { background: var(--blue-light); color: var(--blue); }
.platform-audience {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
}
.platform-cta {
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition);
  display: inline-block;
}
.platform-card--qatared .platform-cta { color: var(--red); }
.platform-card--maharaty .platform-cta { color: var(--blue); }
.platform-cta:hover { gap: 0.75rem; opacity: 0.8; }

/* ===================== CONTACT ===================== */
.contact {
  padding: 7rem 0;
  background: var(--white);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contact-text { color: var(--gray-500); font-size: 1.05rem; margin-bottom: 2rem; line-height: 1.8; }
.contact-details { display: flex; flex-direction: column; gap: 1rem; }
.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gray-700);
  font-size: 0.95rem;
}
.contact-detail-icon {
  width: 40px; height: 40px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-form-wrap {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1.5px solid var(--gray-100);
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.82rem; font-weight: 700; color: var(--gray-700); letter-spacing: 0.02em; }
.form-input {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-900);
  background: var(--white);
  transition: all var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,112,183,0.12); }
.form-textarea { min-height: 140px; resize: vertical; }
.form-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* ===================== FOOTER ===================== */
.footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 4rem 0 0;
}
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo { font-size: 1.4rem; font-weight: 900; margin-bottom: 0.75rem; }
.footer-logo .logo-primary { font-family: var(--font-heading); color: var(--red); }
.footer-logo .logo-arabic { font-family: var(--font-arabic); color: rgba(255,255,255,0.7); margin-left: 0.4rem; }
.footer-tagline { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-bottom: 0.5rem; }
.footer-qfc { font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.footer-links-title { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 1rem; font-family: var(--font-heading); }
.footer-link { display: block; color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 0.6rem; transition: color var(--transition); }
.footer-link:hover { color: var(--white); }
.footer-bottom { padding: 1.5rem 0; }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* ===================== ANIMATIONS ===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.6; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.6s ease, transform 0.6s 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; }

/* ===================== RTL OVERRIDES ===================== */
[dir="rtl"] .hero-title-accent::after { margin-left: auto; }
[dir="rtl"] .footer-logo .logo-arabic { margin-left: 0; margin-right: 0.4rem; }
[dir="rtl"] .nav-cta { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .lang-toggle { margin-left: 0; margin-right: 0.5rem; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .platforms-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .stat-divider { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero { padding: 6rem 0 4rem; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
