: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.25;
  animation: mathFloat 6s ease-in-out infinite;
  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; /* Оставляем 700, это стандартная жирность для h2 */
  color: #263f35; /* Темный цвет, как в "Наши программы" */
  letter-spacing: -0.5px;
}

.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: 48px;
  align-items: center;
}

.about-text {
  background: #ffffff;
  padding: 32px;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(35, 75, 55, 0.06);
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-light);
  line-height: 1.8;
}

.about-text p:last-child {
  margin-bottom: 0;
}
.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; }

/* ============================================
   БЛОК "ПОЧЕМУ ВЫБИРАЮТ" (НОВЫЙ ДИЗАЙН)
   ============================================ */

.why-choose-section {
  background: linear-gradient(135deg, #f0f9f4 0%, #e6f4ea 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.why-choose-header {
  text-align: center;
  margin-bottom: 50px;
}

/* Заголовок как на 3-м фото (крупный, темно-зеленый) */
.why-choose-header .section-title {
  margin-bottom: 16px;
}

.why-choose-header .section-subtitle {
  font-size: 1.15rem;
  color: #5a6a7a;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Сетка 3 колонки */
.why-choose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Карточка */
.why-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px; /* Чуть больше отступа между иконкой и текстом */
  box-shadow: 0 10px 30px rgba(44, 62, 80, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
  min-height: 170px; /* Задаем высоту, чтобы иконка не сжималась */
}

.why-card-icon {
  flex: 0 0 150px; /* Увеличили до 150px (было 120) */
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Картинка вписывается в квадрат 150х150 */
  display: block;
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ НОВОГО БЛОКА
   ============================================ */

@media (max-width: 1024px) {
  .why-choose-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .why-choose-section {
    padding: 50px 0;
  }
  
  .why-choose-header .section-title {
    font-size: 2rem;
  }

  .why-choose-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .why-card {
    padding: 20px;
    gap: 16px;
  }

  /* На телефоне иконки 80px (чтобы текст не сжимался) */
  .why-card-icon {
    flex: 0 0 80px;
    height: 80px;
  }

  .why-card-text h3 {
    font-size: 1.05rem;
  }

  .why-card-text p {
    font-size: 0.9rem;
  }
}

/* ============================================
   ИСПРАВЛЕНИЕ БЛОКА КОНТАКТОВ НА МОБИЛЬНЫХ (ФОТО 1)
   ============================================ */

@media (max-width: 768px) {
  .about-contact-card {
    flex-direction: column;
    gap: 24px;
  }

  .about-contact-info {
    width: 100%;
    padding: 0;
  }

  .about-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  /* Фиксируем иконку, чтобы текст не сжимался в узкую колонку */
  .about-contact-icon {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
  }

  .about-contact-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .about-contact-item > div {
    flex: 1;
  }

  .about-contact-item h3 {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .about-contact-item a {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
  }

  /* Блок с адресом */
  .about-address-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
  }

  .about-address-icon {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
  }

  .about-address-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .about-address-text {
    flex: 1;
  }

  .about-address-text span {
    font-size: 0.8rem;
    color: #5a6a7a;
    display: block;
    margin-bottom: 4px;
  }

  .about-address-text strong {
    font-size: 1rem;
    line-height: 1.4;
    display: block;
  }

  /* Кнопка "Построить маршрут" */
  .about-route-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 20px;
  }

  /* Карта */
  .about-map {
    width: 100%;
    height: 250px;
    border-radius: 16px;
  }
}
@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% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(15deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
.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; } }


/* ============================================
   КАБИНЕТ УЧЕНИКА — СПИСОК ЗАНЯТИЙ
   ============================================ */

.cabinet-hello {
  margin-bottom: 36px;
}

.cabinet-hello h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px 0;
}

.cabinet-hello-sub {
  color: var(--text-light);
  font-size: 1.05rem;
  margin: 0;
}

.cabinet-empty {
  background: #fff;
  border: 1px dashed #cfe7d8;
  border-radius: 20px;
  padding: 48px 28px;
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
}

.cabinet-month {
  margin-bottom: 32px;
}

.cabinet-month-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #4a9b6e;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.cabinet-lessons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cabinet-lesson {
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.06);
  border-left: 4px solid #4a9b6e;
  transition: box-shadow 0.2s ease;
}

.cabinet-lesson:hover {
  box-shadow: 0 8px 24px rgba(74, 155, 110, 0.12);
}

