* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Comfortaa", sans-serif;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;
}

:root {
  --color-light: #76ebc4;
  --color-dark: #8deccc;
  --text-dark: #333;
  --text-light: #fff;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text-dark);
  line-height: 1.6;
}

/* Шапка */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-dark); /* Светлый фон */
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.045);
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #000;
  cursor: pointer; /* Добавляем курсор-указатель */
}

/* Убираем стандартные стили ссылки */
.logo a {
  color: inherit; /* Наследует цвет от родителя */
  text-decoration: none; /* Убирает подчеркивание */
}

/* Или если хотите полностью убрать ссылочное поведение */
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  cursor: default; /* Обычный курсор */
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 25px;
}

nav ul li a {
  color: var(--text-dark); /* Черный текст */
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  color: #666666; /* Темно-серый при наведении */
  transform: translateY(-2px);
}

/* Основные разделы */
section {
  padding: 100px 10%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.2rem;
  color: #333;
}

/* Первый раздел */
/* Рамка только для первого раздела */
#main {
  background-color: #f9f9f941;
  text-align: center;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 5%;
  overflow: hidden; /* Скрываем выходящие за границы элементы рамки */
}

.section-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Границы рамки */
.frame-top,
.frame-right,
.frame-bottom,
.frame-left {
  position: absolute;
  display: flex;
  gap: 20px;
  opacity: 0.3;
  z-index: 1;
}

.frame-top span,
.frame-right span,
.frame-bottom span,
.frame-left span {
  font-size: 4rem;
  font-weight: bold;
  color: #7fffd4;
  animation: symbol-float 6s ease-in-out infinite;
}

/* Верхняя граница */
.frame-top {
  top: 20px;
  left: 0;
  width: 100%;
  justify-content: space-around;
  flex-wrap: nowrap;
  animation: slide-horizontal 120s linear infinite;
}

/* Правая граница */
.frame-right {
  right: 20px;
  top: 0;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  animation: slide-vertical 150s linear infinite;
}

/* Нижняя граница */
.frame-bottom {
  bottom: 20px;
  left: 0;
  width: 100%;
  justify-content: space-around;
  flex-wrap: nowrap;
  animation: slide-horizontal-reverse 130s linear infinite;
}

/* Левая граница */
.frame-left {
  left: 20px;
  top: 0;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  animation: slide-vertical-reverse 140s linear infinite;
}

/* Угловые элементы */
.frame-corner {
  position: absolute;
  font-size: 3.5rem;
  font-weight: bold;
  color: #7fffd4;
  opacity: 0.4;
  z-index: 2;
  animation: rotate-corner 15s linear infinite;
}

.frame-corner.top-left {
  top: 10px;
  left: 10px;
}

.frame-corner.top-right {
  top: 10px;
  right: 10px;
}

.frame-corner.bottom-left {
  bottom: 10px;
  left: 10px;
}

.frame-corner.bottom-right {
  bottom: 10px;
  right: 10px;
}
.frame-content h1 {
  font-size: 48px;
}
/* Анимации */
@keyframes symbol-float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.4;
  }
  33% {
    transform: translateY(-4px) rotate(3deg) scale(1.1);
    opacity: 0.7;
  }
  66% {
    transform: translateY(4px) rotate(-3deg) scale(0.9);
    opacity: 0.5;
  }
}

@keyframes slide-horizontal {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes slide-horizontal-reverse {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes slide-vertical {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100%);
  }
}

