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

:root {
  --primary: #1a237e;
  --primary-dark: #0d1452;
  --accent: #ff6b35;
  --accent-dark: #e55520;
  --bg: #ffffff;
  --bg-gray: #f5f6fa;
  --text: #1a1a1a;
  --text-light: #666;
  --border: #e0e0e0;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Перебиваем Bootstrap container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
.container--narrow { max-width: 720px; }

/* ============================================================
   HEADER (Bootstrap navbar + наши стили)
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.header .navbar {
  padding: 0.5rem 0;
}
.logo {
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
  text-decoration: none;
}
.logo:hover { color: var(--accent); }
.logo span { display: inline; }

.navbar-nav .nav-link {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  position: relative;
  transition: color 0.2s ease;
  padding: 0.5rem 0;
}
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}
.navbar-nav .nav-link:hover { color: var(--accent); }
.navbar-nav .nav-link:hover::after { width: 100%; }
.navbar-nav .nav-link.is-active { color: var(--accent); }
.navbar-nav .nav-link.is-active::after { width: 100%; }

.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }

@media (max-width: 991px) {
  .navbar-nav { padding-top: 1rem; }
  .navbar-nav .nav-item { padding: 0.25rem 0; }
}

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}
.btn--primary::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn--primary:hover::before { left: 125%; }

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--ghost:hover {
  background: var(--primary);
  color: #fff;
}
.btn--small {
  padding: 8px 18px;
  font-size: 14px;
  background: var(--primary);
  color: #fff;
}
.btn--small:hover { background: var(--primary-dark); color: #fff; }
.btn--full { width: 100%; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(26, 35, 126, 0.06), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.06), transparent 50%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero__bg-dot {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.15), transparent 70%);
  animation: float 8s ease-in-out infinite;
}
.hero__bg-dot:nth-child(2) { animation-duration: 10s; animation-delay: -2s; }
.hero__bg-dot:nth-child(3) { animation-duration: 12s; animation-delay: -4s; }
.hero__bg-dot:nth-child(4) { animation-duration: 9s;  animation-delay: -1s; }
.hero__bg-dot:nth-child(5) { animation-duration: 11s; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(20px, -30px) scale(1.1); }
  66%      { transform: translate(-15px, 20px) scale(0.95); }
}

.badge {
  display: inline-block;
  background: rgba(255, 107, 53, 0.1);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  animation: badgePulse 2.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.5); }
  50%      { box-shadow: 0 0 0 12px rgba(255, 107, 53, 0); }
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--primary);
  margin-bottom: 20px;
}
.hero__subtitle {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 32px;
}
.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero__facts {
  display: flex;
  gap: 32px;
  list-style: none;
  padding: 0;
}
.hero__facts li {
  display: flex;
  flex-direction: column;
}
.hero__facts strong {
  font-size: 22px;
  color: var(--primary);
}
.hero__facts span {
  font-size: 13px;
  color: var(--text-light);
}
.hero__img img {
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(-0.5deg); }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 80px 0; }
.section--gray { background: var(--bg-gray); }
.section--primary {
  background: var(--primary);
  color: #fff;
}
.section__title {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  text-align: center;
}
.section__title--light { color: #fff; }
.section__subtitle {
  font-size: 17px;
  color: var(--text-light);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 50px;
}
.section__subtitle--light { color: rgba(255,255,255,0.8); }

/* ============================================================
   CARDS
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
  border: none;
}
.card:hover { transform: translateY(-4px); }
.card__icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover .card__icon {
  transform: scale(1.3) rotate(-8deg);
}
.card h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 8px;
}
.card p { color: var(--text-light); font-size: 15px; }

/* ============================================================
   ACCORDION (программа)
   ============================================================ */
.accordion {
  max-width: 860px;
  margin: 0 auto;
}
.accordion-item {
  background: #fff;
  border: none;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.accordion-button {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
  padding: 22px 28px;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  gap: 16px;
}
.accordion-button:not(.collapsed) {
  background: #fff;
  color: var(--primary);
}
.accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}
.accordion-button::after {
  background-image: none;
  content: "+";
  font-size: 26px;
  color: var(--accent);
  transform: none;
  width: auto;
  height: auto;
  transition: transform 0.3s ease;
}
.accordion-button:not(.collapsed)::after {
  content: "−";
  transform: rotate(180deg);
}
.timeline__day {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  min-width: 80px;
  display: inline-block;
}
.accordion-body {
  padding: 8px 28px 24px;
}
.accordion-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.accordion-body li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--text-light);
}
.accordion-body li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   BENEFITS
   ============================================================ */
