/* ===== VARIABLES ===== */
:root {
  --primary: #2563EB;
  --primary-dark: #1E3A5F;
  --primary-light: #3B82F6;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --accent-light: #FDBA74;
  --teal: #0D9488;
  --teal-light: #14B8A6;
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --text-dark: #1E293B;
  --text-light: #64748B;
  --text-white: #FFFFFF;
  --shadow: 0 4px 24px rgba(30, 58, 95, 0.10);
  --shadow-lg: 0 12px 40px rgba(30, 58, 95, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s ease;
  --header-h: 72px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: var(--text-white);
}
.btn--primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn--accent {
  background: var(--accent);
  color: var(--text-white);
}
.btn--accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--text-white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-white);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 17px;
  border-radius: var(--radius);
}

.btn--sm {
  padding: 10px 22px;
  font-size: 14px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(30, 58, 95, 0.06);
  transition: box-shadow var(--transition);
}

.header--scrolled {
  box-shadow: 0 2px 24px rgba(30, 58, 95, 0.12);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo__img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav__list {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link--active {
  color: var(--primary);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.header__cta {
  padding: 10px 24px;
  font-size: 14px;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: all var(--transition);
}

.burger--active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.burger--active span:nth-child(2) {
  opacity: 0;
}
.burger--active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: clamp(500px, 41.67vw, 800px); /* 600px при 1440, масштаб до 800px для Full HD */
  display: flex;
  align-items: center;
  background-color: var(--primary-dark); /* фолбэк, пока нет картинки */
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero__bg-elements {
  display: none; /* скрыто — фоновые символы не нужны поверх картинки */
}

.hero__inner {
  text-align: center;
  padding: 40px 0;
}

.hero__logo-big {
  margin-bottom: 28px;
}

.hero__logo-img {
  height: 80px;
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
}

.hero__title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
  margin-bottom: 24px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 0, 0, 0.3);
}

.hero__highlight {
  color: var(--accent-light);
}

.hero__subtitle {
  font-size: clamp(18px, 2.5vw, 22px);
  color: rgba(255, 255, 255, 0.95);
  max-width: 600px;
  margin: 0 auto 40px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 0, 0, 0.3);
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__br-mobile {
  display: none;
}

/* ===== SECTIONS COMMON ===== */
.section {
  padding: 100px 0;
}

.section:nth-child(even) {
  background: var(--bg-light);
}

.section__title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.section__desc {
  text-align: center;
  color: var(--text-light);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 56px;
}

/* Scroll animation */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ABOUT / FEATURES ===== */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.feature-card__icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.feature-card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.feature-card__text {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ===== ABOUT OFFLINE ===== */
.about-offline {
  margin-top: 64px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.about-offline__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 32px;
}

.about-offline__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.about-offline__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.about-offline__icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.about-offline__item p {
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.6;
}

.about-offline__item strong {
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  .about-offline__grid {
    grid-template-columns: 1fr;
  }

  .about-offline {
    padding: 28px 20px;
  }
}

/* ===== COURSES ===== */
.courses__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.course-card {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.course-card__icon {
  font-size: 52px;
  margin-bottom: 12px;
  line-height: 1;
}

.course-card__badge {
  display: inline-block;
  background: var(--teal);
  color: var(--text-white);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.course-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.course-card__text {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* ===== GALLERY ===== */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery__item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery__item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.gallery__placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-weight: 700;
  font-size: 18px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ===== CONTACT ===== */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact__info h3,
.form h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 24px;
}

.contact__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.contact__icon {
  font-size: 22px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.contact__list a {
  color: var(--primary);
  transition: color var(--transition);
}

.contact__list a:hover {
  color: var(--accent);
}

.contact__socials {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text-white);
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.contact__map {
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}

.contact__map iframe {
  width: 100%;
  height: 250px;
  display: block;
}

.contact__map small {
  display: block;
  padding: 8px 12px;
  background: var(--bg-white);
  line-height: 1.4;
}

.contact__map small a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}

/* ===== FORM ===== */
.form {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.form__group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form__input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form__input--error {
  border-color: #EF4444;
}

.form__input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748B' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form__error {
  display: block;
  font-size: 13px;
  color: #EF4444;
  margin-top: 4px;
  min-height: 18px;
}

.form__submit {
  width: 100%;
  margin-top: 8px;
}

.form__success {
  text-align: center;
  padding: 24px;
  margin-top: 16px;
  background: #F0FDF4;
  border-radius: var(--radius-sm);
  border: 2px solid #86EFAC;
  animation: fadeIn 0.4s ease;
}

.form__success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #22C55E;
  color: var(--text-white);
  font-size: 24px;
  margin-bottom: 12px;
}

.form__success p {
  font-weight: 600;
  color: #166534;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer .logo__img {
  height: 40px;
  filter: brightness(1.5);
}

.footer__brand {
  text-align: center;
}

.footer__copy {
  font-size: 14px;
  margin-top: 8px;
}

.footer__nav {
  display: flex;
  gap: 24px;
}

.footer__nav a {
  font-size: 14px;
  transition: color var(--transition);
}

.footer__nav a:hover {
  color: var(--accent-light);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 58, 95, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}

.modal-overlay:not([hidden]) .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-light);
  border-radius: 50%;
  transition: all var(--transition);
}

.modal__close:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

.modal__badge {
  display: inline-block;
  background: var(--teal);
  color: var(--text-white);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.modal__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.modal__desc {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.modal__list {
  list-style: none;
  margin-bottom: 20px;
}

.modal__list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-size: 15px;
}

.modal__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

.modal__details {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}

.modal__cta {
  width: 100%;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.lightbox:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 36px;
  color: var(--text-white);
  transition: color var(--transition);
}

.lightbox__close:hover { color: var(--accent); }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: var(--text-white);
  padding: 12px;
  transition: color var(--transition);
}

.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__prev:hover,
.lightbox__next:hover { color: var(--accent); }

.lightbox__content {
  max-width: 80vw;
  max-height: 80vh;
  border-radius: var(--radius);
  overflow: hidden;
}

.lightbox__content .gallery__placeholder {
  width: 70vw;
  height: 50vh;
  font-size: 28px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    padding: 100px 32px 32px;
    transition: right var(--transition);
    z-index: 999;
  }

  .nav--open {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 24px;
  }

  .nav__link {
    font-size: 18px;
  }

  .header__cta {
    display: none;
  }

  .hero__title {
    font-size: clamp(32px, 6vw, 42px);
  }

  .section {
    padding: 72px 0;
  }

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

  .courses__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form {
    padding: 24px;
  }

  .modal {
    padding: 28px 20px;
    max-height: 90vh;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__brand {
    text-align: center;
  }

  .footer__nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero__br-mobile {
    display: block;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .lightbox__content .gallery__placeholder {
    width: 90vw;
    height: 60vh;
  }
}

/* ===== UTILITY ===== */
body.no-scroll {
  overflow: hidden;
}