.cabinet-lesson-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.cabinet-lesson-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cabinet-lesson-day {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.cabinet-lesson-weekday {
  color: var(--text-light);
  font-size: 0.9rem;
}

.cabinet-lesson-hw {
  background: #f8fdf9;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.cabinet-lesson-hw-title {
  font-size: 0.85rem;
  color: #5a6a7a;
  font-weight: 600;
  margin-bottom: 6px;
}

.cabinet-lesson-hw-text {
  white-space: pre-wrap;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cabinet-lesson-files {
  margin-top: 4px;
}

.cabinet-lesson-files-title {
  font-size: 0.85rem;
  color: #5a6a7a;
  font-weight: 600;
  margin-bottom: 8px;
}

.cabinet-files-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cabinet-file {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fdf9;
  border-radius: 10px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

.cabinet-file-icon {
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.cabinet-file-name {
  flex: 1;
  min-width: 140px;
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-word;
}

.cabinet-file-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cabinet-btn-view,
.cabinet-btn-download {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.cabinet-btn-view {
  background: #d4edda;
  color: #155724;
}

.cabinet-btn-view:hover {
  background: #b8dfc5;
  transform: translateY(-1px);
}

.cabinet-btn-download {
  background: #cfe2ff;
  color: #084298;
}

.cabinet-btn-download:hover {
  background: #b6d4fe;
  transform: translateY(-1px);
}

.cabinet-refresh-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0f8f3;
  color: #5a6a7a;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 50px;
  margin-top: 12px;
  font-weight: 500;
}

.cabinet-refresh-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a9b6e;
  animation: cabinetPulse 2s ease-in-out infinite;
}

@keyframes cabinetPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 700px) {
  .cabinet-hello h1 {
    font-size: 1.5rem;
  }

  .cabinet-lesson {
    padding: 16px 16px;
  }

  .cabinet-lesson-day {
    font-size: 1rem;
  }

  .cabinet-file {
    align-items: flex-start;
  }

  .cabinet-file-actions {
    width: 100%;
  }

  .cabinet-btn-view,
  .cabinet-btn-download {
    flex: 1;
    text-align: center;
  }
}

/* === СТРАНИЦА ВХОДА В КАБИНЕТ === */

.cabinet-login-page {
  background: linear-gradient(135deg, #f8fdf9 0%, var(--accent) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 0;
}
.cabinet-back-link {
  display: inline-block;
  color: #4a9b6e;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: background 0.2s;
}
.cabinet-back-link:hover { background: #eaf5ee; }
.cabinet-login-box {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid #eef5f0;
  padding: 44px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.cabinet-login-box h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
}

.cabinet-login-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0 0 30px 0;
}

.cabinet-error {
  background: #fdecec;
  color: #b64545;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-align: left;
}

.cabinet-login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.cabinet-login-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
}

.cabinet-login-form input {
  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;
}

.cabinet-login-form input:focus {
  border-color: #4a9b6e;
}

.cabinet-login-form button {
  width: 100%;
  background: #4a9b6e;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  margin-top: 6px;
  font-family: inherit;
}

.cabinet-login-form button:hover {
  background: #3d8259;
  transform: translateY(-2px);
}
.cabinet-login-back {
  margin-top: 16px;
  text-align: center;
}
.cabinet-login-back a {
  color: #5a6a7a;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.cabinet-login-back a:hover {
  color: #4a9b6e;
}
.cabinet-login-hint {
  margin: 24px 0 0 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

@media (max-width: 900px) {
  .cabinet-login-box {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .cabinet-login-box h1 {
    font-size: 1.4rem;
  }
}


/* === ШАПКА КАБИНЕТА === */

.cabinet-page {
  background: #f8fdf9;
  min-height: 100vh;
}

.cabinet-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef5f0;
  padding: 16px 24px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
}

.cabinet-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cabinet-logo {
  font-weight: 700;
  font-size: 1.3rem;
  color: #4a9b6e;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cabinet-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.cabinet-user {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.cabinet-user-name {
  font-weight: 600;
  color: var(--text);
}

.cabinet-user-grade {
  color: var(--text-light);
  font-size: 0.9rem;
}

.cabinet-nav {
  margin-left: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  /* сброс общего мобильного правила для nav (выпадающее меню основного сайта) */
  position: static;
  width: auto;
  max-height: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.cabinet-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.cabinet-nav a:hover {
  color: #4a9b6e;
}

.cabinet-logout-form {
  margin: 0;
}

.cabinet-logout-form button {
  background: var(--accent);
  color: var(--text);
  border: none;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  font-family: inherit;
}

.cabinet-logout-form button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.cabinet-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 24px 48px;
}

@media (max-width: 900px) {
  /* Шапка в потоке страницы: на телефоне она в 2-3 строки и не должна перекрывать контент */
  .cabinet-header {
    position: sticky;
    padding: 10px 16px;
  }

  .cabinet-header-inner {
    gap: 6px 12px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .cabinet-logo {
    font-size: 1.15rem;
  }

  .cabinet-user {
    flex-wrap: wrap;
    gap: 2px 8px;
    min-width: 0;
  }

  .cabinet-nav {
    flex: 1 1 100%;
    margin-left: 0;
    gap: 10px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .cabinet-nav a {
    font-size: 0.9rem;
  }

  .cabinet-logout-form button {
    padding: 6px 14px;
  }

  .cabinet-main {
    padding: 16px 16px 32px;
  }
}

/* === СТРАНИЦА СМЕНЫ ПАРОЛЯ УЧЕНИКА === */

.cabinet-password-box {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 4px 20px rgba(44, 62, 80, 0.06);
  border: 1px solid #eef5f0;
  max-width: 520px;
  margin: 0 auto;
}

.cabinet-password-box h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
}

.cabinet-password-sub {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0 0 26px 0;
}

.cabinet-success {
  background: #d4edda;
  color: #1a5a37;
  border: 1px solid #c3e6cb;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.cabinet-password-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cabinet-password-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
}

.cabinet-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cabinet-pw-wrap input {
  width: 100%;
  padding: 14px 52px 14px 18px;
  border: 1px solid #dfeae4;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

.cabinet-pw-wrap input:focus {
  border-color: #4a9b6e;
}

.cabinet-pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a6a7a;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
  padding: 0;
}

.cabinet-pw-toggle:hover {
  background: #f0f8f3;
  color: #4a9b6e;
}

.cabinet-pw-toggle.active {
  color: #4a9b6e;
}

.cabinet-password-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.cabinet-btn-save {
  flex: 1;
  background: #4a9b6e;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  font-family: inherit;
  min-width: 160px;
}

.cabinet-btn-save:hover {
  background: #3d8259;
  transform: translateY(-2px);
}

.cabinet-btn-cancel {
  flex: 0 0 auto;
  background: #e9ecef;
  color: #495057;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  font-family: inherit;
  min-width: 120px;
}

.cabinet-btn-cancel:hover {
  background: #dee2e6;
}

@media (max-width: 700px) {
  .cabinet-password-box {
    padding: 24px 18px;
  }

  .cabinet-password-box h1 {
    font-size: 1.35rem;
  }

  .cabinet-btn-save,
  .cabinet-btn-cancel {
    flex: 1 1 100%;
  }
}

/* === ГЛАЗОК ДЛЯ ПАРОЛЯ — переопределение === */

.cabinet-login-form .cabinet-pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  color: #5a6a7a !important;
  border: none !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 10px !important;
  font-size: 1.2rem !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
  min-width: auto !important;
}

.cabinet-login-form .cabinet-pw-toggle:hover {
  background: #f0f8f3 !important;
  color: #4a9b6e !important;
  transform: translateY(-50%) !important;
}

.cabinet-login-form .cabinet-pw-toggle.active {
  color: #4a9b6e !important;
}

/* === Сворачивание файлов в кабинете === */

.cabinet-files-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0f8f3;
  color: #3d8259;
  border: 1px solid #cfe7d8;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 4px;
}

.cabinet-files-toggle:hover {
  background: #e3f1e8;
  border-color: #b8dfc5;
}

.cabinet-files-toggle.open {
  background: #d4edda;
  border-color: #b8dfc5;
  color: #155724;
}

.cabinet-files-toggle-icon {
  font-size: 1rem;
}

.cabinet-files-toggle-caret {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.25s;
  display: inline-block;
}

.cabinet-files-toggle.open .cabinet-files-toggle-caret {
  transform: rotate(180deg);
}

.cabinet-files-list.collapsed {
  display: none;
}
/* === Кнопка "Наверх" === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #4a9b6e;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(74, 155, 110, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #3d8259;
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* Растягиваем контакты по ширине нижней линии */
.footer-contacts {
    width: 100%;
    max-width: 1160px;
    margin: 32px auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 55px;
    row-gap: 28px;
    box-sizing: border-box;
}

/* Выравниваем элементы */
.contact-item {
    display: flex;
    align-items: flex-start;
    min-width: 0;
}

/* Адаптация для планшетов */
@media (max-width: 900px) {
    .footer-contacts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 30px;
    }
}

/* Адаптация для телефонов */
@media (max-width: 600px) {
    .footer-contacts {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 0 15px;
    }
}
 
/* =====================================
   НОВЫЙ ДИЗАЙН ПОДВАЛА СТУДИИ ЗВОНОК
===================================== */

.zv-footer {
    background: #2c4053;
    color: #fff;
    padding: 55px 20px 25px;
    text-align: center;
    box-sizing: border-box;
}

.zv-footer-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
}

