body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: #330066;
  color: #000;
  overflow-x: hidden;
}

/* Единый центрирующий контейнер */
.centered {
  max-width: 1400px;         /* базовая ширина сайта */
  margin: 0 auto;
  padding: 0 20px;           /* мягкие поля по краям */
  box-sizing: border-box;
}

/* Заголовки */
h1 {
  font-family: 'Playfair Display', serif;
  color: #330066;
  margin-bottom: 10px;
}

.subtitle {
  font-family: 'Marck Script', cursive;
  font-size: 20px;
  color: #555;
  margin-bottom: 30px;
}

/* === НАВИГАЦИЯ === */
/* === ОБЩИЙ ЦЕНТРИРУЮЩИЙ КОНТЕЙНЕР === */
.wrapper {
  background-color: #330066;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 40px;
  height: 40px;
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: #330066;
  font-size: 20px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.nav-links a.active,
.nav-links a.active:visited {
    color: #D4AF37 !important;
    font-weight: 600;
}

.nav-links a {
  text-decoration: none;
  color: #330066;
  font-weight: 500;
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a:hover {
  color: #D4AF37; /* золотой при наведении */
}

.nav-links a.active {
  color: #D4AF37 !important;
  font-weight: 600;
}


/* === ЗАСТАВКА === */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh !important;
  background-color: #330066;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1s ease;
}

/* Анимация появления заставки */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preloader-logo {
  width: 160px;
  margin-bottom: 20px;
  animation: fadeInUp 1.2s ease forwards;
}

.preloader-text {
  font-family: 'Marck Script', cursive;
  color: #FFD700;
  font-size: 22px;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 1.8s ease 0.8s forwards; /* появится чуть позже логотипа */
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === ЛОГОТИП НА ГЛАВНОЙ === */
.logo {
  width: 220px;           /* можно подогнать — диапазон 200–240 */
  margin: 0 auto 25px;    /* чуть больше расстояние снизу */
  display: block;
  border-radius: 12px;
}

section p {
  max-width: 900px;
  margin: 0 auto 25px auto;
  line-height: 1.7;
  text-align: justify;
  text-indent: 25px;
}

section h2 {
  font-family: 'Playfair Display', serif;
  color: #330066;
  text-align: center;
  margin-bottom: 35px;
  font-size: 30px;
}

header img.logo {
  display: block;
  margin: 0 auto 20px auto;
  max-width: 200px;
}

header h1 {
  font-family: 'Playfair Display', serif;
  color: #330066;
  font-size: 2.2em;
  margin: 10px 0;
  text-align: center;
}

header .subtitle {
  font-family: 'Marck Script', cursive;
  color: #555;
  font-size: 1.3em;
  text-align: center;
}

footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px 0;
  color: #777;
  font-size: 0.9em;
}

/* Списки */
section ul {
  margin-left: 40px;
  margin-top: 10px;
  margin-bottom: 20px;
}

section li {
  margin-bottom: 8px;
}

/* Кнопки-призывы к действию внутри секций — по центру */
section .cta-btn {
  display: block;
  margin: 30px auto 0 auto;
}

/* Блок с главной фотографией занятия */
.hero-image {
  max-width: 1000px;
  margin: 40px auto 80px auto;
}

.hero-image img {
  width: 100%;       /* занимает всю ширину блока hero-image */
  height: auto;
  display: block;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Единый стиль для фото в разделах */
section img {
  display: block;
  margin: 40px auto;
  max-width: 85%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* === ОБЩАЯ ОБОЛОЧКА САЙТА === */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #330066;
  overflow-x: hidden;
}

/* === НАВБАР === */
:root { --nav-gap: 18px; }
.navbar-wrapper {
  display: flex;
  justify-content: center;
  position: relative;
  margin: 0; /* 🔹 убираем возможные внешние отступы */
  padding: var(--nav-gap) 0;
}

.navbar {
  background:#fff;
  border-radius:20px;
  padding:20px 50px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  box-shadow:0 4px 25px rgba(0,0,0,.08);
  transition:all .4s ease;
  width:100%;
  max-width:1400px;
  margin: 0 auto;
  box-sizing:border-box;
  position: relative;
  z-index: 1001;
}

/* === ЭФФЕКТ ПРИ ПРОКРУТКЕ === */
.navbar.scrolled {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 1500px; /* лёгкое расширение */
  border-radius: 0 0 25px 25px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin: 0;
}

/* === ОСНОВНОЙ БЕЛЫЙ БЛОК === */
.container {
  background:#fff;
  border-radius:20px;
  padding:80px 100px;
  box-shadow:0 0 25px rgba(0,0,0,.1);
  max-width:1400px;
  width:calc(100% - 80px);
  box-sizing:border-box;
  margin:0 auto;
  opacity:0;
  transform:translateY(15px);
  transition:opacity .6s ease, transform .6s ease;
}

/* === Прилипание === */
.navbar.sticky {
  position:fixed;
  top:0;
  left:0; right:0;            /* жёсткое центрирование без дёрганья */
  margin:0 auto;
  max-width:1500px;           /* лёгкое расширение при прилипаинии */
  width:100%;
  border-radius:0 0 25px 25px;
  box-shadow:0 6px 25px rgba(0,0,0,.15);
  z-index:1000;
}

/* Когда навбар прилип — добавим «виртуальный» отступ сверху, чтобы контент не подпрыгивал */
body.has-sticky {
  /* будет задаваться через JS: padding-top: var(--navH); */
  transition: padding-top .2s ease;
}

/* === Фиолетовый фон под белым блоком === */
.background {
  background-color:#330066;
  padding: var(--nav-gap) 0 60px;
  display:block;
}

/* === Плавное появление блока после загрузки === */
body.loaded .container { opacity:1; transform:translateY(0); }

.nav-icon {
    width: 22px;
    height: 22px;
    margin-right: 4px;
    vertical-align: middle;
}

/* === ЕДИНЫЕ ОТСТУПЫ ДЛЯ ВСЕХ РАЗДЕЛОВ === */
section {
  max-width: 1100px;       /* комфортная ширина */
  margin: 50px auto;       /* одинаковые отступы сверху/снизу */
  padding: 0 30px;         /* внутренние поля */
  text-align: left;        /* текст по ширине */
  line-height: 1.6;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center; /* ← вот это */
}


.teacher-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teacher-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 22px rgba(0,0,0,0.15);
}

.teacher-photo {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 15px;
}

.teacher-card h3 {
    font-size: 20px;
    margin: 8px 0;
    color: #222;
}

.teacher-subtitle {
    font-size: 15px;
    color: #555;
    line-height: 1.4;
}

/* Последний абзац перед блоком преподавателей — меньше отступ снизу */
.courses-section p:last-of-type {
    margin-bottom: 10px;
}

/* Блок "Наши преподаватели": меньше отступ сверху и паддинг */
.teachers-section {
    margin-top: 10px;
    padding-top: 10px;   /* было 30px */
}

/* Заголовок "Наши преподаватели" */
.teachers-title {
    font-size: 30px;
    margin: 15px 0 25px; /* чуть ближе к карточкам */
    color: #222;         /* потемнее, чем обычный текст */
    font-weight: 700;    /* жирный */
}

.reviews-section {
    max-width: 1100px;          /* как у других секций */
    margin: 50px auto;          /* тот же отступ сверху/снизу, что у section */
    padding: 0 30px 40px;       /* без лишнего верхнего воздуха */
    text-align: center;
}


.reviews-swiper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px auto;
}

