/* RSN Education - Design Tokens & Visual Styles (Crimson & Obsidian) */
:root {
  --bg-base: #060811;
  --bg-surface: #0c1020;
  --bg-card: rgba(15, 21, 38, 0.7);
  --bg-card-hover: rgba(22, 30, 52, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-crimson: rgba(220, 38, 38, 0.35);
  --border-gold: rgba(245, 158, 11, 0.35);
  
  --primary-crimson: #8b1016;
  --primary-ruby: #dc2626;
  --primary-glow: rgba(220, 38, 38, 0.35);
  
  --accent-gold: #f59e0b;
  --accent-gold-light: #fbbf24;
  --accent-gold-glow: rgba(245, 158, 11, 0.25);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Cairo', sans-serif; }

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.65;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(139, 16, 22, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 90% 45%, rgba(245, 158, 11, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(220, 38, 38, 0.15) 0%, transparent 50%);
}

.container { width: 92%; max-width: 1240px; margin: 0 auto; }

/* 3D Canvas Background */
#canvas-3d {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

/* Header */
header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(6, 8, 17, 0.88);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img {
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--border-crimson); object-fit: cover;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.brand-text h1 { font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.brand-text span {
  font-size: 0.72rem; color: var(--accent-gold);
  font-weight: 700; letter-spacing: 0.5px; display: block;
}

.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.95rem;
  font-weight: 600; transition: all 0.2s;
}
.nav-links a:hover { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }

.header-actions { display: flex; align-items: center; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px; border-radius: 12px; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: all 0.25s ease-out; min-height: 46px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-ruby), var(--primary-crimson));
  color: #fff; box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.6);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(37, 211, 102, 0.5); }

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #b45309);
  color: #060811; font-weight: 800;
  box-shadow: 0 4px 18px var(--accent-gold-glow);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5); }

.btn-glass {
  background: rgba(255, 255, 255, 0.05); color: #fff;
  border-color: var(--border-subtle); backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }

.btn-lg { padding: 16px 32px; font-size: 1.08rem; }

/* Hero */
.hero {
  position: relative; padding: 110px 0 90px;
  text-align: center; overflow: hidden;
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px; border-radius: 30px;
  background: rgba(220, 38, 38, 0.12); border: 1px solid var(--border-crimson);
  color: #fca5a5; font-size: 0.88rem; font-weight: 700; margin-bottom: 24px;
}

.hero h2 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 900;
  line-height: 1.22; margin-bottom: 24px; letter-spacing: -1px;
}

.gradient-title {
  background: linear-gradient(135deg, #ffffff 40%, #fca5a5 70%, var(--accent-gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 820px; margin: 0 auto 40px;
  font-size: 1.22rem; color: var(--text-muted); font-weight: 500;
}

.hero-actions {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
}

/* 3D Interactive Card Grid */
.grid-3d {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  perspective: 1200px;
}

.card-3d {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 22px; padding: 34px; backdrop-filter: blur(14px);
  position: relative; transition: border-color 0.3s, transform 0.2s cubic-bezier(0.2, 0, 0.2, 1);
  transform-style: preserve-3d; will-change: transform;
}

.card-3d:hover {
  border-color: var(--border-crimson);
  box-shadow: 0 15px 35px rgba(139, 16, 22, 0.2);
}

.card-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem; margin-bottom: 22px;
}

