/* ====== Theme Variables ====== */
:root{
  --bg:#0f0b0a;
  --bg2:#14100e;
  --bg3:#1a0e0c;
  --burgundy:#5c1a1b;
  --burgundy-dark:#3d0f10;
  --burgundy-light:#7a2324;
  --rust:#8b3a1f;
  --gold:#c9a961;
  --gold-soft:#b89550;
  --ink:#e8ddc9;
  --ink-dim:#a89a82;
  --ink-faint:#726452;
  --line:#2a201d;
  --green:#2d5a3d;
  --green-light:#4a8560;
  --green-bright:#6ba577;
  --blue:#2a4265;
  --blue-light:#4568a0;
  --purple:#3d2a4d;
  --purple-light:#6b4a82;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Tajawal',sans-serif;
  line-height:1.8;
  padding:40px 20px;
  min-height:100vh;
  background-image:
    radial-gradient(ellipse at top right, rgba(92,26,27,0.15), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(139,58,31,0.08), transparent 50%);
}
.wrapper{max-width:1100px;margin:0 auto}

/* ====== Top Buttons ====== */
.top-buttons{
  position:fixed;top:20px;right:20px;z-index:9999;
  display:flex;gap:10px;flex-wrap:wrap;
}
.top-btn{
  background:rgba(15,11,10,0.95);
  backdrop-filter:blur(8px);
  border:1px solid var(--gold);
  color:var(--gold);
  padding:8px 16px;
  border-radius:8px;
  text-decoration:none;
  font-family:'Amiri',serif;
  font-size:13px;
  font-weight:700;
  transition:all 0.2s;
  box-shadow:0 2px 8px rgba(0,0,0,0.3);
}
.top-btn:hover{background:var(--gold);color:#0f0b0a}
.top-btn.exam-btn{border-color:var(--burgundy-light);color:#d09595}
.top-btn.exam-btn:hover{background:var(--burgundy-light);color:var(--ink)}
.top-btn.lesson-btn{border-color:var(--burgundy-light);color:#d09595}
.top-btn.lesson-btn:hover{background:var(--burgundy-light);color:var(--ink)}

/* ====== Hero ====== */
.hero{
  background:linear-gradient(135deg,#1a0e0c 0%, #2a110f 60%, #3d0f10 100%);
  border:1px solid var(--burgundy);
  border-radius:14px;
  padding:36px 40px;
  margin-bottom:28px;
  text-align:center;
}
.hero.history{background:linear-gradient(135deg,#1a0e0c 0%, #2a110f 60%, #3d0f10 100%); border-color:var(--burgundy)}
.hero.geography{background:linear-gradient(135deg,#0f1814 0%, #14241a 60%, #1a3320 100%); border-color:var(--green)}
.hero .label{
  color:var(--gold-soft);
  font-family:'Cormorant Garamond',serif;
  font-style:italic;
  font-size:14px;
  margin-bottom:6px;
  letter-spacing:1px;
}
.hero h1{
  font-family:'Amiri',serif;
  font-size:32px;
  color:var(--ink);
  margin-bottom:12px;
  line-height:1.4;
}
.hero p{
  color:var(--ink-dim);
  font-size:15px;
  max-width:780px;
  margin:0 auto;
  line-height:1.9;
}

/* ====== Card ====== */
.card{
  background:var(--bg2);
  border:1px solid var(--line);
  border-radius:12px;
  padding:28px 32px;
  margin-bottom:24px;
}
.card-title{
  display:flex;align-items:center;gap:12px;
  padding-bottom:16px;margin-bottom:20px;
  border-bottom:1px solid var(--burgundy-dark);
}
.card-title .num{
  background:var(--burgundy);
  color:var(--ink);
  width:34px;height:34px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;
  font-size:16px;
  flex-shrink:0;
}
.card-title h2{
  font-family:'Amiri',serif;
  font-size:22px;
  color:var(--ink);
  flex:1;
}

/* ====== Thread Box ====== */
.thread-box{
  background:linear-gradient(135deg,#1a0b0a,#2a0e0d);
  border:2px solid var(--gold-soft);
  border-radius:12px;
  padding:24px 28px;
  margin:18px 0;
  position:relative;
}
.thread-box::before{
  content:"⁕";
  position:absolute;
  top:-14px;right:24px;
  background:var(--bg);
  color:var(--gold);
  font-size:24px;
  font-weight:700;
  padding:0 10px;
  font-family:'Amiri',serif;
}
.thread-box .lab{
  color:var(--gold);
  font-family:'Amiri',serif;
  font-size:15px;
  font-weight:700;
  margin-bottom:8px;
}
.thread-box p{
  font-size:14.5px;
  color:var(--ink);
  line-height:1.95;
}
.thread-box b{color:var(--gold-soft)}
.thread-box em{color:var(--gold);font-style:italic;font-weight:600}

/* ====== Question Box ====== */
.question-box{
  background:linear-gradient(135deg,#1a0b0a,#2a0e0d);
  border:2px solid var(--gold-soft);
  border-radius:12px;
  padding:28px 32px;
  margin:20px 0;
  text-align:center;
  position:relative;
}
.question-box::before{
  content:"؟";
  position:absolute;
  top:-16px;right:30px;
  background:var(--bg);
  color:var(--gold);
  font-size:32px;
  font-weight:700;
  padding:0 10px;
  font-family:'Amiri',serif;
}
.question-box .main-q{
  font-family:'Amiri',serif;
  color:var(--ink);
  font-size:20px;
  line-height:1.85;
  margin-bottom:14px;
}
.question-box .main-q b{color:var(--gold)}
.question-box .sub-q{
  color:var(--ink-dim);
  font-size:14.5px;
  font-style:italic;
  line-height:1.85;
  padding-top:12px;
  border-top:1px dashed var(--burgundy-dark);
}

/* ====== Axes Grid ====== */
.axes-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:14px;
  margin:18px 0;
}
.axes-grid.two{grid-template-columns:1fr 1fr}
.axis-box{
  background:#0f0b0a;
  border:1px solid var(--line);
  border-radius:10px;
  padding:18px 20px;
}
.axis-box .tag{
  display:inline-block;
  font-size:11.5px;
  padding:2px 10px;
  border-radius:10px;
  margin-bottom:8px;
  font-weight:700;
  background:var(--burgundy);
  color:var(--ink);
  font-family:'Amiri',serif;
}
.axis-box h4{
  font-family:'Amiri',serif;
  color:var(--gold);
  font-size:16px;
  margin-bottom:10px;
}
.axis-box .q{
  font-size:13px;
  color:var(--ink-dim);
  line-height:1.85;
}
.axis-box .q b{color:var(--gold-soft)}

/* ====== Concept Grid ====== */
.concept-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:18px 0;
}
.concept-card{
  background:#1a0e0c;
  border:1px solid var(--burgundy-dark);
  border-radius:10px;
  padding:18px 22px;
}
.concept-card .ico{
  font-size:24px;
  color:var(--gold);
  margin-bottom:6px;
  display:block;
}
.concept-card h3{
  font-family:'Amiri',serif;
  color:var(--gold);
  font-size:18px;
  margin-bottom:10px;
  padding-bottom:8px;
  border-bottom:1px dashed var(--burgundy-dark);
}
.concept-card p{
  font-size:13.5px;
  color:var(--ink);
  line-height:1.85;
}
.concept-card b{color:var(--gold-soft)}

/* ====== Phases ====== */
.phases{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin:18px 0;
}
.phase{
  background:#0f0b0a;
  border:1px solid var(--line);
  border-radius:10px;
  padding:18px 22px;
  display:grid;
  grid-template-columns:120px 1fr;
  gap:18px;
  align-items:start;
}
.phase .date{
  background:var(--burgundy-dark);
  color:var(--gold);
  font-family:'Amiri',serif;
  font-weight:700;
  font-size:13px;
  padding:8px 6px;
  border-radius:8px;
  text-align:center;
  line-height:1.3;
}
.phase h4{
  font-family:'Amiri',serif;
  color:var(--gold);
  font-size:17px;
  margin-bottom:8px;
}
.phase p{
  font-size:13.5px;
  color:var(--ink);
  line-height:1.85;
}
.phase b{color:var(--gold-soft)}

/* ====== Dimensions Cards ====== */
.dim-card{
  background:#0f0b0a;
  border:1px solid var(--line);
  border-radius:10px;
  padding:20px 24px;
  margin-bottom:14px;
  border-right:4px solid var(--gold);
}
.dim-card.eco{border-right-color:var(--green-light)}
.dim-card.soc{border-right-color:var(--blue-light)}
.dim-card.idea{border-right-color:var(--purple-light)}
.dim-card.pol{border-right-color:var(--burgundy-light)}
.dim-card.geo{border-right-color:var(--rust)}
.dim-card .head{
  display:flex;align-items:center;gap:10px;
  margin-bottom:10px;
}
.dim-card .ico{
  font-size:22px;
  flex-shrink:0;
}
.dim-card h3{
  font-family:'Amiri',serif;
  font-size:18px;
  color:var(--gold);
  flex:1;
}
.dim-card .body{
  font-size:13.5px;
  color:var(--ink);
  line-height:1.95;
}
.dim-card .body b{color:var(--gold-soft)}
.dim-card .body em{color:var(--gold);font-style:italic}
.dim-card .body ul{list-style:none;padding:0;margin:8px 0}
.dim-card .body li{
  position:relative;
  padding-right:18px;
  padding-bottom:5px;
}
.dim-card .body li::before{
  content:"◆";
  position:absolute;
  right:0;top:5px;
  color:var(--gold-soft);
  font-size:9px;
}

/* ====== Positions ====== */
.positions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin:18px 0;
}
.position{
  background:#0f0b0a;
  border:1px solid var(--line);
  border-radius:10px;
  padding:22px 24px;
  position:relative;
}
.position.pos-1{border-right:4px solid var(--green-light)}
.position.pos-2{border-right:4px solid var(--burgundy-light)}
.position.pos-3{border-right:4px solid var(--blue-light)}
.position .tag{
  display:inline-block;
  font-size:12px;
  padding:3px 10px;
  border-radius:12px;
  margin-bottom:10px;
  font-weight:700;
  font-family:'Amiri',serif;
}
.position.pos-1 .tag{background:rgba(74,133,96,0.2);color:var(--green-light)}
.position.pos-2 .tag{background:rgba(122,35,36,0.25);color:#d09595}
.position.pos-3 .tag{background:rgba(69,104,160,0.2);color:var(--blue-light)}
.position h3{
  font-family:'Amiri',serif;
  font-size:18px;
  margin-bottom:12px;
  color:var(--ink);
}
.position .thesis{
  background:#1a0e0c;
  border-radius:6px;
  padding:12px 14px;
  margin-bottom:12px;
  font-size:13.5px;
  color:var(--ink);
  line-height:1.85;
}
.position .thesis b{color:var(--gold)}
.position .meta{
  margin-top:10px;
  padding:10px 14px;
  background:#130c0a;
  border-radius:6px;
}
.position .meta .name{
  font-family:'Amiri',serif;
  color:var(--gold-soft);
  font-size:14px;
  font-weight:700;
  margin-bottom:5px;
}
.position .meta p{
  font-size:12.5px;
  color:var(--ink-dim);
  line-height:1.8;
}

/* ====== Chain ====== */
.chain{
  background:#0a0605;
  border:1px solid var(--burgundy-dark);
  border-radius:12px;
  padding:24px;
  margin:18px 0;
}
.chain-item{
  background:#1a0e0c;
  border:1px solid var(--line);
  border-radius:8px;
  padding:14px 18px;
  margin-bottom:10px;
  display:grid;
  grid-template-columns:42px 1fr;
  gap:14px;
  align-items:start;
}
.chain-item:last-child{margin-bottom:0}
.chain-num{
  background:var(--burgundy);
  color:var(--ink);
  width:32px;height:32px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;
  font-size:14px;
}
.chain-body{font-size:13.5px;color:var(--ink);line-height:1.85}
.chain-body b{color:var(--gold)}
.chain-body em{color:var(--gold-soft);font-style:italic}
.chain-arrow{
  text-align:center;
  color:var(--gold-soft);
  margin:4px 0;
  font-size:14px;
}

/* ====== Example Box ====== */
.example-box{
  background:linear-gradient(135deg, #14100e, #1a0e0c);
  border:1px dashed var(--gold-soft);
  border-radius:10px;
  padding:18px 22px;
  margin:14px 0;
}
.example-box .label{
  color:var(--gold);
  font-family:'Amiri',serif;
  font-size:15px;
  font-weight:700;
  margin-bottom:10px;
}
.example-box p{
  font-size:13.5px;
  color:var(--ink);
  line-height:1.95;
}
.example-box b{color:var(--gold-soft)}

/* ====== Method Box ====== */
.method-box{
  background:linear-gradient(135deg,#1c1612,#231a14);
  border:2px solid var(--gold);
  border-radius:12px;
  padding:26px 30px;
  margin:20px 0;
}
.method-box h2{
  font-family:'Amiri',serif;
  color:var(--gold);
  font-size:22px;
  text-align:center;
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom:1px dashed var(--gold-soft);
}
.method-step{
  background:rgba(15,11,10,0.5);
  border-radius:8px;
  padding:14px 18px;
  margin-bottom:12px;
  border-right:3px solid var(--gold-soft);
}
.method-step h4{
  font-family:'Amiri',serif;
  color:var(--gold);
  font-size:16px;
  margin-bottom:6px;
}
.method-step p{
  font-size:13.5px;
  color:var(--ink);
  line-height:1.9;
}
.method-step b{color:var(--gold-soft)}

/* ====== Synthesis ====== */
.synthesis{
  background:linear-gradient(135deg,#0f1814,#0a1410);
  border:2px solid var(--green-light);
  border-radius:12px;
  padding:28px 32px;
  margin:24px 0;
}
.synthesis h2{
  font-family:'Amiri',serif;
  color:var(--green-light);
  font-size:22px;
  text-align:center;
  margin-bottom:18px;
  padding-bottom:12px;
  border-bottom:1px dashed var(--green);
}
.key-point{
  background:#0a0605;
  border-radius:6px;
  padding:14px 16px;
  margin-bottom:12px;
  border-right:3px solid var(--gold);
}
.key-point b{
  color:var(--gold);
  font-family:'Amiri',serif;
  font-size:14.5px;
  display:block;
  margin-bottom:5px;
}
.key-point p{
  font-size:13.5px;
  color:var(--ink);
  line-height:1.9;
}
.key-point p b{display:inline;color:var(--gold-soft);font-size:inherit;margin:0}

/* ====== Exam Tip ====== */
.exam-tip{
  background:linear-gradient(135deg,#1a0e0c,#2a110f);
  border:2px dashed var(--gold);
  border-radius:12px;
  padding:24px 28px;
  margin:20px 0;
}
.exam-tip .title{
  color:var(--gold);
  font-family:'Amiri',serif;
  font-size:18px;
  font-weight:700;
  margin-bottom:14px;
  text-align:center;
}
.exam-tip p{
  font-size:13.5px;
  color:var(--ink);
  line-height:2;
}
.exam-tip b{color:var(--gold-soft)}
.exam-tip em{color:var(--gold);font-style:italic}

/* ====== Connection Box ====== */
.connection{
  background:#14100e;
  border:1px dashed var(--purple-light);
  border-radius:10px;
  padding:18px 22px;
  margin:16px 0;
}
.connection .lab{
  color:var(--purple-light);
  font-family:'Amiri',serif;
  font-size:14px;
  font-weight:700;
  margin-bottom:6px;
}
.connection p{
  font-size:13.5px;
  color:var(--ink);
  line-height:1.9;
}
.connection b{color:var(--gold-soft)}

/* ====== Data Table ====== */
.data-table{
  width:100%;
  border-collapse:collapse;
  margin:14px 0;
  background:#1a0e0c;
  border-radius:8px;
  overflow:hidden;
}
.data-table th{
  background:var(--burgundy-dark);
  color:var(--gold);
  font-family:'Amiri',serif;
  padding:10px 12px;
  font-size:13px;
  text-align:right;
  border-bottom:1px solid var(--burgundy);
}
.data-table td{
  padding:9px 12px;
  font-size:13px;
  color:var(--ink);
  border-bottom:1px solid var(--line);
  text-align:right;
}
.data-table tr:last-child td{border-bottom:none}

/* ====== Footer Note ====== */
.footer-note{
  text-align:center;
  color:var(--ink-faint);
  font-family:'Cormorant Garamond',serif;
  font-style:italic;
  font-size:13px;
  margin-top:28px;
  padding:10px;
}

/* ====== Responsive ====== */
@media(max-width:820px){
  .axes-grid,.concept-grid,.positions{grid-template-columns:1fr}
  .axes-grid.two{grid-template-columns:1fr}
  .phase{grid-template-columns:1fr}
  .phase .date{max-width:160px}
  .hero h1{font-size:24px}
  .top-buttons{top:auto;bottom:20px;right:20px}
  .top-btn{font-size:11px;padding:6px 10px}
  body{padding:20px 10px}
  .card{padding:20px 18px}
}