.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.benefit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  font-size: 15px;
}
.benefit span {
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.benefit:hover span {
  transform: scale(1.4) rotate(10deg);
}

/* ============================================================
   FORM
   ============================================================ */
.form {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}
.form input,
.form select,
.form textarea {
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
  transform: translateY(-1px);
}
.form .checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}
.form .checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}
.form__status {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.form__status--ok {
  background: #d4edda;
  color: #155724;
}
.form__status--err {
  background: #f8d7da;
  color: #721c24;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq summary {
  padding: 20px 24px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: color 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  font-size: 24px;
  color: var(--accent);
  transition: transform 0.2s;
}
.faq[open] summary { color: var(--accent); }
.faq[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq p {
  padding: 0 24px 20px;
  color: var(--text-light);
}

/* ============================================================
   CONTACTS
   ============================================================ */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
.contact-card--wide { grid-column: 1 / -1; }

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26, 35, 126, 0.12);
}
.contact-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(26, 35, 126, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}
.contact-card:hover .contact-card__icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08) rotate(-6deg);
}
.contact-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.contact-card__title {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  margin-bottom: 4px;
}
.contact-card__link {
  color: var(--text-light);
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
  width: fit-content;
}
.contact-card__link:hover {
  color: var(--accent);
  transform: translateX(3px);
}
.contact-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.contact-card__social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.contact-card__social:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  color: #fff;
}
.contact-card__social--vk { background: #0077FF; }
.contact-card__social--vk:hover { background: #0066DD; }
.contact-card__social--tg { background: #229ED9; }
.contact-card__social--tg:hover { background: #1A8DC2; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 30px 0;
  text-align: center;
  font-size: 14px;
}
.footer p { margin: 0; }

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ff9a6c);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.6);
}

/* ============================================================
   CURSOR DOT
   ============================================================ */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.05s ease;
}

/* ============================================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   ============================================================ */
[data-animate] {
  opacity: 0;
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}
[data-animate="fade-up"]    { transform: translateY(40px); }
[data-animate="fade-down"]  { transform: translateY(-30px); }
[data-animate="fade-left"]  { transform: translateX(60px); }
[data-animate="fade-right"] { transform: translateX(-60px); }
[data-animate="zoom-in"]    { transform: scale(0.85); }

/* ============================================================
   MODAL (Bootstrap override)
   ============================================================ */
.modal-content {
  border: none;
  border-radius: var(--radius);
}
.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}
.modal-title {
  font-weight: 800;
  color: var(--primary);
  font-size: 20px;
}
.modal-body { padding: 24px; font-size: 15px; }
.modal-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .hero { padding: 40px 0 60px; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 32px; }
  .hero__facts { gap: 20px; }
  .section { padding: 60px 0; }
  .section__title { font-size: 28px; }
}

@media (max-width: 640px) {
  .hero__bg-dot { display: none; }
  .hero__img img { animation: none; }
  [data-animate] { transform: translateY(20px); }
  [data-animate="fade-left"],
  [data-animate="fade-right"] { transform: translateY(20px); }

  .hero h1 { font-size: 26px; }
  .hero__subtitle { font-size: 16px; }
  .section { padding: 40px 0; }
  .section__title { font-size: 24px; }
  .section__subtitle { font-size: 15px; margin-bottom: 32px; }

  .accordion-button { padding: 16px 20px; font-size: 16px; }
  .timeline__day { min-width: 60px; font-size: 16px; }
  .accordion-body { padding: 8px 20px 20px; }

  .form { padding: 24px; }
  .form__row { grid-template-columns: 1fr; }

  .contacts-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 18px; gap: 14px; }
  .contact-card__icon { width: 40px; height: 40px; }

  .cursor-dot { display: none; }
}

/* ============================================================
   PREFERS REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__bg-dot,
  .hero__img img,
  .badge {
    animation: none !important;
  }
}

/* ===== Смена картинки (crossfade) ===== */
.fade-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;         /* фиксируем пропорции */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.fade-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 8s ease, transform 0.6s ease;
}
.fade-img__front {
  opacity: 1;
  z-index: 2;
}
.fade-img__back {
  opacity: 0;
  z-index: 1;
  transform: scale(1.05);
}

.fade-img:hover .fade-img__front {
  opacity: 0;
}
.fade-img:hover .fade-img__back {
  opacity: 1;
  transform: scale(1);
}