@keyframes slide-vertical-reverse {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes rotate-corner {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Задержки анимаций */
.frame-top span:nth-child(odd) {
  animation-delay: 0s;
}
.frame-top span:nth-child(even) {
  animation-delay: 3s;
}

.frame-right span:nth-child(odd) {
  animation-delay: 1s;
}
.frame-right span:nth-child(even) {
  animation-delay: 4s;
}

.frame-bottom span:nth-child(odd) {
  animation-delay: 2s;
}
.frame-bottom span:nth-child(even) {
  animation-delay: 5s;
}

.frame-left span:nth-child(odd) {
  animation-delay: 0.5s;
}
.frame-left span:nth-child(even) {
  animation-delay: 3.5s;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .frame-top span,
  .frame-right span,
  .frame-bottom span,
  .frame-left span {
    font-size: 1.4rem;
  }

  .frame-corner {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .frame-top,
  .frame-right,
  .frame-bottom,
  .frame-left {
    gap: 15px;
  }

  .frame-top span,
  .frame-right span,
  .frame-bottom span,
  .frame-left span {
    font-size: 1.2rem;
  }

  .frame-corner {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
}
.scroll-chevrons {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 100;
}

.chevron {
  width: 30px;
  height: 10px;
  position: relative;
}

.chevron:before,
.chevron:after {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  background: #ffd700; /* Желтый цвет */
}

.chevron:before {
  left: 0;
  transform: skewY(30deg);
}

.chevron:after {
  right: 0;
  transform: skewY(-30deg);
}

/* Анимация для галочек */
.scroll-chevrons .chevron:nth-child(1) {
  animation: chevron-animation 3s ease-in-out infinite 0s;
}

.scroll-chevrons .chevron:nth-child(2) {
  animation: chevron-animation 3s ease-in-out infinite 0.2s;
}

.scroll-chevrons .chevron:nth-child(3) {
  animation: chevron-animation 3s ease-in-out infinite 0.4s;
}

/* Второй раздел */
.box-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 50px;
}

.box {
  background-color: var(--color-light);
  padding: 20px;
  border-radius: 8px;
  flex: 1;
  min-width: 250px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.color-scale {
  height: 20px;
  background: linear-gradient(to right, var(--color-dark), var(--color-light));
  border-radius: 10px;
  margin: 40px auto;
  max-width: 800px;
}

/* Третий раздел */
#about {
  background-color: #f9f9f9;
  text-align: center; /* Центрируем текст */
  padding: 80px 5%; /* Добавляем отступы */
}

#about h2 {
  text-align: center;
  margin-bottom: 30px;
}

.stats {
  display: flex;
  justify-content: center; /* Меняем space-around на center */
  flex-wrap: wrap;
  margin: 40px auto; /* Центрируем блок по вертикали и горизонтали */
  max-width: 1200px; /* Ограничиваем максимальную ширину */
  gap: 40px; /* Добавляем равные отступы между элементами */
}

.stat-item {
  text-align: center;
  margin: 15px;
  flex: 0 0 auto; /* Запрещаем элементам растягиваться */
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
}

#about {
  background-color: #f9f9f9;
  text-align: center; /* Центрируем текст */
  padding: 80px 5%; /* Добавляем отступы */
}

#about h2 {
  text-align: center;
  margin-bottom: 30px;
}

.stats {
  display: flex;
  justify-content: center; /* Меняем space-around на center */
  flex-wrap: wrap;
  margin: 40px auto; /* Центрируем блок по вертикали и горизонтали */
  max-width: 1200px; /* Ограничиваем максимальную ширину */
  gap: 40px; /* Добавляем равные отступы между элементами */
}

.stat-item {
  text-align: center;
  margin: 15px;
  flex: 0 0 auto; /* Запрещаем элементам растягиваться */
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
}

.teachers-list {
  margin-top: 30px;
  max-width: 1400px; /* Увеличиваем максимальную ширину для 4 карточек */
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center; /* Центрируем карточки по горизонтали */
  flex-wrap: wrap; /* Разрешаем перенос на новую строку */
  gap: 20px; /* Уменьшаем отступ между карточками */
}

.teacher-item {
  padding: 20px; /* Немного уменьшаем padding */
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  border-left: 4px solid var(--color-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex: 0 0 calc(25% - 20px); /* 4 карточки в строку с учетом gap */
  min-width: 250px; /* Уменьшаем минимальную ширину */
  max-width: 280px; /* Уменьшаем максимальную ширину */
  box-sizing: border-box;
}

.teacher-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.teacher-item strong {
  color: #333;
  font-size: 1.1rem; /* Немного уменьшаем размер шрифта */
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Четвертый раздел */
#contacts {
  text-align: center;
}

.contact-methods {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
}

.contact-item a {
  color: var(--text-dark);
  text-decoration: none;
  margin-left: 10px;
  transition: all 0.3s ease;
}

.contact-item a:hover {
  color: var(--color-dark);
}

.map-container {
  height: 400px;
  margin-top: 30px;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Футер */
footer {
  background-color: var(--color-dark);
  color: var(--text-light);
  text-align: center;
  padding: 20px;
}

/* Кнопка наверх */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--color-dark);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-top.show {
  opacity: 1;
}
.stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* Адаптивность */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 10px;
  }

  nav ul {
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav ul li {
    margin: 5px 10px;
  }

  section {
    padding: 80px 5%;
  }

  .box-container {
    flex-direction: column;
  }

  .contact-methods {
    flex-direction: column;
    align-items: center;
  }

  .map-container {
    height: 300px;
  }

  #main h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .teachers-list {
    grid-template-columns: 1fr; /* Одна колонка на мобильных */
    gap: 30px;
  }

  .teacher-item {
    padding: 30px;

    margin-bottom: 15px; /* Убираем margin-bottom т.к. есть gap */
  }

  .teacher-item strong {
    font-size: 1.1rem;
  }

  /* Добавляем стили для блока stats в мобильной версии */
  .stats {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .stat-item {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }
}
@keyframes chevron-animation {
  0%,
  25% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
  75%,
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.8);
  }
}

/* Зона действия - круг при наведении */
.scroll-chevrons:hover::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.7;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .scroll-chevrons {
    bottom: 30px;
  }

  .chevron {
    width: 25px;
    height: 8px;
  }

  .scroll-chevrons:hover::after {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .scroll-chevrons {
    bottom: 20px;
  }

  .chevron {
    width: 20px;
    height: 6px;
  }

  .scroll-chevrons:hover::after {
    width: 40px;
    height: 40px;
  }
}
