@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,600;0,700;1,400&family=DM+Mono:wght@400;500&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #f7f5f0;
  --bg2: #eeeae2;
  --surface: #ffffff;
  --border: #d8d2c8;
  --text: #1a1814;
  --text2: #5a5550;
  --text3: #8a8480;
  --accent: #2563c4;
  --accent2: #1a4a9e;
  --accent-light: #dbeafe;
  --math: #dc6b19;
  --physics: #7c3aed;
  --chemistry: #059669;
  --biology: #db2777;
  --geometry: #0891b2;
  --gold: #d4a017;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

[data-theme="dark"] {
  --bg: #0f0e0c;
  --bg2: #1a1814;
  --surface: #242018;
  --border: #3a342c;
  --text: #f0ece4;
  --text2: #a09890;
  --text3: #706860;
  --accent-light: #1e3a6e;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: 'Crimson Pro', serif;
  font-size: 20px;
  font-weight: 700;
}
.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.logo-text span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
}
.nav-links a {
  text-decoration: none;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover { background: var(--bg2); color: var(--text); }

.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.dropdown-menu a .cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.search-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text3);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s;
}
.search-btn:hover { border-color: var(--accent); color: var(--accent); }

.dark-toggle {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}
.dark-toggle:hover { border-color: var(--accent); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── SEARCH OVERLAY ── */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.search-overlay.open { display: flex; }
.search-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 600px;
  margin: 0 16px;
  box-shadow: var(--shadow-lg);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  background: transparent;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
}
.search-results { margin-top: 16px; }
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
}
.search-item:hover { background: var(--bg2); }
.search-item-cat {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
}

/* ── AD SLOTS ── */
.ad-slot {
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ad-slot-leaderboard { width: 100%; height: 90px; margin: 24px 0; }
.ad-slot-rectangle { width: 300px; height: 250px; }

/* ── HERO ── */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,196,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero p {
  font-size: 18px;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-search {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: border-color 0.2s;
}
.hero-search:focus-within { border-color: var(--accent); }
.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 24px;
  font-size: 16px;
  background: transparent;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
}
.hero-search button {
  background: var(--accent);
  border: none;
  padding: 14px 28px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 48px 48px 0;
  font-family: 'Outfit', sans-serif;
  transition: background 0.2s;
}
.hero-search button:hover { background: var(--accent2); }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
}
.hero-stat { text-align: center; }
.hero-stat strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}
.hero-stat span { font-size: 13px; color: var(--text3); }