.zv-footer-brand {
    margin-bottom: 40px;
}

.zv-footer-title {
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #fff;
}

.zv-footer-tagline {
    color: #c5d0da;
    font-size: 15px;
    margin: 0;
}

.zv-footer-heading {
    text-align: center;
    font-size: 21px;
    margin: 0 0 28px;
    color: #f5d77b;
}

/* Сетка карточек */

.zv-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    text-align: left;
}

/* Карточки контактов */

.zv-contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    min-height: 105px;
    padding: 18px;
    box-sizing: border-box;

    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;

    transition: background 0.25s, border-color 0.25s,
                transform 0.25s;
}

.zv-contact-card:hover {
    background: rgba(255,255,255,0.11);
    border-color: rgba(245,215,123,0.4);
    transform: translateY(-3px);
}

/* Иконки */

.zv-contact-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(255,255,255,0.12);
    font-size: 21px;
}

/* Текст */

.zv-contact-card strong {
    display: block;
    font-size: 15px;
    margin-bottom: 7px;
    color: #fff;
}

.zv-contact-card p {
    color: #f0f3f6;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 3px;
}

.zv-contact-card small {
    display: block;
    color: #b9c5d0;
    font-size: 12px;
    margin-top: 4px;
}

.zv-contact-card a {
    color: #f0f3f6;
    font-size: 14px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.zv-contact-card a:hover {
    color: #f5d77b;
}

/* Нижняя линия */

.zv-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.13);
    margin-top: 38px;
    padding-top: 25px;
    color: #b9c5d0;
    font-size: 13px;
}

/* Планшеты */

@media (max-width: 900px) {
    .zv-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

/* Телефоны */

@media (max-width: 600px) {
    .zv-footer {
        padding: 38px 15px 20px;
    }

    .zv-footer-title {
        font-size: 18px;
    }

    .zv-footer-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .zv-contact-card {
        min-height: 85px;
        padding: 15px;
    }

    .zv-footer-bottom {
        margin-top: 28px;
        font-size: 12px;
        line-height: 1.6;
    }
}

/* Лёгкий мятный дизайн карточек контактов */

.zv-footer {
    background: #D9EEDF;
    color: #29483B;
}

.zv-footer-title {
    color: #29483B;
}

.zv-footer-tagline {
    color: #60796B;
}

.zv-footer-heading {
    color: #426B55;
}

.zv-contact-card {
    background: rgba(255, 255, 255, 0.48);
    border: none;
    border-radius: 18px;
    box-shadow: 0 3px 14px rgba(56, 100, 72, 0.06);
    transition: background 0.25s, box-shadow 0.25s;
}

.zv-contact-card:hover {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    transform: none;
    box-shadow: 0 5px 18px rgba(56, 100, 72, 0.1);
}

.zv-contact-icon {
    width: 28px;
    height: 28px;
    background: transparent;
    font-size: 20px;
}

.zv-contact-card strong {
    color: #29483B;
}

.zv-contact-card p,
.zv-contact-card a {
    color: #496357;
}

.zv-contact-card small {
    color: #718879;
}

.zv-contact-card a:hover {
    color: #397B55;
}

.zv-footer-bottom {
    border-top: 1px solid rgba(56, 100, 72, 0.13);
    color: #718879;
}

/* Новый лёгкий дизайн подвала в стиле сайта */

.zv-footer {
    background: #ffffff;
    color: #304256;
    padding: 55px 20px 25px;
}

.zv-footer-title {
    color: #304256;
}

.zv-footer-tagline {
    color: #718096;
}

.zv-footer-heading {
    color: #304256;
}

/* Карточки контактов */
.zv-contact-card {
    background: #f6fbf7;
    border: 1px solid #edf5ef;
    border-radius: 20px;
    box-shadow: none;
    min-height: 115px;
    padding: 20px;
    transition: background 0.25s, transform 0.25s;
}

.zv-contact-card:hover {
    background: #eff8f1;
    border-color: #edf5ef;
    transform: translateY(-2px);
    box-shadow: none;
}

/* Небольшие круглые иконки */
.zv-contact-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #d9eedf;
    font-size: 19px;
}

/* Текст */
.zv-contact-card strong {
    color: #304256;
}

.zv-contact-card p,
.zv-contact-card a {
    color: #526579;
}

.zv-contact-card small {
    color: #7b8b9b;
}

.zv-contact-card a:hover {
    color: #499c70;
}

/* Нижняя линия */
.zv-footer-bottom {
    border-top: 1px solid #edf3ef;
    color: #718096;
}
/* Математический декор подвала */
.zv-footer {
    position: relative;
    overflow: hidden;
}

.zv-footer-container {
    position: relative;
    z-index: 1;
}

.zv-footer-math-1 { top: 12%; left: 5%; }
.zv-footer-math-2 { top: 35%; right: 7%; animation-delay: -2s; }
.zv-footer-math-3 { bottom: 18%; left: 12%; animation-delay: -4s; }
.zv-footer-math-4 { bottom: 12%; right: 15%; animation-delay: -3s; }
.zv-footer-math-5 { top: 55%; left: 48%; animation-delay: -5s; }

@media (max-width: 600px) {
    .zv-footer-math-5 {
        display: none;
    }
}
/* ==================================
   НОВЫЙ ПЕРВЫЙ ЭКРАН — ЗВОНОК
================================== */

.hero-new {
  padding: 145px 0 55px;
  min-height: 650px;
  background: linear-gradient(135deg, #f8fdf9 0%, #e2f4e8 100%);
  text-align: left;
  overflow: hidden;
}

.hero-new .hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 35px;
  position: relative;
  z-index: 2;
}

.hero-new .hero-content {
  max-width: 620px;
}

.hero-new h1 {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  line-height: 1.12;
  color: #203b52;
  margin: 24px 0;
}

.hero-new .hero-accent {
  color: #4a9b6e;
}

.hero-new .hero-content > p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #5a6a7a;
  max-width: 550px;
  margin-bottom: 28px;
}

.hero-new .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 35px;
}

.hero-new .hero-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hero-new .hero-fact {
  background: rgba(255,255,255,0.8);
  padding: 15px 10px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 5px 18px rgba(44,62,80,0.05);
}

