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

:root {
  --primary: #b91c1c;
  --primary-dark: #7f1d1d;
  --accent: #dc2626;
  --accent-dark: #991b1b;
  --accent-light: #fecaca;
  --text: #2b1a1a;
  --text-light: #7c5c5c;
  --bg-light: #fef4f4;
  --white: #ffffff;
  --border: #f0d9d9;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title { font-size: 20px; font-weight: 700; color: var(--primary); }
.logo-subtitle { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }

nav ul { list-style: none; display: flex; gap: 5px; }

nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: block;
}

nav a:hover,
nav a.active { background: var(--primary); color: white; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 26px; height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== SECTIONS ===== */
section { padding: 80px 20px; }
.container { max-width: 1200px; margin: 0 auto; }

.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 17px;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-title::after {
  content: '';
  display: block;
  width: 70px; height: 4px;
  background: var(--accent);
  margin: 18px auto 0;
  border-radius: 2px;
}

/* ===== ОБРАЗОВАТЕЛЬНЫЕ ПРОГРАММЫ ===== */
.program-list {
  list-style: none;
  max-width: 820px;
  margin: 46px auto 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.program { text-align: center; }

.program-type {
  margin: 0 0 8px;
  font-size: 17px;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-light);
}

.program-link {
  display: inline-block;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

.program-link:hover { color: var(--primary-dark); }

.program-icon {
  margin-top: 56px;
  text-align: center;
  color: var(--text);
}

.program-icon svg { width: 72px; height: 72px; }

/* ===== PAGE HERO (внутренние страницы) ===== */
.page-hero {
  background:
    url('hero-bg.svg') center / cover no-repeat,
    linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
  color: white;
  padding: 70px 20px;
  text-align: center;
}

.page-hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 15px; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.page-hero p { font-size: 17px; opacity: 0.95; max-width: 700px; margin: 0 auto; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3); }

/* ===== HERO (главная) ===== */
.hero {
  background:
    url('hero-bg.svg') center / cover no-repeat,
    linear-gradient(135deg, #7f1d1d 0%, #b91c1c 50%, #dc2626 100%);
  color: white;
  padding: 100px 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  top: -200px; right: -100px;
}

.hero::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(254, 202, 202, 0.18);
  border-radius: 50%;
  bottom: -100px; left: -80px;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); overflow-wrap: break-word; }
.hero h1 span { color: var(--accent-light); }
.hero p { font-size: 18px; margin-bottom: 32px; opacity: 0.95; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3); }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; }

.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.stat-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
}

.stat-number { font-size: 38px; font-weight: 800; color: var(--accent-light); line-height: 1; }
.stat-label { font-size: 14px; margin-top: 8px; opacity: 0.9; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-align: center;
}

.btn-primary { background: var(--white); color: var(--primary-dark); }
.btn-primary:hover {
  background: var(--accent-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: white; color: var(--primary); }

/* ===== CARDS ===== */
.training { background: var(--bg-light); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.card:hover { transform: translateY(-6px); box-shadow: 0 15px 35px rgba(185, 28, 28, 0.15); }
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  margin-bottom: 20px;
}

.card h3 { font-size: 20px; margin-bottom: 12px; color: var(--text); }
.card p { color: var(--text-light); font-size: 15px; margin-bottom: 18px; }

.card-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-light);
}

.card-meta strong { color: var(--primary); }

/* ===== EDUCATION ===== */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }

.edu-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  gap: 20px;
  transition: all 0.3s;
}

.edu-item:hover { border-color: var(--primary); box-shadow: 0 8px 25px rgba(185, 28, 28, 0.1); }

.edu-num { font-size: 36px; font-weight: 800; color: var(--accent); line-height: 1; min-width: 50px; }
.edu-item h4 { font-size: 17px; margin-bottom: 8px; color: var(--text); }
.edu-item p { font-size: 14px; color: var(--text-light); }

/* ===== ABOUT ===== */
.about { background: var(--bg-light); }
.about-plain { background: var(--white); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.about-visual {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  border-radius: 20px;
  padding: 50px 40px;
  color: white;
  position: relative;
  overflow: hidden;
}

.about-visual::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: rgba(254, 202, 202, 0.2);
  border-radius: 50%;
  bottom: -80px; right: -60px;
}

.about-visual h3 { font-size: 26px; margin-bottom: 25px; position: relative; z-index: 1; }
.about-list { list-style: none; position: relative; z-index: 1; }

.about-list li {
  padding: 12px 0 12px 32px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.about-list li:last-child { border-bottom: none; }

.about-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-weight: bold;
  font-size: 18px;
}

.about-text h3 { font-size: 28px; margin-bottom: 20px; color: var(--text); }
.about-text p { color: var(--text-light); margin-bottom: 18px; font-size: 16px; }

.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }

.feature { display: flex; align-items: flex-start; gap: 12px; }

.feature-icon {
  width: 42px; height: 42px;
  background: rgba(185, 28, 28, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.feature h5 { font-size: 15px; margin-bottom: 4px; }
.feature p { font-size: 13px; color: var(--text-light); margin: 0; }

/* ===== CONTACTS ===== */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info { display: flex; flex-direction: column; gap: 22px; }

.contact-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 12px;
  transition: all 0.3s;
}

.contact-item:hover { background: white; box-shadow: 0 6px 20px rgba(0,0,0,0.08); }

.contact-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  flex-shrink: 0;
}

