/*
Theme Name: BLN Academy
Theme URI: https://bln-academy.com
Author: BLN Academy
Author URI: https://bln-academy.com
Description: Elementor-ready blank theme for BLN Academy — RTL-first Arabic learning platform with design tokens, floating motif animations, and full-width page layout autonomy.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bln-academy
Tags: rtl-language-support, custom-colors, block-styles, full-site-editing, elementor
*/

/* ===== BLN Academy Tokens ===== */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --fg: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #15325b;
  --accent-secondary: #c9a24a;
  --font-display: 'Cairo Play', 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Anonymous Pro', 'Liberation Mono', monospace;
  --radius: 8px;
  --shadow-card: 0 2px 12px rgba(21, 50, 91, 0.08);
  --shadow-card-hover: 0 4px 24px rgba(21, 50, 91, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  direction: rtl;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--accent);
  border-bottom: 1px solid rgba(201, 162, 74, 0.2);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.25); }
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo .logo-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-secondary);
  border-radius: 50%;
  display: inline-block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: #ffffff; }
.nav-cta {
  background: var(--accent-secondary);
  color: var(--accent) !important;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-weight: 600 !important;
  font-size: 14px !important;
  letter-spacing: 0.02em !important;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: #d4ad55; transform: translateY(-1px); }
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: var(--accent);
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-content {
  max-width: 640px;
}
.hero-kicker {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .gold { color: var(--accent-secondary); }
.hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-secondary);
  color: var(--accent);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.btn-primary:hover { background: #d4ad55; transform: translateY(-2px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  letter-spacing: 0.01em;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); }

/* Floating alphanumeric motifs */
.motifs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.motif-char {
  position: absolute;
  font-family: var(--font-mono);
  color: rgba(201, 162, 74, 0.12);
  font-weight: 700;
  user-select: none;
  animation: motifFloat 20s ease-in-out infinite;
}
.motif-char:nth-child(odd) { animation-direction: reverse; }
@keyframes motifFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-18px) rotate(3deg); }
  66% { transform: translateY(10px) rotate(-2deg); }
}

/* ===== Stats Strip ===== */
.stats-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 32px 24px;
}
.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ===== Sections ===== */
.section {
  padding: 80px 24px;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-kicker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-desc {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  margin: 12px auto 0;
  line-height: 1.65;
}

/* ===== Why BLN (Features) ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(21, 50, 91, 0.06);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

/* ===== Featured Courses ===== */
.courses-section { background: var(--bg); }
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s, transform 0.2s;
}
.course-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.course-thumb {
  height: 180px;
  background: var(--accent);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-thumb-char {
  position: absolute;
  font-family: var(--font-mono);
  color: rgba(201, 162, 74, 0.15);
  font-weight: 700;
  user-select: none;
}
.course-thumb-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-secondary);
  background: rgba(21, 50, 91, 0.6);
  padding: 6px 16px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  z-index: 1;
  backdrop-filter: blur(4px);
}
.course-body {
  padding: 20px 24px 24px;
}
.course-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.course-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.course-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(21, 50, 91, 0.06);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.course-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.course-link:hover { gap: 8px; }

/* ===== Mysterious Quote ===== */
.quote-section {
  background: var(--accent);
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}
.quote-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.quote-marks {
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--accent-secondary);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.6;
}
.quote-text {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.quote-attr {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
}
.quote-attr strong { color: rgba(255,255,255,0.8); font-weight: 600; }

/* ===== CTA Section ===== */
.cta-section {
  padding: 80px 24px;
  text-align: center;
}
.cta-inner {
  max-width: 640px;
  margin: 0 auto;
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.cta-desc {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.btn-dark:hover { background: #0f2744; transform: translateY(-2px); }

/* ===== Footer ===== */
.footer {
  background: var(--accent);
  color: rgba(255,255,255,0.6);
  padding: 48px 24px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 12px;
}
.footer-desc {
  font-size: 14px;
  line-height: 1.65;
  max-width: 300px;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: #ffffff; }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.footer-bottom a {
  color: var(--accent-secondary);
  text-decoration: none;
}

/* ===== Page Header (subpages) ===== */
.page-header {
  background: var(--accent);
  padding: 120px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header .motifs { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.page-header .motif-char { position: absolute; font-family: var(--font-mono); color: rgba(201,162,74,0.1); font-weight: 700; user-select: none; animation: motifFloat 20s ease-in-out infinite; }
.page-header .motif-char:nth-child(odd) { animation-direction: reverse; }
.page-header-content { position: relative; z-index: 1; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.page-header p {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--accent);
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .hero-inner { padding: 60px 24px; }
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 16px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 480px) {
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary { width: 100%; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; }
}