.hero-new .hero-fact strong {
  display: block;
  color: #4a9b6e;
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.hero-new .hero-fact span {
  font-size: 0.78rem;
  color: #5a6a7a;
}

.hero-new .hero-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.hero-new .hero-boy-image {
  display: block;
  width: 100%;
  max-width: 570px;
  height: auto;
  object-fit: contain;
  border-radius: 28px;
  filter: drop-shadow(0 18px 28px rgba(44,62,80,0.10));
}

/* Телефоны и планшеты */
@media (max-width: 900px) {
  .hero-new {
    padding: 125px 0 45px;
  }

  .hero-new .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 25px;
  }

  .hero-new .hero-content {
    margin: 0 auto;
  }

  .hero-new .hero-content > p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-new .hero-actions {
    justify-content: center;
  }

  .hero-new .hero-image-wrap {
    grid-row: 2;
  }

  .hero-new .hero-boy-image {
    max-width: 480px;
  }
}

@media (max-width: 520px) {
  .hero-new .hero-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-new h1 {
    font-size: 2.35rem;
  }

  .hero-new .hero-actions {
    flex-direction: column;
  }

  .hero-new .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
/* Карточки преимуществ на всю ширину первого экрана */
.hero-new .hero-facts {
  width: 100%;
  max-width: none;
  margin: 35px 0 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 520px) {
  .hero-new .hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Современное оформление раздела «О студии» */
.about-section {
  padding: 80px 0;
  background: #ffffff;
}

.about-section .section-title {
  color: #244b3a;
  margin-bottom: 14px;
}

.about-section .section-subtitle {
  max-width: 760px;
  margin: 0 auto 45px;
}

.about-section .about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
  align-items: center;
}

.about-section .about-text {
  background: #f4faf5;
  padding: 35px;
  border-radius: 24px;
  border: 1px solid #e2f0e5;
}

.about-section .about-text h3 {
  color: #347a53;
  font-size: 1.7rem;
  margin-bottom: 20px;
}

.about-section .about-text p {
  color: #53665b;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-section .about-map {
  height: 340px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(35, 90, 57, 0.12);
}

.about-section .about-map-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .about-section .about-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .about-section .about-text {
    padding: 25px;
  }

  .about-section .about-map {
    height: 280px;
  }
}

@media (max-width: 520px) {
  .about-section {
    padding: 55px 0;
  }

  .about-section .about-text {
    padding: 22px;
  }

  .about-section .about-map-actions a {
    width: 100%;
    text-align: center;
  }
}
/* Обновлённое оформление блока «О студии» */
.about-section {
  padding: 80px 0;
  background: #ffffff;
}

.about-section .section-subtitle {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.about-section .about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: center;
}

.about-section .about-text {
  padding: 32px;
  background: #f2faf5;
  border: 1px solid #e1f1e6;
  border-radius: 24px;
}

.about-section .about-text h3 {
  margin-bottom: 22px;
  color: #183b32;
  font-size: 1.8rem;
}

.about-section .about-text p {
  color: #53665d;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-section .about-side {
  min-width: 0;
}

.about-section .about-map {
  height: 340px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(35, 80, 55, 0.12);
}

.about-section .about-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .about-section .about-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-section .about-text {
    padding: 24px;
  }

  .about-section .about-map {
    height: 300px;
  }
}

@media (max-width: 520px) {
  .about-section {
    padding: 55px 0;
  }

  .about-section .about-map-actions {
    flex-direction: column;
  }

  .about-section .about-map-actions .btn {
    width: 100%;
    text-align: center;
  }
}
/* Новое оформление раздела «Наши программы» */
#programs {
  padding: 80px 0;
  background: #f2faf5 !important;
}

#programs .section-title {
  color: #263f35;
  margin-bottom: 16px;
}

#programs .section-subtitle {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

#programs .programs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

#programs .program-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px 24px;
  background: #ffffff;
  border: 1px solid #dceee2;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(35, 80, 55, 0.08);
  transition: transform 0.25s, box-shadow 0.25s;
}

#programs .program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(35, 80, 55, 0.13);
}

#programs .program-card h3 {
  color: #438b63;
  font-size: 1.35rem;
  margin-bottom: 14px;
}

#programs .program-card p {
  color: #5a6a7a;
  line-height: 1.65;
  flex-grow: 1;
}

#programs .program-card .btn {
  margin-top: 20px;
  border-radius: 30px;
  padding: 12px 24px;
}

@media (max-width: 1000px) {
  #programs .programs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  #programs {
    padding: 55px 0;
  }

  #programs .programs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #programs .program-card {
    padding: 26px 22px;
  }
}

/* ===== Новое оформление блока «О студии» ===== */

.about-section {
  position: relative;
  padding: 80px 0;
  background: #f2faf5;
  overflow: hidden;
}

.about-section .section-title {
  color: #286344;
  margin-bottom: 16px;
}

.about-section .section-subtitle {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
  line-height: 1.6;
  color: #5a6a7a;
}

/* ============================================
   ГЛАВНАЯ КАРТОЧКА (СЕТКА)
   ============================================ */
.about-contact-card {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* Левая часть уже, правая (карта) шире */
  grid-template-areas:
    "info bottom"
    "route bottom";
  gap: 30px 40px;
  margin-top: 28px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e1f1e6;
  border-radius: 30px;
  box-shadow: 0 12px 35px rgba(35, 80, 55, 0.08);
}

/* ============================================
   ВЕРХНЯЯ ЧАСТЬ: КОНТАКТЫ В СТРОКУ
   ============================================ */
.about-contact-info {
  grid-area: info;
  display: flex;
  flex-direction: row; /* Телефон и адрес в строку */
  gap: 30px;
  align-items: flex-start;
  width: 100%;
}

.about-contact-item,
.about-address-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

/* Иконки */
.about-contact-icon,
.about-address-icon {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.about-contact-icon img,
.about-address-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

/* Текст контактов */
.about-contact-item h3,
.about-address-text span {
  margin: 0 0 6px 0;
  font-size: 1rem;
  font-weight: 700;
  color: #203b50;
  text-transform: none;
  display: block;
}

.about-contact-item a,
.about-address-text strong {
  font-size: 1rem;
  font-weight: 600;
  color: #203b50;
  line-height: 1.4;
  text-decoration: none;
  display: block;
}

/* Кнопка маршрута */
.about-route-wrap {
  grid-area: route;
  margin-top: 10px;
}

.about-route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  color: #39875c !important;
  background: #fff !important;
  border: 1.5px solid #39875c !important;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.about-route-link:hover {
  color: #fff !important;
  background: #39875c !important;
}

/* ============================================
   НИЖНЯЯ ЧАСТЬ: УЛИЦА И КАРТА
   ============================================ */
