:root {
  --accent: #D9EEDF;
  --accent-dark: #b8dfc5;
  --text: #2c3e50;
  --text-light: #5a6a7a;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; }
html {
  scroll-behavior: smooth;
}

/* Отступ для фиксированной шапки при скролле к якорям */
section[id] {
  scroll-margin-top: 90px;
}

body {
  overflow-x: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

header {
  position: fixed; top: 0; left: 0; width: 100%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}
.logo { white-space: nowrap; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.4rem; color: var(--text); text-decoration: none; }

.logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: transform 0.3s ease;
  display: block;
}

.logo:hover .logo-img {
  transform: scale(1.08) rotate(-5deg);
}

nav { display: flex; gap: 32px; align-items: center; }
nav a { white-space: nowrap; text-decoration: none; color: var(--text); font-weight: 500; transition: color 0.3s; }
nav a:hover { color: #4a9b6e; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--text);
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-primary { background: #4a9b6e; color: white; }
.btn-primary:hover { background: #3d8259; }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; width: 48px; height: 48px; border-radius: 12px; }

.hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, #f8fdf9 0%, var(--accent) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* Математические символы на фоне */
.hero-math-decor {
  position: absolute;
  color: #4a9b6e;
  opacity: 0.28;
  animation: mathFloat 7s ease-in-out infinite alternate;
  font-weight: 700;
  font-family: 'Times New Roman', serif;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

.hero-d1 { top: 15%; left: 5%; font-size: 8rem; transform: rotate(-15deg); }
.hero-d2 { top: 10%; right: 8%; font-size: 10rem; transform: rotate(20deg); }
.hero-d3 { bottom: 15%; left: 10%; font-size: 7rem; transform: rotate(10deg); }
.hero-d4 { bottom: 10%; right: 12%; font-size: 9rem; transform: rotate(-25deg); }
.hero-d5 { top: 45%; left: 2%; font-size: 5rem; transform: rotate(30deg); }
.hero-d6 { top: 40%; right: 3%; font-size: 6rem; transform: rotate(-10deg); }

@media (max-width: 768px) {
  .hero-math-decor { opacity: 0.2; }
  .hero-d1, .hero-d3, .hero-d5 { font-size: 4rem; }
  .hero-d2, .hero-d4, .hero-d6 { font-size: 5rem; }
}.hero h1 { font-size: 3.2rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.hero p { font-size: 1.25rem; color: var(--text-light); max-width: 600px; margin: 0 auto 40px; }

section { padding: 100px 0; }

.section-title { text-align: center; font-size: 2.4rem; margin-bottom: 16px; font-weight: 700; }
.section-subtitle { text-align: center; color: var(--text-light); max-width: 600px; margin: 0 auto 60px; }

.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h3 { font-size: 1.8rem; margin-bottom: 20px; }
.about-text p { margin-bottom: 16px; color: var(--text-light); }
.about-image {
  background: var(--accent);
  height: 400px;
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}

.programs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.program-card {
  background: white; border-radius: 20px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
  border: 1px solid #eef5f0;
  transition: transform 0.3s;
}
.program-card:hover { transform: translateY(-8px); }
.program-card h3 { font-size: 1.4rem; margin-bottom: 12px; color: #4a9b6e; }
.program-card p { color: var(--text-light); margin-bottom: 20px; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-card { text-align: center; padding: 40px 24px; background: #f8fdf9; border-radius: 20px; }
.feature-icon {
  width: 70px; height: 70px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* При наведении — фон и тень меняются плавно */
.feature-card:hover .feature-icon,
.feature-card.active .feature-icon {
  background: var(--accent-dark);
  box-shadow: 0 10px 25px rgba(74, 155, 110, 0.25);
}

/* ===== 1. Два человечка — покачивание ===== */
.feature-card:nth-child(1):not(:hover):not(.active) .feature-icon {
  animation: swayBack 0.5s ease-out forwards;
}
.feature-card:nth-child(1):hover .feature-icon,
.feature-card:nth-child(1).active .feature-icon {
  animation: swayFwd 0.6s ease-in-out infinite alternate;
}

@keyframes swayFwd {
  0%   { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(-10deg) scale(1.15); }
}
@keyframes swayBack {
  0%   { transform: rotate(-10deg) scale(1.15); }
  100% { transform: rotate(0deg) scale(1); }
}

/* ===== 2. Дартс — попадание ===== */
.feature-card:nth-child(2):not(:hover):not(.active) .feature-icon {
  animation: hitBack 0.4s ease-out forwards;
}
.feature-card:nth-child(2):hover .feature-icon,
.feature-card:nth-child(2).active .feature-icon {
  animation: hitFwd 0.5s ease-out forwards;
}

@keyframes hitFwd {
  0%   { transform: scale(1) rotate(0); }
  20%  { transform: scale(1.3) rotate(-6deg); }
  40%  { transform: scale(1.12) rotate(6deg); }
  60%  { transform: scale(1.25) rotate(-3deg); }
  100% { transform: scale(1.15) rotate(0); }
}
@keyframes hitBack {
  0%   { transform: scale(1.15) rotate(0); }
  100% { transform: scale(1) rotate(0); }
}

/* ===== 3. График — рост вверх ===== */
.feature-card:nth-child(3):not(:hover):not(.active) .feature-icon {
  animation: growBack 0.5s ease-out forwards;
}
.feature-card:nth-child(3):hover .feature-icon,
.feature-card:nth-child(3).active .feature-icon {
  animation: growFwd 0.5s ease-out forwards;
}

@keyframes growFwd {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-10px) scale(1.18); }
  100% { transform: translateY(-6px) scale(1.15); }
}
@keyframes growBack {
  0%   { transform: translateY(-6px) scale(1.15); }
  100% { transform: translateY(0) scale(1); }
}
/* Смайлик с зубами: 😊 меняется на 😁 при наведении */
.feature-card:nth-child(4) .icon-hover {
  display: none;
}

.feature-card:nth-child(4):hover .icon-normal,
.feature-card:nth-child(4).active .icon-normal {
  display: none;
}

.feature-card:nth-child(4):hover .icon-hover,
.feature-card:nth-child(4).active .icon-hover {
  display: inline;
}
/* ===== 4. Смайлик — кивок ===== */
.feature-card:nth-child(4):not(:hover):not(.active) .feature-icon {
  animation: nodBack 0.5s ease-out forwards;
}
.feature-card:nth-child(4):hover .feature-icon,
.feature-card:nth-child(4).active .feature-icon {
  animation: nodFwd 0.6s ease-in-out infinite alternate;
}

@keyframes nodFwd {
  0%   { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(10deg) scale(1.15); }
}
@keyframes nodBack {
  0%   { transform: rotate(10deg) scale(1.15); }
  100% { transform: rotate(0deg) scale(1); }
}
/* Отступ для заголовков карточек */
.feature-card h3 { margin-bottom: 12px; }
/* Как проходят занятия */
/* Цены */
.prices-section { background: #fff; }

.prices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.price-card {
  background: #f8fdf9;
  border: 1px solid #eef5f0;
  border-radius: 20px;
  padding: 40px 28px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(74, 155, 110, 0.12);
}

.price-card-featured {
  background: #fff;
  border: 2px solid #4a9b6e;
  box-shadow: 0 15px 40px rgba(74, 155, 110, 0.15);
}

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #4a9b6e;
  color: #fff;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-card h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: #2c3e50;
}

.price-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #4a9b6e;
  margin-bottom: 16px;
}
.price-from {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  vertical-align: middle;
  margin-right: 4px;
}
.price-desc {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.5;
}
.steps-section { background: #fff; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.step-card {
  background: #f8fdf9;
  border-radius: 20px;
  padding: 40px 28px 32px;
  text-align: center;
  position: relative;
  border: 1px solid #eef5f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(74, 155, 110, 0.12);
}

.step-number {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #4a9b6e, #3d8259);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 20px;
  box-shadow: 0 8px 20px rgba(74, 155, 110, 0.3);
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #2c3e50;
}

.step-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}
.teachers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.teacher-card { text-align: center; background: white; border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.teacher-photo {
  width: 180px; height: 180px;
  background: var(--accent);
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  border: 4px solid var(--accent-dark);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.teacher-card h3 { margin-bottom: 8px; }
.teacher-card p { color: var(--text-light); font-size: 0.95rem; }

/* Отзывы: горизонтальная лента с листанием */
.reviews-carousel { position: relative; }
.reviews-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 20px;
  scrollbar-width: none;
  outline: none;
}
.reviews-track::-webkit-scrollbar { display: none; }

.review-card {
  flex: 0 0 min(400px, 86%);
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid #e6f2ea;
  border-top: 4px solid #4a9b6e;
  padding: 28px 28px 24px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(44, 62, 80, 0.07);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.review-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(74, 155, 110, 0.18); }
/* Большая кавычка-подложка в углу */
.review-card::before {
  content: '“';
  font-size: 6rem;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--accent);
  position: absolute;
  top: 6px; right: 20px;
  pointer-events: none;
}
.review-text {
  margin: 18px 0 22px;
  font-style: normal;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  flex: 1;              /* карточки одной высоты, подпись всегда внизу */
  position: relative;
}

/* Пять звёзд: по очереди «вспыхивают» */
.review-stars { display: flex; gap: 4px; font-size: 1.5rem; line-height: 1; color: #f5b301; }
.review-stars span { display: inline-block; animation: starShine 3.2s ease-in-out infinite; }
.review-stars span:nth-child(2) { animation-delay: 0.15s; }
.review-stars span:nth-child(3) { animation-delay: 0.3s; }
.review-stars span:nth-child(4) { animation-delay: 0.45s; }
.review-stars span:nth-child(5) { animation-delay: 0.6s; }
@keyframes starShine {
  0%, 45%, 100% { transform: scale(1) rotate(0); filter: none; }
  15% { transform: scale(1.35) rotate(-12deg); filter: drop-shadow(0 0 6px rgba(245,179,1,0.8)); }
  30% { transform: scale(1.1) rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) { .review-stars span { animation: none; } }

.rev-arrow {
  position: absolute; top: 50%; transform: translateY(-60%);
  width: 46px; height: 46px; border-radius: 50%;
  border: none; background: #fff; color: #4a9b6e;
  font-size: 2rem; line-height: 1; padding-bottom: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  cursor: pointer; z-index: 3;
  transition: background 0.2s, opacity 0.2s;
}
.rev-arrow:hover { background: var(--accent); }
.rev-arrow:disabled { opacity: 0; pointer-events: none; }
.rev-prev { left: -12px; }
.rev-next { right: -12px; }
@media (hover: none) { .rev-arrow { display: none; } }
.review-author {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 1rem; color: var(--text);
  padding-top: 18px; border-top: 1px solid #eef5f0;
}
.review-avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #5fb386, #3d8259); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(74, 155, 110, 0.35);
}

.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h3 { margin-bottom: 24px; font-size: 1.5rem; }
.contact-item { display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start; }
.contact-item span { font-size: 1.4rem; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #dfeae4;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #4a9b6e; }

footer { background: #2c3e50; color: white; padding: 56px 0 40px; text-align: center; }
.footer-title { font-size: 1.3rem; margin-bottom: 10px; font-weight: 600; }
.footer-tagline { opacity: 0.8; margin-bottom: 36px; }
.footer-contacts-title { font-size: 1.15rem; margin-bottom: 24px; color: var(--accent); }
.footer-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 32px;
  max-width: 1040px;
  margin: 0 auto 36px;
  text-align: left;
}
footer .contact-item { margin-bottom: 14px; }
footer .contact-item small { opacity: 0.65; font-size: 0.85rem; }
footer .contact-item a { color: var(--accent); text-decoration: none; }
footer .contact-item a:hover { text-decoration: underline; }
.footer-copy { opacity: 0.6; font-size: 0.9rem; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); }

/* Форма записи теперь одна — по центру */
.contacts-grid-single { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }

/* Карта в разделе «О студии» */
.about-map { height: 400px; border-radius: 24px; overflow: hidden; background: var(--accent); box-shadow: var(--shadow); }
.about-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ===== Адаптация под планшет и телефон ===== */

/* Меню-«бургер»: пунктов много (8), в одну строку они помещаются только на широком экране */
@media (max-width: 1100px) {
  .mobile-menu-btn { display: block; }
  nav {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }
  nav.active { display: flex; }
  nav a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid #eef5f0; }
  nav a.btn { margin-top: 12px; text-align: center; border-bottom: none; padding: 14px 28px; }
}

/* Планшет */
@media (max-width: 1024px) {
  .hero h1 { font-size: 2.6rem; }
  .about-content, .contacts-grid { gap: 36px; }
  section { padding: 72px 0; }
}

/* Телефон и узкий планшет */
@media (max-width: 900px) {
  section[id] { scroll-margin-top: 72px; }
  .container { padding: 0 16px; }
  .header-inner { height: 64px; }
  .logo { font-size: 1.2rem; }
  .logo-img { width: 44px; height: 44px; }
  nav { padding-left: 16px; padding-right: 16px; max-height: calc(100vh - 64px); }

  section { padding: 52px 0; }
  .hero { padding: 104px 0 56px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.05rem; margin-bottom: 28px; }
  .hero .btn { display: block; max-width: 420px; margin: 0 auto; }

  .section-title { font-size: 1.7rem; }
  .section-subtitle { margin-bottom: 32px; }

  .about-content, .contacts-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-text h3 { font-size: 1.5rem; }
  .about-image { height: 200px; font-size: 4rem; order: -1; }
  .about-map { height: 300px; }

  .programs-grid, .features-grid, .steps-grid, .prices-grid, .teachers-grid { gap: 18px; }
  .program-card { padding: 26px 20px; }
  .program-card:hover, .step-card:hover, .price-card:hover { transform: none; }
  .feature-card { padding: 28px 18px; }
  .step-card { padding: 32px 20px 26px; }
  .price-card { padding: 32px 20px; }
  .price-value { font-size: 1.9rem; }
  .teacher-card { padding: 24px 18px; }
  .teacher-photo { width: 150px; height: 150px; }
  .review-card { padding: 24px 20px 20px; flex-basis: 86%; }
  .review-card:hover { transform: none; }
  .reviews-track { gap: 16px; }
  .rev-prev { left: 0; }
  .rev-next { right: 0; }

  .contact-item { word-break: break-word; }
  .form-group input, .form-group select, .form-group textarea { font-size: 16px; padding: 14px; }
  .btn { padding: 14px 24px; }
  footer { padding: 40px 0 28px; }
  .footer-contacts { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 1.7rem; }
  .logo span { font-size: 1.1rem; }
}

/* На сенсорных экранах «наведение» залипает после касания — не двигаем кнопки */
@media (hover: none) {
  .btn:hover { transform: none; }
}

/* ===== Карточка преподавателя ===== */
.teacher-profile {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(44, 62, 80, 0.12);
}
.teacher-profile-photo { position: relative; background: var(--accent); min-height: 100%; }
.teacher-profile-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom; /* если что-то и обрезается — небо сверху, а не ноги */
  display: block;
}
.teacher-profile-info { padding: 44px 44px 40px; text-align: left; }
.teacher-role {
  display: inline-block;
  background: var(--accent); color: #3d8259;
  padding: 6px 16px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  margin-bottom: 16px;
}
.teacher-profile-info h3 { font-size: 2rem; line-height: 1.2; margin-bottom: 22px; }
.teacher-facts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.teacher-fact {
  background: #f8fdf9; border: 1px solid #e3f1e8;
  border-radius: 14px; padding: 12px 16px;
  display: flex; flex-direction: column; line-height: 1.3;
}
.teacher-fact strong { font-size: 1.1rem; color: #4a9b6e; }
.teacher-fact span { font-size: 0.8rem; color: var(--text-light); }
.teacher-about { color: var(--text-light); margin-bottom: 18px; }
.teacher-list-title { font-weight: 700; margin-bottom: 10px; }
.teacher-list { list-style: none; margin-bottom: 22px; }
.teacher-list li { position: relative; padding: 4px 0 4px 32px; color: var(--text-light); }
.teacher-list li::before {
  content: '✓';
  position: absolute; left: 0; top: 5px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #3d8259;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.teacher-quote {
  border-left: 4px solid #4a9b6e;
  padding: 4px 0 4px 16px; margin-bottom: 26px;
  font-style: italic; color: var(--text);
}

@media (max-width: 900px) {
  .teacher-profile { grid-template-columns: 1fr; border-radius: 22px; max-width: 520px; }
  .teacher-profile-photo { min-height: 0; aspect-ratio: 3 / 4; } /* как в самой фотографии: ничего не обрезаем */
  .teacher-profile-info { padding: 28px 22px 28px; }
  .teacher-profile-info h3 { font-size: 1.6rem; }
  .teacher-profile-info .btn { display: block; text-align: center; }
}

/* ===== Первый экран ===== */
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.85);
  border: 1px solid #cfe7d8;
  color: #3d8259;
  padding: 8px 18px; border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(74,155,110,0.12);
}
.hero-accent {
  background: linear-gradient(90deg, #4a9b6e, #2f7a52);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #3d8259;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.hero-actions .btn:not(.btn-primary) { background: #fff; border: 1px solid #cfe7d8; }
.hero-actions .btn:not(.btn-primary):hover { background: #f1faf4; }
.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
.hero-fact {
  background: rgba(255,255,255,0.85);
  border: 1px solid #e0efe6;
  border-radius: 18px;
  padding: 18px 12px;
  box-shadow: 0 8px 24px rgba(44,62,80,0.06);
  display: flex; flex-direction: column; gap: 2px;
}
.hero-fact strong { font-size: 1.6rem; color: #3d8259; line-height: 1.2; }
.hero-fact span { font-size: 0.85rem; color: var(--text-light); }

@media (max-width: 900px) {
  .hero-badge { font-size: 0.8rem; padding: 7px 14px; margin-bottom: 18px; }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 420px; margin: 0 auto 32px; }
  .hero-actions .btn, .hero .hero-actions .btn { display: block; text-align: center; max-width: none; margin: 0; }
  .btn-lg { padding: 15px 24px; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-fact strong { font-size: 1.35rem; }
}

/* ===== Карта: кнопки под ней ===== */
.about-side { display: flex; flex-direction: column; gap: 16px; }
.about-map-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.about-map-actions .btn { flex: 1 1 180px; text-align: center; }

/* ===== Частые вопросы ===== */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: #fff;
  border: 1px solid #e6f2ea;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(44, 62, 80, 0.05);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.faq-item[open] { box-shadow: 0 12px 30px rgba(74, 155, 110, 0.15); border-color: #cfe7d8; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-weight: 600; font-size: 1.05rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #3d8259;
  font-size: 1.3rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}
.faq-item[open] summary::after { content: '−'; background: #4a9b6e; color: #fff; }
.faq-answer { padding: 0 24px 22px; color: var(--text-light); }

@media (max-width: 900px) {
  .about-map-actions .btn { flex-basis: 100%; }
  .faq-item summary { padding: 16px 52px 16px 18px; font-size: 1rem; }
  .faq-answer { padding: 0 18px 18px; }
}

/* ===== Новости ===== */
.news-section { background: #f8fdf9; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.news-card {
  background: #fff; border: 1px solid #e6f2ea; border-radius: 20px;
  padding: 28px; box-shadow: 0 8px 24px rgba(44,62,80,0.06);
}
.news-date { display: inline-block; font-size: 0.85rem; color: #3d8259; font-weight: 600; margin-bottom: 10px; }
.news-card h3 { margin-bottom: 10px; }
.news-card p { color: var(--text-light); }
.news-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 40px 20px;
  background: #fff; border: 1px dashed #cfe7d8; border-radius: 20px;
  color: var(--text-light);
}
.news-empty span { font-size: 2.4rem; display: block; margin-bottom: 8px; }

/* ===== Выпадающий пункт меню «Ещё» ===== */
.nav-dropdown { position: relative; }
.nav-drop-btn {
  background: none; border: none; cursor: pointer;
  font: inherit; font-weight: 500; color: var(--text);
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; transition: color 0.3s;
}
.nav-drop-btn:hover, .nav-dropdown:hover .nav-drop-btn { color: #4a9b6e; }
.caret { font-size: 0.95rem; line-height: 1; transition: transform 0.25s; }
.nav-dropdown:hover .caret, .nav-dropdown.open .caret { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translate(-50%, 6px);
  min-width: 220px;
  background: #fff; border-radius: 16px; padding: 8px;
  box-shadow: 0 16px 40px rgba(44, 62, 80, 0.15);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1100;
}
/* «мостик», чтобы меню не закрывалось, пока мышь идёт от кнопки к списку */
.nav-drop-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-drop-menu a { display: block; padding: 11px 16px; border-radius: 10px; }
.nav-drop-menu a:hover { background: var(--accent); color: var(--text); }
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu,
.nav-dropdown.open .nav-drop-menu {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}

/* В бургер-меню: список раскрывается под пунктом по нажатию */
@media (max-width: 1100px) {
  .nav-dropdown { width: 100%; border-bottom: 1px solid #eef5f0; }
  .nav-drop-btn { width: 100%; justify-content: space-between; padding: 14px 4px; font-size: 1.05rem; }
  .nav-drop-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    min-width: 0; box-shadow: none; background: #f8fdf9;
    padding: 0; border-radius: 12px; margin-bottom: 10px;
    display: none;
  }
  .nav-drop-menu::before { display: none; }
  .nav-dropdown:hover .nav-drop-menu, .nav-dropdown:focus-within .nav-drop-menu { transform: none; }
  .nav-dropdown.open .nav-drop-menu { display: block; transform: none; }
  .nav-drop-menu a { padding: 13px 16px; border-bottom: 1px solid #eef5f0; }
  .nav-drop-menu a:last-child { border-bottom: none; }
}

.news-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.news-meta .news-date { margin-bottom: 0; }
.news-badge { background: #fff3cd; color: #8a6d00; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.4px; }
.news-source { align-self: flex-start; display: inline-block; margin-top: 14px; font-size: 0.85rem; color: #3d8259; text-decoration: none; border-bottom: 1px dashed #3d8259; }
.news-source:hover { color: #2f7a52; }
.news-card { display: flex; flex-direction: column; }
.news-card p { flex: 1; white-space: pre-line; }

/* ===== Анимированные иконки контактов ===== */
footer .contact-item { align-items: center; gap: 14px; cursor: default; }
footer .contact-item > span {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
footer .contact-item:hover > span,
footer .contact-item.active > span {
  background: rgba(217, 238, 223, 0.25);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  animation: contactPop 0.7s ease-in-out infinite alternate;
}
/* у каждой иконки своё движение */
footer .contact-item:nth-child(1):hover > span, footer .contact-item:nth-child(1).active > span { animation-name: iconBounce; }   /* адрес */
footer .contact-item:nth-child(2):hover > span, footer .contact-item:nth-child(2).active > span { animation-name: iconRing; }     /* телефон */
footer .contact-item:nth-child(3):hover > span, footer .contact-item:nth-child(3).active > span { animation-name: iconFly; }      /* Telegram */
footer .contact-item:nth-child(4):hover > span, footer .contact-item:nth-child(4).active > span { animation-name: contactPop; }   /* WhatsApp */
footer .contact-item:nth-child(5):hover > span, footer .contact-item:nth-child(5).active > span { animation-name: contactPop; }   /* ВКонтакте */
footer .contact-item:nth-child(6):hover > span, footer .contact-item:nth-child(6).active > span { animation-name: iconSpin; animation-duration: 1.2s; animation-timing-function: linear; animation-direction: normal; } /* часы */

@keyframes contactPop  { 0% { transform: scale(1); } 100% { transform: scale(1.18) rotate(-6deg); } }
@keyframes iconBounce  { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
@keyframes iconRing    { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-18deg); } 40% { transform: rotate(16deg); } 60% { transform: rotate(-12deg); } 80% { transform: rotate(8deg); } }
@keyframes iconFly     { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(4px,-4px) scale(1.15); } }
@keyframes iconSpin    { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

/* Кнопки с иконками под картой и в первом экране */
.about-map-actions .btn:hover, .hero-actions .btn:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  footer .contact-item:hover > span, footer .contact-item.active > span { animation: none; }
}

/* Математические знаки на первом экране: заметнее и слегка «плавают» */
@keyframes mathFloat {
  0%   { translate: 0 0; }
  100% { translate: 0 -16px; }
}
.hero-d2 { animation-duration: 9s; animation-delay: -2s; }
.hero-d3 { animation-duration: 8s; animation-delay: -4s; }
.hero-d4 { animation-duration: 10s; animation-delay: -1s; }
.hero-d5 { animation-duration: 6s; animation-delay: -3s; }
.hero-d6 { animation-duration: 8.5s; animation-delay: -5s; }
@media (prefers-reduced-motion: reduce) { .hero-math-decor { animation: none; } }

/* ===== Математические знаки по всему сайту ===== */
section:not(.hero), .page-hero { position: relative; overflow: hidden; }
section:not(.hero) > .container { position: relative; z-index: 1; }
.sec-math {
  position: absolute; z-index: 0;
  font-family: 'Times New Roman', serif; font-weight: 700;
  font-size: 4.5rem; line-height: 1;
  color: #4a9b6e; opacity: 0.2;
  pointer-events: none; user-select: none;
  animation: mathFloat 8s ease-in-out infinite alternate;
}
@media (max-width: 900px) {
  .sec-math { font-size: 3rem; opacity: 0.17; }
}
@media (prefers-reduced-motion: reduce) { .sec-math { animation: none; } }