.review-card {
    background: rgba(51, 0, 102, 0.08);
    border-radius: 16px;
    padding: 22px 26px;
    font-size: 16px;
    line-height: 1.5;
    color: #2a2a2a;
    text-align: left;
    min-height: 180px;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 40px;
    width: 92%;
    max-width: 540px;
    border-radius: 26px;
    text-align: left;
    box-sizing: border-box;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #330066;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 16px 18px; /* ← одинаковый отступ справа и слева */
    margin-bottom: 16px;

    border-radius: 14px;
    border: 1.5px solid #dcdcdc;

    font-size: 16px;
    box-sizing: border-box;
}

.modal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.highlight {
    color: #D4AF37 !important;
    transition: color 0.5s ease;
}

section h2 {
    transition: color 0.5s ease;
}

/* === ЕДИНЫЙ СТИЛЬ ВСЕХ КНОПОК === */
button,
.cta-btn,
.review-btn,
.modal-content button {
  padding: 18px 45px;
  border-radius: 18px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;

  background: linear-gradient(135deg,
      #D4AF37 0%,
      #FFD700 50%,
      #B8860B 100%
  );

  font-family: 'Montserrat', sans-serif !important;

  border: none;
  cursor: pointer;
  display: inline-block;

  transition: 0.25s ease;
}

