/* ===========================
   Viola Edu — Slide Template
   Calm Sage + Gold theme
   =========================== */

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: #3D5A4E;
  color: #eee;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Slide Container ---- */
.slide {
  display: none;
  width: 100vw; height: 100vh;
  padding: 70px 60px 80px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}
.slide.active { display: flex; }

/* ---- Background Variants ---- */
.bg-title   { background: linear-gradient(135deg, #3D5A4E 0%, #4A7560 50%, #5B8A72 100%); }
.bg-navy    { background: linear-gradient(135deg, #3D5A4E 0%, #456B5A 50%, #4A7560 100%); }
.bg-gold    { background: linear-gradient(135deg, #3D5A4E 0%, #4A6050 40%, #3D5040 100%); }
.bg-concept { background: linear-gradient(135deg, #354E44 0%, #4A7560 50%, #3D6555 100%); }
.bg-example { background: linear-gradient(135deg, #354D43 0%, #456B5A 50%, #3D6050 100%); }
.bg-practice{ background: linear-gradient(135deg, #3D5A4E 0%, #4A6858 50%, #3D5545 100%); }
.bg-summary { background: linear-gradient(135deg, #3D5A4E 0%, #4A7560 50%, #5B8A72 100%); }
.bg-compare { background: linear-gradient(135deg, #3D5A4E 0%, #4A6858 50%, #456050 100%); }

/* ---- Typography ---- */
h1 {
  font-size: 2.8em; font-weight: 800; text-align: center;
  line-height: 1.3; margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
h2 {
  font-size: 2.2em; font-weight: 700; text-align: center;
  color: #C4A265; margin-bottom: 20px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
h3 {
  font-size: 1.6em; font-weight: 600; text-align: center;
  color: #A8D4B8; margin-bottom: 15px;
}

.subtitle {
  font-size: 1.3em; color: rgba(255,255,255,0.6);
  margin-top: 8px; text-align: center;
}
.slide-label {
  font-size: 0.9em; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 3px;
  margin-bottom: 12px;
}

/* ---- Content Boxes ---- */
.box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 28px 36px;
  margin: 12px 0;
  backdrop-filter: blur(10px);
  max-width: 860px;
  width: 100%;
}
.box-gold {
  background: rgba(196,162,101,0.12);
  border: 2px solid rgba(196,162,101,0.35);
}
.box-answer {
  background: rgba(91,138,114,0.15);
  border: 2px solid rgba(91,138,114,0.4);
}
.box-warn {
  background: rgba(192,86,74,0.12);
  border: 2px solid rgba(192,86,74,0.3);
}
.box-white {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
}

/* ---- Steps ---- */
.step {
  font-size: 1.4em; margin: 10px 0; line-height: 1.7;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  background: #C4A265; color: #3D5A4E;
  width: 36px; height: 36px; border-radius: 50%;
  font-weight: 700; font-size: 0.85em;
  margin-right: 10px; flex-shrink: 0;
}

/* ---- Math Display ---- */
.math {
  font-size: 1.6em; text-align: center;
  margin: 12px 0; color: #fff; font-weight: 600;
}
.math-big {
  font-size: 2.2em; color: #C4A265; font-weight: 700;
}
.math-box {
  background: rgba(196,162,101,0.15);
  border: 2px solid rgba(196,162,101,0.3);
  border-radius: 12px;
  padding: 16px 24px;
  text-align: center;
  margin: 10px auto;
  max-width: 600px;
}

/* ---- Flow Diagram ---- */
.flow {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 16px 0; flex-wrap: wrap;
}
.flow-box {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 14px 22px;
  text-align: center;
  font-size: 1.2em;
}
.flow-arrow { font-size: 1.8em; color: #C4A265; }

/* ---- Compare Layout ---- */
.compare-row {
  display: flex; gap: 24px;
  width: 100%; max-width: 1000px;
}
.compare-col {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 24px;
}
.compare-col h3 { font-size: 1.3em; margin-bottom: 12px; }
.compare-col .step { font-size: 1.15em; }

/* ---- Key Point Callout ---- */
.key-point {
  background: rgba(196,162,101,0.15);
  border-left: 4px solid #C4A265;
  padding: 14px 22px;
  margin: 12px 0;
  border-radius: 0 12px 12px 0;
  font-size: 1.25em;
  max-width: 860px;
  width: 100%;
}

/* ---- Tags / Badges ---- */
.tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85em;
  margin: 3px;
  font-weight: 600;
}
.tag-gold  { background: rgba(196,162,101,0.25); color: #C4A265; }
.tag-green { background: rgba(91,138,114,0.25);  color: #8BC4A0; }
.tag-red   { background: rgba(192,86,74,0.2); color: #E8918A; }
.tag-blue  { background: rgba(107,141,181,0.2);  color: #8BB8E8; }

/* ---- Visual Bar (for charts) ---- */
.visual-bar {
  height: 36px; border-radius: 8px; margin: 6px 0;
  display: flex; align-items: center; padding-left: 14px;
  font-weight: 600; font-size: 1.1em;
  transition: width 1s ease;
}

/* ---- Grid (for lists/items) ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 860px;
  width: 100%;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  max-width: 960px;
  width: 100%;
}

/* ---- Text Colors ---- */
.gold    { color: #C4A265; }
.green   { color: #8BC4A0; }
.red     { color: #E8918A; }
.blue    { color: #8BB8E8; }
.white   { color: #fff; }
.muted   { color: rgba(255,255,255,0.5); }
.bold    { font-weight: 700; }

/* ---- Branding Header ---- */
.slide-brand {
  position: fixed;
  top: 18px; left: 24px;
  display: flex; align-items: center; gap: 10px;
  z-index: 100;
  text-decoration: none;
}
.slide-brand img {
  width: 32px; height: 32px; object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
}
.slide-brand span {
  font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.5);
  letter-spacing: 1px; text-transform: uppercase;
}

/* ---- Language Toggle ---- */
.lang-toggle {
  position: fixed; top: 18px; right: 24px; z-index: 200;
  display: flex; gap: 4px;
  background: rgba(0,0,0,0.25);
  border-radius: 20px; padding: 3px;
}
.lang-toggle button {
  border: none; border-radius: 17px;
  padding: 5px 14px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  background: transparent;
  color: rgba(255,255,255,0.5);
}
.lang-toggle button.active {
  background: #C4A265;
  color: #3D5A4E;
}

/* ---- Navigation ---- */
.nav {
  position: fixed; bottom: 22px; right: 24px;
  display: flex; gap: 10px; z-index: 100;
}
.nav button {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.3em;
  cursor: pointer;
  transition: all 0.25s;
  display: flex; align-items: center; justify-content: center;
}
.nav button:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.3);
}

.page-num {
  position: fixed; bottom: 26px; left: 24px;
  color: rgba(255,255,255,0.3);
  font-size: 0.9em;
}

/* ---- Progress Bar ---- */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: #C4A265;
  transition: width 0.4s ease;
  z-index: 300;
}

/* ---- Back Button ---- */
.back-btn {
  position: fixed; top: 18px; left: 24px;
  z-index: 200;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  display: flex; align-items: center; gap: 6px;
}
.back-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* When brand is present, back-btn moves right */
.has-brand .back-btn { left: auto; right: 140px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .slide { padding: 60px 24px 80px; }
  h1 { font-size: 2em; }
  h2 { font-size: 1.7em; }
  h3 { font-size: 1.3em; }
  .box { padding: 20px 24px; }
  .step { font-size: 1.15em; }
  .math { font-size: 1.3em; }
  .math-big { font-size: 1.8em; }
  .compare-row { flex-direction: column; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .flow { gap: 8px; }
  .flow-box { padding: 10px 16px; font-size: 1em; }
  .key-point { font-size: 1.1em; padding: 12px 16px; }
}

@media (max-width: 480px) {
  .slide { padding: 50px 16px 70px; }
  h1 { font-size: 1.6em; }
  h2 { font-size: 1.4em; }
  .box { padding: 16px 18px; border-radius: 12px; }
  .step-num { width: 30px; height: 30px; font-size: 0.8em; }
}
