/* ===== CHEESY EDUCATION - Global Styles ===== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fira+Code:wght@400;500&display=swap');

:root {
  --cheese: #F5C518;
  --cheese-dark: #E8A020;
  --cheese-light: #FFF3B0;
  --cream: #FFFEF0;
  --cream-dark: #FFF8D6;
  --navy: #1a1a2e;
  --navy-light: #2d2d4a;
  --orange: #FF8C00;
  --green: #22c55e;
  --green-dark: #16a34a;
  --red: #ef4444;
  --blue: #3b82f6;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card: #ffffff;
  --radius: 1rem;
  --shadow: 0 4px 0 #e5d000;
  --shadow-hover: 0 2px 0 #e5d000;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--cream);
  color: var(--navy);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== NAVIGATION ===== */
.navbar {
  background: #fff;
  border-bottom: 3px solid var(--cheese);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(245,197,24,0.15);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--navy);
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--cheese);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 2px solid var(--cheese-dark);
}

.nav-logo span { color: var(--cheese-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  transition: background 0.15s, color 0.15s;
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
  background: var(--cheese);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--navy);
  border-radius: 3px;
  transition: 0.3s;
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 3px solid var(--cheese);
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; width: 100%; padding: 0.6rem 1rem; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  border-radius: 0.75rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
  user-select: none;
}

.btn-primary {
  background: var(--cheese);
  color: var(--navy);
  border-color: var(--cheese-dark);
  box-shadow: 0 4px 0 var(--cheese-dark);
}
.btn-primary:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--cheese-dark); }
.btn-primary:active { transform: translateY(4px); box-shadow: none; }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 4px 0 var(--navy);
}
.btn-outline:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--navy); }
.btn-outline:active { transform: translateY(4px); box-shadow: none; }

.btn-green {
  background: var(--green);
  color: white;
  border-color: var(--green-dark);
  box-shadow: 0 4px 0 var(--green-dark);
}
.btn-green:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--green-dark); }

.btn-lg { padding: 0.85rem 2rem; font-size: 1.1rem; }

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border-radius: 1.25rem;
  border: 3px solid var(--border);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.card-hover {
  transition: transform 0.15s, box-shadow 0.15s;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }

/* ===== SECTION STYLES ===== */
.section { padding: 4rem 1.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.25rem; font-weight: 900; margin-bottom: 0.75rem; }
.section-header p { font-size: 1.1rem; color: var(--muted); max-width: 600px; margin: 0 auto; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cheese-light) 100%);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-inner { max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: var(--cheese);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--cheese-dark);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero h1 .highlight {
  color: var(--cheese-dark);
  text-decoration: underline;
  text-decoration-color: var(--cheese);
  text-underline-offset: 6px;
}

.hero p { font-size: 1.2rem; color: var(--muted); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.hero-image { max-width: 280px; margin: 2.5rem auto 0; display: block; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.15)); animation: float 3s ease-in-out infinite; }

.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ===== COURSE CARDS ===== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: var(--card);
  border-radius: 1.5rem;
  padding: 2rem;
  border: 3px solid;
  box-shadow: 0 6px 0;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.course-card:hover { transform: translateY(4px); box-shadow: 0 2px 0; }