.about-contact-bottom {
  grid-area: bottom;
  display: flex;
  flex-direction: row;
  gap: 20px;
  height: 100%;
  min-height: 350px;
}

/* Улица (мальчик) — узкая */
.about-street-scene {
  flex: 0 0 35%; /* Занимает 35% ширины */
  height: 100%;
  min-height: 300px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.about-street-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Карта — большая */
.about-map {
  flex: 1; /* Занимает всё оставшееся место */
  height: 100%;
  min-height: 300px;
  border-radius: 24px;
  overflow: hidden;
}

.about-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ============================================
   МАЛЬЧИК (ВИДЕО)
   ============================================ */
.about-walking-boy {
  position: absolute;
  bottom: 0;
  left: -20%;
  height: 30%; /* Уменьшили */
  width: auto;
  animation: walk-across 20s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes walk-across {
  0% { left: -20%; transform: scaleX(1); }
  48% { left: 100%; transform: scaleX(1); }
  50% { left: 100%; transform: scaleX(-1); }
  98% { left: -20%; transform: scaleX(-1); }
  100% { left: -20%; transform: scaleX(1); }
}

/* ============================================
   АДАПТИВ
   ============================================ */
@media (max-width: 900px) {
  .about-contact-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "route"
      "bottom";
    gap: 20px;
    padding: 28px;
  }

  .about-contact-info {
    flex-direction: column; /* На планшетах контакты в столбик */
    gap: 20px;
  }

  .about-contact-bottom {
    flex-direction: column;
    min-height: auto;
  }

  .about-street-scene {
    flex: none;
    width: 100%;
    height: 250px;
    min-height: 250px;
  }

  .about-map {
    width: 100%;
    height: 250px;
    min-height: 250px;
  }
}

@media (max-width: 520px) {
  .about-contact-card {
    padding: 20px;
    border-radius: 22px;
  }
  
  .about-walking-boy {
    height: 25%; /* Ещё меньше на телефонах */
  }
}
/* ===== Карточки программ обучения ===== */

.programs-section {
  position: relative;
  padding: 80px 0;
  background: #f2faf5;
  overflow: hidden;
}

.programs-section .section-title {
  color: #263f35;
  margin-bottom: 16px;
}

.programs-section .section-subtitle {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.programs-section .programs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.programs-section .program-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 18px 20px 24px;
  background: #fff;
  border: 1px solid #deeee3;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(35, 80, 55, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}

.programs-section .program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(35, 80, 55, .13);
}

.program-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 150px;
  margin-bottom: 20px;
  border-radius: 18px;
  overflow: hidden;
}

.program-card-56 .program-visual { background: #e8f6ed; }
.program-card-78 .program-visual { background: #edf1fc; }
.program-card-9 .program-visual { background: #fff3e5; }
.program-card-1011 .program-visual { background: #f1eefa; }

.program-visual-symbol {
  position: absolute;
  color: rgba(48, 91, 68, .2);
  font-weight: 700;
  font-size: 25px;
}

.symbol-a { top: 14px; left: 18px; }
.symbol-b { right: 20px; bottom: 12px; }

.program-illustration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 115px;
}

/* 5–6 класс */

.illustration-56 .number {
  position: absolute;
  display: grid;
  place-items: center;
  width: 49px;
  height: 55px;
  border-radius: 13px;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(40, 80, 55, .12);
}

.number-one {
  background: #6dbb8b;
  left: 3px;
  top: 30px;
  transform: rotate(-12deg);
}

.number-two {
  background: #f1b96d;
  left: 42px;
  top: 10px;
  transform: rotate(5deg);
}

.number-three {
  background: #7b9edb;
  right: 0;
  top: 35px;
  transform: rotate(12deg);
}

.illustration-spark {
  position: absolute;
  top: 0;
  right: 10px;
  color: #e7a64f;
  font-size: 23px;
}

/* 7–8 класс */

.geo-circle {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 7px solid #7596d5;
  border-radius: 50%;
  left: 4px;
  top: 23px;
}

.geo-triangle {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 39px solid transparent;
  border-right: 39px solid transparent;
  border-bottom: 72px solid #e7a96b;
  right: 0;
  top: 18px;
}

.geo-triangle::after {
  content: "";
  position: absolute;
  left: -29px;
  top: 13px;
  width: 0;
  height: 0;
  border-left: 29px solid transparent;
  border-right: 29px solid transparent;
  border-bottom: 53px solid #edf1fc;
}

.geo-square {
  position: absolute;
  width: 27px;
  height: 27px;
  background: #79bd98;
  left: 52px;
  bottom: 0;
  transform: rotate(20deg);
  border-radius: 5px;
}

.geo-dot {
  position: absolute;
  right: 4px;
  bottom: 0;
  color: #e5a75e;
  font-size: 22px;
}

/* 9 класс */

.exam-sheet {
  position: relative;
  width: 78px;
  height: 96px;
  padding: 22px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(100, 75, 40, .12);
  transform: rotate(-7deg);
}

.exam-line {
  display: block;
  width: 45px;
  height: 5px;
  margin-bottom: 10px;
  background: #d9e5dc;
  border-radius: 5px;
}

.exam-line-long { width: 53px; }
.exam-line-short { width: 32px; }

.exam-check {
  position: absolute;
  right: -16px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: #fff;
  background: #73b98b;
  border: 4px solid #fff3e5;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
}

.exam-star {
  position: absolute;
  right: 5px;
  top: 5px;
  color: #e9ac61;
  font-size: 25px;
}

/* 10–11 класс */

.formula-main {
  position: absolute;
  color: #7764b5;
  font-size: 55px;
  font-weight: 800;
  z-index: 2;
}

.formula-small {
  position: absolute;
  right: 0;
  bottom: 12px;
  color: #d59b61;
  font-size: 19px;
  font-weight: 700;
  transform: rotate(-8deg);
}

.formula-orbit {
  position: absolute;
  width: 105px;
  height: 48px;
  border: 3px solid #9d8bcf;
  border-radius: 50%;
}

.orbit-one { transform: rotate(35deg); }
.orbit-two { transform: rotate(-35deg); }

.formula-star {
  position: absolute;
  top: 0;
  right: 0;
  color: #dca35f;
  font-size: 23px;
}

.programs-section .program-grade {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  color: #438b63;
  background: #eaf6ee;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
}

.programs-section .program-card h3 {
  margin: 0 0 12px;
  color: #263f35;
  font-size: 1.25rem;
  line-height: 1.3;
}

.programs-section .program-card p {
  flex-grow: 1;
  margin: 0 0 20px;
  color: #5a6a7a;
  font-size: .94rem;
  line-height: 1.6;
}

.programs-section .program-card .btn {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 12px 18px;
  color: #fff;
  background: #58a879;
  border: none;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  transition: background .2s ease;
}

.programs-section .program-card .btn:hover {
  background: #438b63;
}

@media (max-width: 1000px) {
  .programs-section .programs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .programs-section {
    padding: 55px 0;
  }

  .programs-section .programs-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .programs-section .program-card {
    padding: 16px 18px 22px;
  }

  .program-visual {
    height: 135px;
  }
}
/* ===== Фотогалерея и контакты в разделе «О студии» ===== */

.about-section .about-main-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: 30px;
}

.about-section .about-main-card .about-text {
  padding: 28px;
  margin: 0;
  min-width: 0;
}

.about-section .about-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 24px;
}

.about-section .about-contact-card > * {
  min-width: 0;
}

.about-section .about-map {
  height: 260px;
  margin: 0;
}

.about-section .about-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 900px) {
  .about-section .about-main-card {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .about-contact-card {
  grid-template-columns: 1fr;
  grid-template-areas:
    "heading"
    "info"
    "map";
}
  .about-section .about-map {
    height: 300px;
  }
}

@media (max-width: 520px) {
  .about-section .about-main-card {
    padding: 18px;
  }

  .about-section .about-main-card .about-text {
    padding: 8px 2px;
  }

  .about-section .about-contact-card {
    padding: 18px;
  }

  .about-section .about-map {
    height: 230px;
  }
}


.about-section .studio-gallery-bottom a {
  display: block;
  min-width: 0;
}

.about-section .studio-gallery-bottom img {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: cover;
  border-radius: 16px;
}

/* Адрес под картой */
.about-section .about-map-address {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
}

@media (max-width: 520px) {
  .about-section .studio-gallery-bottom {
    gap: 8px;
  }

  .about-section .studio-gallery-bottom img {
    height: 110px;
    border-radius: 12px;
  }
}
/* Карусель фотографий студии */
.about-section .studio-carousel {
  position: relative;
  width: 100%;
  height: 425px;
  overflow: hidden;
  border-radius: 20px;
  touch-action: pan-y;
}

.about-section .studio-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s ease-in-out;
}