/* ── SECTION ── */
.section { padding: 64px 24px; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-header h2 {
  font-family: 'Crimson Pro', serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.section-header a {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── CATEGORY CARDS ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  display: block;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.cat-card.math::before { background: var(--math); }
.cat-card.physics::before { background: var(--physics); }
.cat-card.chemistry::before { background: var(--chemistry); }
.cat-card.biology::before { background: var(--biology); }
.cat-card.geometry::before { background: var(--geometry); }

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.cat-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}
.cat-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.cat-card p { font-size: 13px; color: var(--text3); }
.cat-count {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  background: var(--bg2);
  padding: 3px 8px;
  border-radius: 20px;
}

/* ── FORMULA CARDS ── */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.formula-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.formula-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.formula-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
}
.cat-badge.math { background: #fff3e8; color: var(--math); }
.cat-badge.physics { background: #f3e8ff; color: var(--physics); }
.cat-badge.chemistry { background: #e8fff4; color: var(--chemistry); }
.cat-badge.biology { background: #ffe8f3; color: var(--biology); }
.cat-badge.geometry { background: #e8f8ff; color: var(--geometry); }

.formula-display {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.5px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.formula-card h3 { font-size: 17px; font-weight: 700; }
.formula-card p { font-size: 13px; color: var(--text2); line-height: 1.5; flex: 1; }
.formula-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.learn-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}
.learn-btn:hover { background: var(--accent2); }
.copy-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  color: var(--text2);
  transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── WHY SECTION ── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
}
.why-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
}
.why-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.why-card p { font-size: 14px; color: var(--text2); line-height: 1.7; }

/* ── NEWSLETTER ── */
.newsletter {
  background: var(--accent);
  color: white;
  padding: 64px 24px;
  text-align: center;
}
.newsletter h2 {
  font-family: 'Crimson Pro', serif;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}
.newsletter p { font-size: 16px; opacity: 0.85; margin-bottom: 32px; }
.newsletter-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 0;
  border-radius: 50px;
  overflow: hidden;
  background: white;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.newsletter-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 20px;
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  color: var(--text);
}
.newsletter-form button {
  background: var(--accent2);
  border: none;
  padding: 14px 24px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: #122d6b; }

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 14px; color: var(--text3); margin-top: 12px; line-height: 1.7; max-width: 260px; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--text3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 13px; color: var(--text3); }
.footer-bottom a { color: var(--accent); text-decoration: none; }

/* ── FORMULA DETAIL PAGE ── */
.formula-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.formula-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.formula-hero h1 {
  font-family: 'Crimson Pro', serif;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.formula-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.formula-big {
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 500;
  margin: 32px 0;
  letter-spacing: -1px;
  color: var(--text);
}
.formula-layout {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}
.formula-main { min-width: 0; }
.formula-sidebar { }

.info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.info-block h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.variables-list { display: flex; flex-direction: column; gap: 12px; }
.variable-row {
  display: flex;
  gap: 16px;
  padding: 14px;
  background: var(--bg2);
  border-radius: var(--radius);
  align-items: flex-start;
}
.var-symbol {
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  min-width: 32px;
  text-align: center;
}
.var-info strong { display: block; font-size: 15px; margin-bottom: 3px; }
.var-info span { font-size: 13px; color: var(--text3); }

.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.step-num {
  width: 32px; height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-content strong { display: block; font-size: 15px; margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--text2); }
.step-content code {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  background: var(--bg2);
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 8px;
}

/* ── CATEGORY PAGE ── */
.cat-hero {
  padding: 48px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cat-hero-inner { max-width: 1200px; margin: 0 auto; }
.cat-hero h1 {
  font-family: 'Crimson Pro', serif;
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cat-hero p { font-size: 17px; color: var(--text2); max-width: 560px; }

.subcats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.subcat-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  color: var(--text2);
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.subcat-btn:hover, .subcat-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ── ABOUT / CONTACT ── */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
  text-align: center;
}
.page-hero h1 {
  font-family: 'Crimson Pro', serif;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.page-hero p { font-size: 18px; color: var(--text2); max-width: 560px; margin: 0 auto; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { min-height: 140px; resize: vertical; }
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: background 0.2s;
  align-self: flex-start;
}
.btn-primary:hover { background: var(--accent2); }

/* ── MOBILE NAV ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 8px;
  z-index: 99;
  box-shadow: var(--shadow-lg);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── CATEGORY LAYOUT (sidebar + main) ── */
.cat-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 48px 16px; }
  .hero p { font-size: 16px; }
  .hero-stats { gap: 24px; }
  .section { padding: 40px 16px; }
  .cat-hero { padding: 32px 16px; }
  .cat-hero h1 { font-size: 32px; gap: 10px; }
  .cat-hero p { font-size: 15px; }
  .formula-hero { padding: 32px 16px; }
  .formula-hero h1 { font-size: 28px; }
  .formula-big { padding: 24px 16px; }
  .info-block { padding: 20px 16px; }
  .formula-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-layout { grid-template-columns: 1fr; }
  .formula-layout { grid-template-columns: 1fr; }
  .formula-sidebar { display: none; }
  .cat-layout .formula-sidebar { display: none; }
  .ad-slot-rectangle { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-header h2 { font-size: 28px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .breadcrumb { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .hero h1 { font-size: clamp(32px, 8vw, 52px); }
  .newsletter-form { flex-direction: column; border-radius: var(--radius); }
  .newsletter-form input { border-radius: var(--radius) var(--radius) 0 0; }
  .newsletter-form button { border-radius: 0 0 var(--radius) var(--radius); }
  .hero-search { flex-direction: column; border-radius: var(--radius-lg); }
  .hero-search button { border-radius: 0 0 var(--radius-lg) var(--radius-lg); width: 100%; }
  .cat-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .formula-card-footer { flex-wrap: wrap; gap: 8px; }
  .formula-display { font-size: 16px; }
  .hero-stat strong { font-size: 22px; }
  .subcats { gap: 8px; }
  .subcat-btn { padding: 6px 14px; font-size: 13px; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease forwards; }
.fade-up-2 { animation: fadeUp 0.5s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.5s 0.2s ease both; }