.icon-crimson { background: rgba(220, 38, 38, 0.15); color: #ef4444; }
.icon-gold { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.card-3d h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 12px; color: #fff; }
.card-3d p { font-size: 0.98rem; color: var(--text-muted); line-height: 1.65; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* Director & Teacher Comfort Section */
.comfort-section { padding: 80px 0; }
.comfort-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.comfort-card {
  background: linear-gradient(145deg, rgba(15, 22, 42, 0.8), rgba(8, 11, 22, 0.95));
  border: 1px solid var(--border-subtle); border-radius: 26px; padding: 40px;
  position: relative; overflow: hidden; transition: all 0.3s;
}
.comfort-card:hover {
  border-color: var(--border-crimson);
  box-shadow: 0 16px 40px rgba(139, 16, 22, 0.22);
}
.comfort-header { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.comfort-badge {
  display: inline-block; padding: 4px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 800;
  margin-bottom: 12px;
}
.badge-director { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); border: 1px solid var(--border-gold); }
.badge-teacher { background: rgba(220, 38, 38, 0.15); color: #fca5a5; border: 1px solid var(--border-crimson); }

.comfort-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.comfort-list li { display: flex; align-items: flex-start; gap: 14px; font-size: 0.98rem; color: #cbd5e1; }
.comfort-list li i { margin-top: 4px; font-size: 1.1rem; flex-shrink: 0; }
.comfort-list li strong { color: #fff; }

/* Excel Grade Matrix Showcase */
.grade-showcase-section { padding: 80px 0; }
.matrix-mockup {
  background: #090d1a; border: 1px solid var(--border-crimson);
  border-radius: 24px; padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative; overflow-x: auto;
}
.matrix-top-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 20px;
}
.matrix-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle);
  font-size: 0.86rem; color: #cbd5e1; font-weight: 600;
}
.filter-chip strong { color: var(--accent-gold); }

.matrix-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.matrix-table th {
  text-align: right; padding: 12px 16px; background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted); font-size: 0.85rem; font-weight: 700; border-bottom: 1px solid var(--border-subtle);
}
.matrix-table td {
  padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 0.92rem;
  color: #f1f5f9; vertical-align: middle;
}
.grade-input-box {
  background: rgba(15, 23, 42, 0.8); border: 1px solid var(--border-subtle);
  border-radius: 8px; color: #fff; font-size: 1rem; font-weight: 700;
  text-align: center; width: 68px; padding: 6px; outline: none; font-family: 'Outfit', sans-serif;
}
.grade-input-box:focus { border-color: var(--accent-gold); box-shadow: 0 0 10px var(--accent-gold-glow); }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 6px; font-size: 0.82rem; font-weight: 700;
}
.badge-pass { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-fail { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.matrix-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-subtle);
}
.matrix-stats { display: flex; align-items: center; gap: 20px; font-size: 0.9rem; color: var(--text-muted); }
.matrix-stats span strong { color: #fff; font-family: 'Outfit', sans-serif; }

/* Workflow Section */
.workflow-section { padding: 90px 0; }
.section-head { text-align: center; margin-bottom: 55px; }
.section-head h2 { font-size: 2.3rem; font-weight: 900; margin-bottom: 12px; color: #fff; }
.section-head p { color: var(--text-muted); font-size: 1.15rem; }

.steps-flex {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
}

.step-box {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 20px; padding: 30px; position: relative; transition: all 0.3s;
}
.step-box:hover {
  border-color: var(--border-gold); transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.12);
}

.step-num {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(245, 158, 11, 0.12); color: var(--accent-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 900; font-family: 'Outfit', sans-serif;
  margin-bottom: 20px;
}

.step-box h3 { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.step-box p { font-size: 0.95rem; color: var(--text-muted); }

/* Leadership & Location Card (Eng. Zain Rsn) */
.leadership-section { padding: 50px 0 80px; }
.leadership-card {
  background: linear-gradient(135deg, rgba(16, 22, 40, 0.95), rgba(28, 16, 24, 0.95));
  border: 1px solid var(--border-crimson); border-radius: 26px; padding: 40px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 30px;
  box-shadow: 0 15px 40px rgba(139, 16, 22, 0.25);
}

.leader-meta h3 { font-size: 1.7rem; font-weight: 900; color: #fff; margin-bottom: 8px; }
.leader-badge {
  display: inline-block; font-size: 0.85rem; font-weight: 800; color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12); border: 1px solid var(--border-gold);
  padding: 4px 14px; border-radius: 8px; margin-bottom: 16px;
}
.leader-meta p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 14px; }
.leader-location {
  display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: #fca5a5; font-weight: 600;
}

.leader-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Contact CTA Banner */
.cta-banner {
  margin: 70px auto 90px; padding: 60px 40px; text-align: center;
  background: radial-gradient(circle at 50% 50%, rgba(220, 38, 38, 0.28) 0%, rgba(14, 18, 32, 0.9) 100%);
  border: 1px solid var(--border-crimson); border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.cta-banner h2 { font-size: 2.3rem; font-weight: 900; margin-bottom: 14px; color: #fff; }
.cta-banner p { font-size: 1.18rem; color: var(--text-muted); max-width: 650px; margin: 0 auto 32px; }
.cta-buttons { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle); padding: 55px 0 35px;
  background: #03050a;
}
.footer-grid {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 26px;
  margin-bottom: 35px;
}
.footer-info p { font-size: 0.92rem; color: var(--text-dim); margin-top: 6px; }
.footer-bottom {
  text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 25px; font-size: 0.88rem; color: var(--text-dim);
}

@media (max-width: 960px) {
  .grid-3d { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3 { grid-column: span 1; }
  .comfort-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .leadership-card { flex-direction: column; text-align: center; }
  .leader-actions { width: 100%; justify-content: center; }
  .leader-location { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .card-3d, .step-box, .btn, .comfort-card { transition: none !important; transform: none !important; }
  #canvas-3d { display: none; }
}