.about-section .studio-carousel-slide {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.about-section .studio-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.about-section .studio-carousel:hover .studio-carousel-arrow,
.about-section .studio-carousel-arrow:focus-visible {
  opacity: 1;
}

.about-section .studio-carousel-arrow:hover {
  background: #fff;
}

.about-section .studio-carousel-prev {
  left: 14px;
}

.about-section .studio-carousel-next {
  right: 14px;
}

.about-section .studio-carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  z-index: 2;
}

.about-section .studio-carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.about-section .studio-carousel-dot.active {
  background: #fff;
  transform: scale(1.25);
}

@media (max-width: 520px) {
  .about-section .studio-carousel {
    height: 280px;
    border-radius: 16px;
  }

  .about-section .studio-carousel-slide {
    border-radius: 16px;
  }

  .about-section .studio-carousel-arrow {
    width: 36px;
    height: 36px;
    opacity: 1;
  }
}
.about-section .about-contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e5f3e9;
  color: #39865a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-section .about-contact-item a {
  text-decoration: none;
}

.about-section .about-map-address {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}
/* Новый контактный блок студии */
.about-section .about-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px 32px;
  margin-top: 28px;
  padding: 32px;
  background: #fff;
  border: 1px solid #e1f1e6;
  border-radius: 30px;
  box-shadow: 0 12px 35px rgba(35, 80, 55, 0.08);
}

.about-section .about-contact-heading {
  grid-column: 1 / -1;
  text-align: center;
}

.about-section .about-contact-heading h2 {
  margin: 0 0 10px;
  color: #286344;
  font-size: 2rem;
}

.about-section .about-contact-heading p {
  margin: 0;
  color: #5a6a7a;
  line-height: 1.6;
}

.about-section .about-contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-width: 0;
}

.about-section .about-contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.about-section .about-contact-icon {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #D9EEDF;
  color: #4a9b6e;
}

.about-section .about-contact-item h3 {
  margin: 0 0 5px;
  color: #347b53;
  font-size: 1.1rem;
}

.about-section .about-contact-item a {
  color: #5a6a7a;
  font-weight: 600;
  text-decoration: none;
}

.about-section .about-address-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  background: #D9EEDF;
  border: 1px solid #c5e5d0;
  border-radius: 22px;
}

.about-section .about-address-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #4a9b6e;
  color: #fff;
}

.about-section .about-address-text {
  min-width: 0;
}

.about-section .about-address-text > span {
  display: block;
  margin-bottom: 8px;
  color: #347b53;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.about-section .about-address-text strong {
  display: block;
  margin-bottom: 16px;
  color: #286344;
  font-size: 1.25rem;
  line-height: 1.45;
}

.about-section .about-route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 30px;
  background: #4a9b6e;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.about-section .about-route-link:hover {
  background: #347b53;
  transform: translateY(-2px);
}

.about-section .about-map {
  height: 100%;
  min-height: 310px;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
}

.about-section .about-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 310px;
  border: 0;
}

@media (max-width: 900px) {
  .about-section .about-contact-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .about-section .about-contact-heading {
    grid-column: auto;
  }

  .about-section .about-map,
  .about-section .about-map iframe {
    min-height: 300px;
  }
}

@media (max-width: 520px) {
  .about-section .about-contact-card {
    padding: 20px;
    border-radius: 22px;
  }

  .about-section .about-contact-heading h2 {
    font-size: 1.65rem;
  }

  .about-section .about-address-card {
    padding: 17px;
    gap: 12px;
  }

  .about-section .about-address-text strong {
    font-size: 1.08rem;
  }

  .about-section .about-map,
  .about-section .about-map iframe {
    min-height: 240px;
  }
}



/* ===== ЕДИНОЕ ОФОРМЛЕНИЕ КОНТАКТОВ ===== */

.about-section .about-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas:
    "heading heading"
    "info map";
  align-items: stretch;
  gap: 24px 32px;
  min-width: 0;
  padding: 32px;
  background: #fff;
  border: 1px solid #e7f1e9;
  border-radius: 28px;
  box-shadow: 0 12px 35px rgba(35, 80, 55, 0.07);
}

.about-section .about-contact-heading {
  grid-area: heading;
  text-align: center;
  margin: 0;
}

.about-section .about-contact-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-width: 0;
}

.about-section .about-contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

/* Круг с красной телефонной трубкой */
.about-section .about-contact-icon {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f5ec;
  color: #e53935;
}

.about-section .about-contact-icon svg {
  width: 30px;
  height: 30px;
  stroke: #e53935;
}

