/* ===== ege-shkoly.ru — Молодёжный, дружелюбный стиль ===== */
:root {
  --primary: #4A148C;
  --primary-light: #7B1FA2;
  --primary-pale: #F3E5F5;
  --accent: #FF6D00;
  --accent-light: #FF9100;
  --accent-pale: #FFF3E0;
  --bg: #ffffff;
  --bg-alt: #FAFAFA;
  --bg-warm: #FFF8F0;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E8E8E8;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(74,20,140,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 50px;
  --container: 1140px;
  --font: 'Comfortaa', cursive;
  --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.5rem; }
h1, h2, h3, h4 { color: var(--primary); font-weight: 700; line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
p { margin-bottom: 1rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ===== Nav — Centered Logo (F) ===== */
.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 0;
}
.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 0;
}
.nav-links a {
  color: var(--text-light);
  font-size: 0.82rem;
  padding: 8px 14px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--primary); border-bottom-color: var(--primary-pale); }
.nav-links a.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 600; }

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  position: absolute;
  right: 20px;
  top: 16px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero — Minimalist White (E) ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: var(--bg);
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ===== Buttons — Pill (B) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255,109,0,0.25);
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,109,0,0.35);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary-pale); color: var(--primary); }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== Sections — White + Color Accents (G) ===== */
.section {
  padding: 70px 0;
  background: var(--bg);
}
.section-alt { background: var(--bg-alt); }
.section-warm { background: var(--bg-warm); }
.section-purple { background: var(--primary-pale); }
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
}
.section-header p {
  color: var(--text-light);
  max-width: 550px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* ===== Cards — Horizontal (G) ===== */
.card-h {
  display: flex;
  gap: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: box-shadow var(--transition);
}
.card-h:hover { box-shadow: var(--shadow-lg); }
.card-h-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--primary-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.card-h-body { flex: 1; }
.card-h-body h3 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.card-h-body p { color: var(--text-light); font-size: 0.9rem; margin: 0; }
.card-h-actions { margin-top: 0.75rem; }

/* Vertical cards for grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.card-v {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: box-shadow var(--transition);
}
.card-v:hover { box-shadow: var(--shadow-lg); }
.card-v-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.card-v h3 { margin: 0 0 0.5rem; }
.card-v p { color: var(--text-light); font-size: 0.9rem; margin: 0; }

/* ===== Price — Three Columns (B) ===== */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}
.price-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}
.price-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.price-card.featured {
  border-color: var(--accent);
  position: relative;
}
.price-card.featured::before {
  content: 'Популярное';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: var(--radius-pill);
}
.price-card-name { font-weight: 700; color: var(--primary); margin-bottom: 0.25rem; }
.price-card-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.75rem 0;
}
.price-card-price small { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }
.price-card-features {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  text-align: left;
}
.price-card-features li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.price-card-features li::before { content: '✓ '; color: var(--accent); font-weight: 700; }

/* ===== Table ===== */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead { background: var(--primary-pale); }
th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.85rem;
  border-bottom: 2px solid var(--primary);
}
td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
tbody tr:hover { background: var(--accent-pale); }

/* ===== Rating badge ===== */
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.rating-star { color: var(--accent); }

/* ===== Pros/Cons ===== */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.pros, .cons {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.pros { border-left: 4px solid var(--accent); }
.cons { border-left: 4px solid var(--primary); }
.pros h4 { color: var(--accent); margin-bottom: 0.5rem; }
.cons h4 { color: var(--primary); margin-bottom: 0.5rem; }
.pros ul, .cons ul { list-style: none; padding: 0; }
.pros li, .cons li { padding: 4px 0; font-size: 0.9rem; color: var(--text-light); }
.pros li::before { content: '+ '; color: var(--accent); font-weight: 700; }
.cons li::before { content: '− '; color: var(--primary); font-weight: 700; }

/* ===== Steps ===== */
.steps { counter-reset: step; margin: 1.5rem 0; }
.step {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step::before {
  counter-increment: step;
  content: counter(step);
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-pale);
  border-radius: 50%;
  font-weight: 700;
  color: var(--primary);
}
.step-content h3 { margin: 0 0 0.25rem; }
.step-content p { margin: 0; font-size: 0.93rem; color: var(--text-light); }

/* ===== FAQ — Cards Open (D) ===== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.faq-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.faq-card h4 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.faq-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* Also support accordion for inner pages */
.faq-list { max-width: 700px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 1rem 0;
  cursor: pointer;
  text-align: left;
}
.faq-question:hover { color: var(--primary); }
.faq-question::after { content: '+'; font-size: 1.2rem; color: var(--accent); }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-answer-inner { padding: 0 0 1rem; font-size: 0.9rem; color: var(--text-light); }
.faq-answer-inner p { margin: 0; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { padding: 12px 0; background: var(--bg-alt); }
.breadcrumbs-list {
  display: flex;
  gap: 8px;
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.breadcrumbs-list li + li::before { content: '›'; margin-right: 8px; }
.breadcrumbs-list a { color: var(--text-muted); }
.breadcrumbs-list a:hover { color: var(--primary); }

/* ===== Article ===== */
.article { padding: 2rem 0 4rem; }
.article-content { max-width: 780px; }
.article-header { margin-bottom: 1.5rem; }
.article-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ===== Layout with sidebar ===== */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2.5rem;
  align-items: start;
}

/* ===== Sidebar ===== */
.sidebar-widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.sidebar-widget h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--text-light);
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.sidebar-nav a:hover { color: var(--primary); background: var(--primary-pale); }

/* ===== Info Box ===== */
.info-box {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}
.info-box-icon { font-size: 1.3rem; flex-shrink: 0; }
.info-box-purple { background: var(--primary-pale); border-color: var(--primary-light); }
.info-box-orange { background: var(--accent-pale); border-color: var(--accent); }

/* ===== CTA Banner ===== */
.cta-banner {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin: 2.5rem 0;
}
.cta-banner h2 { color: #fff; margin: 0 0 0.5rem; }
.cta-banner p { color: rgba(255,255,255,0.8); margin: 0 0 1.5rem; }

/* ===== School Card (for review pages) ===== */
.school-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0;
}
.school-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.school-logo {
  width: 56px;
  height: 56px;
  background: var(--primary-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--primary);
}
.school-name { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.school-tagline { font-size: 0.85rem; color: var(--text-muted); }

/* ===== Footer — 3 columns + subscribe (C) ===== */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand p { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin: 0.75rem 0; }
.footer-disclaimer { font-size: 0.75rem; opacity: 0.5; }
.footer h4 {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: rgba(255,255,255,0.8); font-size: 0.88rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ===== Tags ===== */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tag-purple { background: var(--primary-pale); color: var(--primary); border-color: var(--primary-light); }
.tag-orange { background: var(--accent-pale); color: var(--accent); border-color: var(--accent); }

/* ===== Utilities ===== */
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav .container { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 0; height: 56px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: var(--bg);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-links.open a { border-bottom: none; }
  .burger { display: block; }
  h1 { font-size: 1.6rem; }
  .section { padding: 50px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .card-h { flex-direction: column; }
  .pros-cons { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}