button:hover,
.cta-btn:hover,
.review-btn:hover,
.modal-content button:hover {
    filter: brightness(1.08);
}

button:active,
.cta-btn:active,
.review-btn:active,
.modal-content button:active {
    filter: brightness(0.92);
    transform: scale(0.98);
}

.modal-content button {
    margin: 0 auto;
    display: block;
}

.update-date {
  font-size: 0.85em;
  color: #999;
  margin-top: 4px;
}

/* Ссылки в контенте секций */
section a {
  color: #330066;
  text-decoration: underline;
}

/* Цвет посещённых ссылок в контенте */
section a:visited {
  color: #7B3FAF; /* чуть более тёмный фиолетовый */
}

/* === SWIPER: стрелки === */
.swiper-button-next,
.swiper-button-prev {
    color: #330066 !important;
}

/* === SWIPER: активная точка === */
.swiper-pagination-bullet-active {
    background: #330066 !important;
}

/* === SWIPER: обычные точки — приглушённые, чтобы не мешали */
.swiper-pagination-bullet {
    background: rgba(51, 0, 102, 0.25); /* мягкий фиолетовый */
    opacity: 1;
}

/* === АККУРАТНЫЙ coverflow для отзывов === */

.reviews-swiper .swiper-slide {
    width: 55% !important;     /* было 60–75, теперь компактнее */
    max-width: 750px !important;
}

/* центральный — чёткий, нормальный */
.reviews-swiper .swiper-slide-active {
    opacity: 1 !important;
    filter: none !important;
    transform: scale(1) !important;
}

/* боковые — компактнее, слабее, дальше */
.reviews-swiper .swiper-slide-prev,
.reviews-swiper .swiper-slide-next {
    transform: scale(0.78) !important;   /* было 0.9 → делаем меньше */
    opacity: 0.30 !important;            /* была 0.5 → делаем светлее */
    filter: blur(2.5px) !important;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;

    width: 60px;
    height: 60px;

    background: linear-gradient(135deg,
      #D4AF37 0%,
      #FFD700 50%,
      #B8860B 100%
    );
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;

    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 99999;
}

.arrow-up {
    width: 32px;
    height: 32px;
}

.back-to-top .arrow {
    font-size: 45px;      /* делаем больше */
    color: white;
    line-height: 0;       /* идеальный вертикальный центр */
    display: flex;
    align-items: center;
    justify-content: center;
}

#preloader {
    z-index: 999999 !important;
}

.back-to-top:hover {
    opacity: 1;
}

.nav-links a {
    color: #330066;
}

.nav-links a:hover {
    color: #D4AF37;
}

.nav-links a.active,
.nav-links a.active:visited {
    color: #D4AF37 !important;
}

/* скрываем мобильное меню на десктопе */
@media (min-width: 1100px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: stretch;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-image {
  display: flex;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}