/* Одинаковый шрифт и размер заголовков */
.about-section .about-contact-item h3,
.about-section .about-address-text span {
  display: block;
  margin: 0 0 6px;
  color: #203b50;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

/* Одинаковый размер номера и адреса */
.about-section .about-contact-item a,
.about-section .about-address-text strong {
  display: block;
  color: #203b50;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.about-section .about-contact-item a:hover {
  color: #39875c;
}

/* Белая область адреса */
.about-section .about-address-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #edf1ee;
  border-radius: 20px;
  box-shadow: none;
}

/* Увеличенная иллюстрация карты */
.about-section .about-address-icon {
  flex: 0 0 58px;
  width: 58px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.about-section .about-address-icon img {
  display: block;
  width: 74px;
  height: 74px;
  max-width: none;
  object-fit: contain;
  transform: translateX(-8px);
}

.about-section .about-address-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.about-section .about-address-text span {
  margin-bottom: 8px;
}

.about-section .about-address-text strong {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Кнопка маршрута — сохраняем её удачное положение */
.about-section .about-route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 9px;
  margin: 0 0 0 110px;
  padding: 12px 22px;
  color: #39875c;
  background: #fff;
  border: 1.5px solid #39875c;
  border-radius: 30px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
  transition: 0.2s ease;
}

.about-section .about-route-link:hover {
  color: #fff;
  background: #39875c;
}

.about-section .about-route-link svg {
  stroke: currentColor;
}

/* Карта справа */
.about-section .about-map {
  grid-area: map;
  width: 100%;
  height: 300px;
  min-height: 300px;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #edf6ef;
}

.about-section .about-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
}

/* Планшеты */
@media (max-width: 900px) {
  .about-section .about-contact-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "heading"
      "info"
      "map";
    gap: 22px;
    padding: 24px;
  }

  .about-section .about-map,
  .about-section .about-map iframe {
    min-height: 280px;
  }
}

/* Телефоны */
@media (max-width: 520px) {
  .about-section .about-contact-card {
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
  }

  .about-section .about-address-card {
    gap: 12px;
    padding: 12px;
  }

  .about-section .about-address-icon {
    flex-basis: 48px;
    width: 48px;
    height: 60px;
  }

  .about-section .about-address-icon img {
    width: 60px;
    height: 60px;
    transform: translateX(-6px);
  }

  .about-section .about-address-text strong {
    font-size: 1rem;
  }

  .about-section .about-route-link {
    margin-left: 75px;
  }

  .about-section .about-map,
  .about-section .about-map iframe {
    min-height: 230px;
  }
}
/* Финальное выравнивание текста контактов */