.course-card.html { border-color: #fca5a5; box-shadow-color: #fca5a5; box-shadow: 0 6px 0 #fca5a5; }
.course-card.html:hover { box-shadow: 0 2px 0 #fca5a5; }

.course-card.css { border-color: #93c5fd; box-shadow: 0 6px 0 #93c5fd; }
.course-card.css:hover { box-shadow: 0 2px 0 #93c5fd; }

.course-card.js { border-color: #fde68a; box-shadow: 0 6px 0 #fde68a; }
.course-card.js:hover { box-shadow: 0 2px 0 #fde68a; }

.course-icon {
  width: 70px;
  height: 70px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.course-card.html .course-icon { background: #fee2e2; }
.course-card.css .course-icon { background: #dbeafe; }
.course-card.js .course-icon { background: #fef9c3; }

.course-card h3 { font-size: 1.4rem; font-weight: 900; margin-bottom: 0.5rem; }
.course-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.5; margin-bottom: 1.25rem; }
.course-card img { width: 56px; height: 56px; object-fit: contain; }

/* ===== CODE BLOCKS ===== */
.code-block {
  background: #1e1e2e;
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1.5rem 0;
  border: 2px solid #2d2d4a;
}

.code-block-header {
  background: #2d2d4a;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #a0aec0;
  font-family: 'Fira Code', monospace;
}

.code-block-dots { display: flex; gap: 5px; }
.code-block-dots span { width: 11px; height: 11px; border-radius: 50%; display: block; }
.code-block-dots .dot-red { background: #ff5f57; }
.code-block-dots .dot-yellow { background: #febc2e; }
.code-block-dots .dot-green { background: #28c840; }

.code-block pre {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #cdd6f4;
}

.code-block .kw { color: #cba6f7; }
.code-block .str { color: #a6e3a1; }
.code-block .tag { color: #89b4fa; }
.code-block .attr { color: #fab387; }
.code-block .val { color: #a6e3a1; }
.code-block .comment { color: #6c7086; font-style: italic; }
.code-block .sel { color: #89dceb; }
.code-block .prop { color: #89b4fa; }
.code-block .num { color: #fab387; }

.code-preview {
  background: var(--cream);
  border-top: 2px solid #2d2d4a;
  padding: 1.25rem 1.5rem;
}

.code-preview-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* ===== LESSON CONTENT ===== */
.lesson-page { max-width: 820px; margin: 0 auto; padding: 3rem 1.5rem; }

.lesson-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px dashed var(--cheese);
}

.lesson-header img { width: 90px; height: 90px; object-fit: contain; animation: wiggle 2s ease-in-out infinite; }

@keyframes wiggle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.lesson-header h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; }
.lesson-header h1 span { color: var(--cheese-dark); }
.lesson-header p { color: var(--muted); font-size: 1.1rem; }

.lesson-section {
  background: var(--card);
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 2px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.lesson-section h2 {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lesson-section h2 .section-num {
  background: var(--cheese);
  color: var(--navy);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.lesson-section p { font-size: 1rem; line-height: 1.75; color: #374151; margin-bottom: 1rem; }
.lesson-section code { background: var(--cheese-light); color: var(--cheese-dark); padding: 0.1em 0.4em; border-radius: 4px; font-family: 'Fira Code', monospace; font-size: 0.9em; }

.lesson-nav {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ===== QUIZ ===== */
.quiz-container { max-width: 700px; margin: 0 auto; padding: 3rem 1.5rem; }

.quiz-header { text-align: center; margin-bottom: 2.5rem; }
.quiz-header h1 { font-size: 2.5rem; font-weight: 900; }
.quiz-header p { color: var(--muted); font-size: 1.1rem; margin-top: 0.5rem; }

.quiz-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--cheese);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.quiz-card {
  background: var(--card);
  border-radius: 1.5rem;
  padding: 2.5rem;
  border: 3px solid var(--border);
  box-shadow: 0 4px 0 var(--border);
}

.quiz-question-num {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cheese-dark);
  margin-bottom: 0.75rem;
}

.quiz-question {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 1.75rem;
}

.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }

.quiz-option {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  border-radius: 0.85rem;
  border: 2px solid var(--border);
  background: var(--cream);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--cheese);
  background: var(--cheese-light);
  transform: translateX(4px);
}

.quiz-option.correct { background: #dcfce7; border-color: var(--green); color: var(--green-dark); }
.quiz-option.wrong { background: #fee2e2; border-color: var(--red); color: #b91c1c; opacity: 0.8; }
.quiz-option.dimmed { opacity: 0.4; cursor: default; }
.quiz-option:disabled { cursor: default; }

.quiz-option-icon { font-size: 1.1rem; flex-shrink: 0; }

.quiz-next { margin-top: 1.5rem; display: flex; justify-content: flex-end; }

.quiz-result {
  background: var(--card);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  border: 3px solid var(--cheese);
  box-shadow: 0 6px 0 var(--cheese);
  text-align: center;
  display: none;
}

.quiz-result.show { display: block; }

.quiz-result-trophy { font-size: 5rem; margin-bottom: 1rem; animation: bounce 0.8s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }

.quiz-result h2 { font-size: 2.5rem; font-weight: 900; margin-bottom: 0.5rem; }
.quiz-result .quiz-score { font-size: 4rem; font-weight: 900; color: var(--cheese-dark); margin: 1rem 0; }
.quiz-result .quiz-score span { font-size: 2rem; color: var(--muted); }
.quiz-result .quiz-message { background: var(--cream); border-radius: 1rem; padding: 1rem 1.5rem; margin: 1rem 0 2rem; font-size: 1.1rem; font-weight: 700; }

/* ===== ABOUT ===== */
.about-hero { background: linear-gradient(135deg, var(--cheese-light) 0%, var(--cream) 100%); padding: 4rem 1.5rem; text-align: center; border-bottom: 3px solid var(--cheese); }
.about-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; margin-bottom: 1rem; }
.about-hero p { font-size: 1.2rem; color: var(--muted); max-width: 600px; margin: 0 auto 1.5rem; }
.about-hero img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 1.5rem; animation: float 3s ease-in-out infinite; }

.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }

.about-fact-card {
  background: var(--card);
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 2px solid var(--border);
  text-align: center;
}

.about-fact-card .fact-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.about-fact-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.5rem; }
.about-fact-card p { color: var(--muted); font-size: 0.95rem; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }

.team-card {
  background: var(--card);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  border: 2px solid var(--cheese-light);
  text-align: center;
  box-shadow: 0 4px 0 var(--cheese-light);
}

.team-card img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 3px solid var(--cheese); }
.team-card h3 { font-weight: 900; font-size: 1.1rem; }
.team-card p { color: var(--muted); font-size: 0.9rem; }

/* ===== FOOTER ===== */
footer {
  background: var(--navy);
  color: #e5e7eb;
  padding: 3rem 1.5rem 1.5rem;
  margin-top: auto;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-top { display: flex; gap: 3rem; flex-wrap: wrap; margin-bottom: 2rem; }
.footer-brand { flex: 1; min-width: 200px; }
.footer-brand .logo { font-size: 1.2rem; font-weight: 900; color: var(--cheese); margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; color: #9ca3af; }
.footer-links { flex: 1; min-width: 140px; }
.footer-links h4 { color: var(--cheese); font-weight: 800; margin-bottom: 0.75rem; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 0.4rem; }
.footer-links ul a { color: #9ca3af; text-decoration: none; font-size: 0.9rem; transition: color 0.15s; }
.footer-links ul a:hover { color: var(--cheese); }
.footer-bottom { border-top: 1px solid #374151; padding-top: 1.25rem; font-size: 0.85rem; color: #6b7280; text-align: center; }

/* ===== MISC ===== */
.tag-pill {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.tag-html { background: #fee2e2; color: #b91c1c; }
.tag-css { background: #dbeafe; color: #1d4ed8; }
.tag-js { background: #fef9c3; color: #854d0e; }

.tip-box {
  background: var(--cheese-light);
  border: 2px solid var(--cheese);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.tip-box .tip-icon { font-size: 1.2rem; flex-shrink: 0; }

.confetti-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; }

@media (max-width: 600px) {
  .hero { padding: 3rem 1rem 2.5rem; }
  .lesson-header { flex-direction: column; text-align: center; }
  .lesson-nav { flex-direction: column; }
  .quiz-card { padding: 1.5rem; }
  .footer-top { flex-direction: column; gap: 1.5rem; }
}