.contact-item h4 { font-size: 15px; color: var(--text-light); margin-bottom: 4px; font-weight: 500; }
.contact-item p { font-size: 16px; color: var(--text); font-weight: 600; }

.contact-form {
  background: white;
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.contact-form h3 { font-size: 22px; margin-bottom: 8px; }
.contact-form > p { color: var(--text-light); font-size: 14px; margin-bottom: 25px; }

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.3s;
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.form-group textarea { resize: vertical; min-height: 110px; }
.contact-form .btn { width: 100%; background: var(--primary); color: white; }
.contact-form .btn:hover { background: var(--primary-dark); }

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
  color: white;
  text-align: center;
  padding: 70px 20px;
}

.cta-section h2 { font-size: 32px; margin-bottom: 15px; }
.cta-section p { font-size: 17px; opacity: 0.95; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ===== FOOTER ===== */
footer { background: #1c1111; color: #d8c9c9; padding: 50px 20px 25px; }

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #3b2626;
}

.footer-col h4 { color: white; font-size: 16px; margin-bottom: 18px; }

.footer-col p, .footer-col a {
  color: #b8a3a3;
  font-size: 14px;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--accent-light); }

.footer-bottom {
  max-width: 1200px;
  margin: 25px auto 0;
  text-align: center;
  font-size: 13px;
  color: #8a7070;
}

/* ===== СОГЛАСИЕ НА ОБРАБОТКУ ПДн ===== */
.form-consent { margin-top: 4px; margin-bottom: 20px; }

.form-group label.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-light);
  cursor: pointer;
  margin-bottom: 0;
}

.form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}

.consent-label a { color: var(--primary); text-decoration: underline; }
.consent-label a:hover { color: var(--primary-dark); }

/* ===== ДОКУМЕНТЫ (политика ПДн) ===== */
.policy-section { background: var(--bg-light); }

.policy {
  max-width: 860px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 45px 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.policy-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.policy h2 { font-size: 21px; color: var(--text); margin: 32px 0 12px; }
.policy h2:first-of-type { margin-top: 0; }
.policy p { font-size: 15px; color: var(--text-light); margin-bottom: 12px; }
.policy ul, .policy ol { margin: 0 0 14px 22px; }
.policy li { font-size: 15px; color: var(--text-light); margin-bottom: 8px; }
.policy a { color: var(--primary); }
.policy strong { color: var(--text); }

/* ===== СВЕДЕНИЯ ОБ ОБРАЗОВАТЕЛЬНОЙ ОРГАНИЗАЦИИ ===== */
.org-toc {
  max-width: 960px;
  margin: 0 auto;
}

.org-toc ol {
  margin: 0 0 0 24px;
  padding: 0;
}

.org-toc li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.4;
}

.org-toc li:last-child { margin-bottom: 0; }

.org-toc a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.org-toc a:hover { color: var(--primary-dark); }

.org-sections {
  max-width: 960px;
  margin: 0 auto;
}

.org-block {
  padding: 60px 0;
  scroll-margin-top: 100px;
}

.org-block:first-child { padding-top: 90px; }

.org-block h3 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin: 0;
}

.org-block p {
  margin: 18px auto 0;
  max-width: 760px;
  text-align: center;
  font-size: 16px;
  color: var(--text-light);
}

/* ===== 404 ===== */
.error-page { text-align: center; padding: 90px 20px; }
.error-code { font-size: 96px; font-weight: 800; line-height: 1; color: var(--primary); letter-spacing: 6px; }
.error-page h1 { font-size: 30px; margin: 18px 0 14px; color: var(--text); }
.error-page > p { color: var(--text-light); max-width: 520px; margin: 0 auto 32px; font-size: 16px; }
.error-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.error-actions .btn-primary { background: var(--primary); color: white; }
.error-actions .btn-primary:hover { background: var(--primary-dark); color: white; }
.error-actions .btn-outline { color: var(--primary); border-color: var(--primary); }
.error-actions .btn-outline:hover { background: var(--primary); color: white; }

@media (max-width: 768px) {
  .policy { padding: 28px 22px; }
  .policy h2 { font-size: 19px; }
  .error-page { padding: 60px 20px; }
  .error-code { font-size: 68px; }
  .error-page h1 { font-size: 24px; }
  .org-toc { padding: 0; }
  .org-toc li { font-size: 15px; }
  .org-block { padding: 40px 0; scroll-margin-top: 85px; }
  .org-block:first-child { padding-top: 55px; }
  .org-block h3 { font-size: 19px; }
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-content,
  .about-grid,
  .contacts-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 38px; }
  .footer-container { grid-template-columns: 1fr 1fr; }
  .page-hero h1 { font-size: 34px; }
}

@media (max-width: 768px) {
  .header-container { height: 70px; }
  .logo-subtitle { display: none; }
  .burger { display: flex; }

  nav {
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav.open { max-height: 500px; }
  nav ul { flex-direction: column; padding: 15px; gap: 5px; }
  nav a { padding: 12px 16px; }

  section { padding: 60px 20px; }
  .section-title { font-size: 28px; }
  .hero { padding: 70px 20px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 30px; }
  .footer-container { grid-template-columns: 1fr; gap: 30px; }
  .about-features { grid-template-columns: 1fr; }
  .page-hero { padding: 50px 20px; }
  .page-hero h1 { font-size: 28px; }

  .program-list { margin-top: 34px; gap: 34px; }
  .program-type { font-size: 15px; }
  .program-link { font-size: 17px; }
  .program-icon { margin-top: 40px; }
  .program-icon svg { width: 56px; height: 56px; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
}