.about-section .about-contact-item h3,
.about-section .about-address-text span {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

.about-section .about-address-card {
  gap: 15px;
}

.about-section .about-address-icon {
  flex: 0 0 42px;
  width: 42px;
}

.about-section .about-address-icon img {
  width: 74px;
  height: 74px;
  max-width: none;
  transform: translateX(-8px);
}

/* ===== ФИНАЛЬНОЕ ОФОРМЛЕНИЕ КОНТАКТОВ ===== */

/* Иконка телефона — только красная трубка */
.about-section .about-contact-icon {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.about-section .about-contact-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Единый стиль заголовков */
.about-section .about-contact-item h3,
.about-section .about-address-text span {
  margin: 0 0 6px;
  color: #203b50;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

/* Единый цвет и шрифт основного текста */
.about-section .about-contact-item a,
.about-section .about-address-text strong {
  color: #203b50;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

/* Белая карточка адреса */
.about-section .about-address-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #edf1ee;
  border-radius: 20px;
  box-shadow: none;
}

/* Увеличенная картинка карты с геометкой */
.about-section .about-address-icon {
  flex: 0 0 58px;
  width: 58px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  border: 0;
}

.about-section .about-address-icon img {
  display: block;
  width: 74px;
  height: 74px;
  max-width: none;
  object-fit: contain;
  transform: translateX(-8px);
}

.about-section .about-address-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.about-section .about-address-text span {
  display: block;
  margin-bottom: 8px;
}

.about-section .about-address-text strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Кнопка маршрута — без рамки и фона */
.about-section .about-route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 9px;
  margin: 0 0 0 110px;
  padding: 12px 22px;
  color: #39875c;
  background: transparent !important;
  border: 0 !important;
  outline: 0;
  border-radius: 30px;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.about-section .about-route-link:hover {
  color: #286344;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.about-section .about-route-link svg {
  stroke: currentColor;
}

/* Адаптация для планшетов */
@media (max-width: 900px) {
  .about-section .about-contact-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "info"
      "map";
  }

  .about-section .about-route-link {
    margin-left: 0;
  }
}

/* Адаптация для телефонов */
@media (max-width: 520px) {
  .about-section .about-address-card {
    gap: 12px;
    padding: 12px;
  }

  .about-section .about-address-icon {
    flex-basis: 48px;
    width: 48px;
    height: 60px;
  }

  .about-section .about-address-icon img {
    width: 60px;
    height: 60px;
    transform: translateX(-6px);
  }

  .about-section .about-address-text strong {
    font-size: 1rem;
  }

  .about-section .about-route-link {
    margin-left: 75px;
  }
}

/* Точная настройка контактного блока */

/* Красная трубка — уменьшаем */
.about-section .about-contact-info .about-contact-icon {
  flex: 0 0 52px !important;
  width: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.about-section .about-contact-info .about-contact-icon img {
  display: block;
  width: 42px !important;
  height: 42px !important;
  object-fit: contain;
}

/* Адрес — без рамки и без зелёной плашки */
.about-section .about-contact-info .about-address-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Иллюстрация карты с геометкой */
.about-section .about-contact-info .about-address-icon {
  flex: 0 0 64px !important;
  width: 64px !important;
  height: 64px !important;
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
}

.about-section .about-contact-info .about-address-icon img {
  display: block;
  width: 64px !important;
  height: 64px !important;
  object-fit: contain;
}

/* Заголовок адреса */
.about-section .about-contact-info .about-address-text span {
  display: block;
  margin: 0 0 8px;
  color: #203b50;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Сам адрес */
.about-section .about-contact-info .about-address-text strong {
  color: #203b50;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
}

/* Кнопка — рамку сохраняем */
.about-section .about-contact-info .about-route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-left: 110px;
  padding: 11px 20px;
  color: #39875c !important;
  background: #fff !important;
  border: 1.5px solid #39875c !important;
  border-radius: 30px;
  box-shadow: none !important;
  text-decoration: none;
}

.about-section .about-contact-info .about-route-link:hover {
  color: #fff !important;
  background: #39875c !important;
}

@media (max-width: 520px) {
  .about-section .about-contact-info .about-route-link {
    margin-left: 0;
  }
}
/* Одинаковая типографика контактного блока */

/* Заголовки */
.about-section .about-contact-info .about-contact-item h3,
.about-section .about-contact-info .about-address-text span {
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  color: #203b50 !important;
  text-transform: none !important;
}

/* Номер телефона и адрес */
.about-section .about-contact-info .about-contact-item a,
.about-section .about-contact-info .about-address-text strong {
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  color: #203b50 !important;
}

/* Убираем возможные отличия в начертании */
.about-section .about-contact-info h3,
.about-section .about-contact-info a,
.about-section .about-contact-info span,
.about-section .about-contact-info strong {
  font-style: normal !important;
}
/* Расширяем карту в сторону контактного блока */
.about-contact-card {
  grid-template-columns: 1fr 1.15fr !important;
  column-gap: 12px !important;
}

.about-section .about-map {
  width: 100% !important;
  margin-left: -20px !important;
  width: calc(100% + 20px) !important;
}
/* ============================================
   МОБИЛЬНАЯ АДАПТАЦИЯ: КАРТА И КОНТАКТЫ (ИСПРАВЛЕНО)
   ============================================ */

@media (max-width: 900px) {
  /* 1. Перестраиваем сетку контактов в одну колонку */
  .about-section .about-contact-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    padding: 20px !important;
    border-radius: 20px !important;
  }

  /* 2. Выравниваем заголовок */
  .about-section .about-contact-heading {
    text-align: center;
    margin-bottom: 10px;
  }

  /* 3. Блок с телефоном и адресом */
  .about-section .about-contact-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
  }

  /* 4. Карточка телефона */
  .about-section .about-contact-item {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
  }

  /* Иконка телефона (фиксируем, чтобы не сжималась) */
  .about-section .about-contact-icon {
    flex: 0 0 50px !important;
    width: 50px !important;
    height: 50px !important;
  }

  .about-section .about-contact-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .about-section .about-contact-item h3 {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
  }

  .about-section .about-contact-item a {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    text-decoration: none !important;
  }

  /* 5. Карточка адреса */
  .about-section .about-address-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Иконка адреса (фиксируем) */
  .about-section .about-address-icon {
    flex: 0 0 50px !important;
    width: 50px !important;
    height: 50px !important;
  }

  .about-section .about-address-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .about-section .about-address-text {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .about-section .about-address-text > span {
    font-size: 0.75rem !important;
    display: block !important;
    margin-bottom: 4px !important;
  }

  .about-section .about-address-text strong {
    font-size: 1rem !important;
    line-height: 1.4 !important;
    display: block !important;
  }

  /* 6. Кнопка "Построить маршрут" на всю ширину */
  .about-section .about-route-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 14px 20px !important;
    box-sizing: border-box !important;
  }

  /* 7. Сама карта */
  .about-section .about-map {
    width: 100% !important;
    height: 250px !important;
    border-radius: 16px !important;
  }

  .about-section .about-map iframe {
    border-radius: 16px !important;
  }
}
/* ============================================
   ВЫРАВНИВАНИЕ КАРТЫ НА МОБИЛЬНЫХ
   ============================================ */

@media (max-width: 900px) {
  /* Контейнер карты */
  .about-section .about-map {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  /* Сам iframe карты */
  .about-section .about-map iframe {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-sizing: border-box !important;
  }
}

/* --- 1. Блок с контактами (телефон и адрес) --- */
.about-contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  align-items: start;
}

.about-contact-item,
.about-address-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.about-contact-icon img,
.about-address-icon img {
  width: 40px;
  height: auto;
  display: block;
}

.about-contact-item h3,
.about-address-text span {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
  display: block;
}

.about-contact-item a {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: block;
}

.about-address-text strong {
  font-size: 1.1rem;
  line-height: 1.4;
  display: block;
  color: var(--text);
}

/* --- 2. Кнопка маршрута --- */
.about-route-wrap {
  margin-bottom: 40px;
}

.about-route-link {
  display: inline-block;
  color: #4a9b6e;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.about-route-link:hover {
  border-bottom-color: #4a9b6e;
}

/* --- 3. Нижняя часть: улица и карта --- */
.about-contact-bottom {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 30px;
  width: 100%;
}

/* Обе части одинаковой ширины и высоты */
.about-street-scene,
.about-map {
  flex: 1 1 0;
  width: 50%;
  min-width: 0;
  height: 350px; /* Фиксированная высота для красоты */
  border-radius: 24px;
  overflow: hidden; /* Важно: обрезает всё, что вылезает */
  position: relative; /* Для позиционирования видео */
  margin: 0;
}

.about-street-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* --- 4. Анимация мальчика --- */
@keyframes walk-across {
  0% {
    left: -20%;
    transform: scaleX(1);
  }
  48% {
    left: 100%;
    transform: scaleX(1);
  }
  50% {
    left: 100%;
    transform: scaleX(-1);
  }
  98% {
    left: -20%;
    transform: scaleX(-1);
  }
  100% {
    left: -20%;
    transform: scaleX(1);
  }
}

.about-walking-boy {
  position: absolute;
  bottom: 0;
  left: -20%;
  height: 40%;
  width: auto;
  animation: walk-across 20s linear infinite;
  z-index: 2;
  pointer-events: none;
}

/* --- 5. Адаптив для мобилок --- */
@media (max-width: 768px) {
  .about-contact-info {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .about-contact-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .about-street-scene,
  .about-map {
    width: 100%;
    height: 250px;
  }
}
/* --- Общая сетка карточки --- */
.about-section .about-contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Левая и правая колонки */
  grid-template-areas: 
    "info bottom"
    "route bottom";
  gap: 40px;
  align-items: start;
  padding: 40px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(35, 75, 55, 0.06);
}

/* Распределяем элементы по зонам */
.about-section .about-contact-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-section .about-route-wrap {
  grid-area: route;
  margin-top: -20px; /* Подтягиваем кнопку ближе к контактам */
}

.about-section .about-contact-bottom {
  grid-area: bottom;
  display: flex;
  flex-direction: row; /* Картинка и карта в ряд */
  gap: 24px;
  height: 100%;
}

/* Выравниваем картинку и карту */
.about-street-scene,
.about-map {
  flex: 1;
  height: 350px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

/* --- Кнопка маршрута --- */
.about-section .about-route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  color: #39875c !important;
  background: #fff !important;
  border: 1.5px solid #39875c !important;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.about-section .about-route-link:hover {
  color: #fff !important;
  background: #39875c !important;
}
/* Нижняя часть содержит только карту */
.about-contact-bottom {
  display: flex;
  width: 100%;
  min-height: 350px;
  margin-top: 20px;
}

/* Карта на всю ширину */
.about-map {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 350px;
  border-radius: 24px;
  overflow: hidden;
}

.about-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
