/* ========== Подключение шрифтов ========== */
@font-face {
  font-family: 'Postertoaster';
  src: url('fonts/Postertoaster.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Codec Pro';
  src: url('fonts/CodecPro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Codec Pro';
  src: url('fonts/CodecPro-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* ========== Общие стили ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Codec Pro', sans-serif;
  background: #000;
  color: #f5efe9;
  margin: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ========== ХЕДЕР (ПК) ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 60px;
  background: transparent;
  display: flex;
  justify-content: center;
}
.menu {
  display: flex;
  gap: 40px;
  list-style: none;
}
.menu a {
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  color: #333;
  font-size: 14px;
  font-family: 'Codec Pro', sans-serif;
  transition: color 0.2s ease;
}
.nav {
  display: flex;
  justify-content: center;
}

/* ========== БУРГЕР (скрыт на ПК) ========== */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 101;
}
.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 2px;
  transition: 0.3s;
}
.burger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 40px 200px;
  display: flex;
  align-items: center;
  background: url("hero.png") no-repeat center center/cover;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
  padding-top: 80px;
  color: #1f1f1f;
}
.hero-content h1 {
  font-family: 'Postertoaster', sans-serif;
  font-size: 200px;
  font-weight: normal;
  line-height: 0.7;
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.45);
}
.hero-content h3 {
  font-family: 'Codec Pro', sans-serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 25px;
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.35);
}
.hero-content p {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 25px;
  line-height: 1.5;
}

/* ========== КНОПКИ ========== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  background: #ef7828;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
  margin-bottom: 20px;
  transition: 0.3s;
}
.btn:hover {
  background: #d05f18;
}

/* ========== СОЦСЕТИ ========== */
.socials {
  display: flex;
  gap: 12px;
}
.socials img {
  width: 28px;
  height: 28px;
  cursor: pointer;
  opacity: 0.8;
  transition: 0.3s;
  user-select: none;
  -webkit-user-drag: none;
}
.socials img:hover {
  opacity: 1;
}

/* ========== ABOUT ========== */
.about-section {
  padding: 100px 20px;
  background: inherit;
}
.about-row {
  max-width: 1600px;
  margin: 0 auto 80px;
  display: flex;
  align-items: start;
  gap: 60px;
}
.about-row:last-child {
  margin-bottom: 0;
}
.about-row.reverse {
  flex-direction: row-reverse;
}
.about-carousel {
  flex: 0 0 32%;
  max-width: 32%;
}
.carousel-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y pinch-zoom;
}
.carousel-track {
  display: flex;
  height: 100%;
  will-change: transform;
  cursor: grab;
}
.carousel-track:active {
  cursor: grabbing;
}
.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover {
  background: rgba(0,0,0,0.8);
}
.carousel-wrapper:hover .carousel-btn {
  opacity: 1;
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.about-text {
  flex: 1;
}
.about-text h2 {
  font-family: 'Postertoaster', sans-serif;
  font-size: 80px;
  font-weight: normal;
  margin-bottom: 30px;
  line-height: 1.1;
}
.about-text p {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 400;
}

/* ========== КАРУСЕЛЬ СЕРТИФИКАТОВ ========== */
.certificates-row {
  flex-direction: column;
  gap: 30px;
}
.certificates-header {
  width: 100%;
  text-align: left;
}
.certificates-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.certificates-wrapper {
  position: relative;
  width: 100%;
}
.certificates-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 10px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y; /* запрещаем браузеру перехватывать горизонтальные жесты */
}
.certificates-track::-webkit-scrollbar {
  display: none;
}
.certificate-card {
  flex: 0 0 calc((100% - 60px) / 4);
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: pointer;
}
.certificate-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.08);
}
.certificate-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
  user-select: none;
  -webkit-user-drag: none;
}
/* Кнопки для карусели сертификатов */
.certificates-wrapper .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.certificates-wrapper:hover .carousel-btn {
  opacity: 1;
}
.certificates-wrapper .carousel-btn:hover {
  background: rgba(0,0,0,0.8);
}
.cert-prev-btn {
  left: 10px;
}
.cert-next-btn {
  right: 10px;
}

/* ========== TRAINING ========== */
.training-section {
  padding: 100px 20px;
  background: inherit;
}
.training-container {
  max-width: 1600px;
  margin: 0 auto;
}
.section-title {
  font-family: 'Postertoaster', sans-serif;
  font-size: 80px;
  font-weight: normal;
  margin-bottom: 60px;
  line-height: 1.1;
  text-align: left;
}
.training-columns {
  display: flex;
  gap: 30px;
}
.training-col {
  flex: 1;
  background: rgba(255,255,255,0.03);
  padding: 40px 30px;
  border-radius: 16px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.training-col:hover {
  transform: translateY(-8px);
  background: rgba(255,255,255,0.06);
}
.training-col h3 {
  font-family: 'Codec Pro', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}
.training-col p {
  font-size: 16px;
  line-height: 1.6;
}

/* ========== CONTACTS ========== */
.contacts {
  padding: 100px 20px;
  background: inherit;
}
.contacts-card {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  background: rgba(255,255,255,0.03);
  border-radius: 24px;
  overflow: hidden;
}
.contacts-content {
  flex: 1;
  padding: 50px 40px;
}
.contacts-content h3 {
  font-family: 'Postertoaster', sans-serif;
  font-size: 48px;
  font-weight: normal;
  margin-bottom: 20px;
}
.contacts-content p {
  font-size: 18px;
  margin-bottom: 30px;
}
.contacts-buttons {
  margin-bottom: 30px;
}
.contacts-buttons .btn {
  margin-bottom: 0;
}
.contacts-socials {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}
.contacts-socials img {
  width: 32px;
  height: 32px;
  opacity: 0.8;
  transition: 0.3s;
}
.contacts-socials img:hover {
  opacity: 1;
}
.contacts-address {
  font-size: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
}
.contacts-map {
  flex: 1;
  min-height: 400px;
}
.contacts-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========== FOOTER ========== */
.footer {
  padding: 40px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: inherit;
}
.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  text-align: center;
  font-size: 14px;
}
.footer-inner p {
  margin-bottom: 12px;
}
.footer-inner a {
  text-decoration: none;
  transition: 0.3s;
}
.footer-inner a:hover {
  text-decoration: underline;
}

/* ========== COOKIE BANNER ========== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(0,0,0,0.9);
  color: #f5efe9;
  padding: 15px 20px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  z-index: 200;
  backdrop-filter: blur(5px);
  font-size: 14px;
  flex-wrap: wrap;
}
.cookie-banner button {
  background: #ef7828;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.cookie-banner button:hover {
  background: #d05f18;
}

/* ========== СВЕТЛАЯ ТЕМА ========== */
@media (prefers-color-scheme: light) {
  body {
    background: #f4efe9;
    color: #2c2c2c;
  }
  .menu a {
    color: #5a4b45;
  }
  .menu a:hover {
    color: #ef7828;
  }
  .burger span {
    background-color: #5a4b45;
  }
  .cookie-banner {
    background: rgba(244,239,233,0.95);
    color: #2c2c2c;
    border: 1px solid rgba(0,0,0,0.1);
  }
  .about-text h2,
  .section-title,
  .contacts-content h3 {
    color: #2c2c2c;
  }
  .about-text p,
  .training-col p,
  .contacts-content p,
  .contacts-address {
    color: #3a3a3a;
  }
  .training-col {
    background: rgba(0,0,0,0.03);
  }
  .training-col:hover {
    background: rgba(0,0,0,0.06);
  }
  .training-col h3 {
    color: #2c2c2c;
  }
  .contacts-card {
    background: rgba(0,0,0,0.03);
  }
  .contacts-address {
    border-top-color: rgba(0,0,0,0.1);
  }
  .footer {
    border-top-color: rgba(0,0,0,0.1);
  }
  .footer-inner {
    color: #5a4b45;
  }
  .footer-inner a {
    color: #5a4b45;
  }
  .footer-inner a:hover {
    color: #ef7828;
  }
  .btn {
    background: #ef7828;
    color: #fff;
  }
  .btn:hover {
    background: #d05f18;
  }
  /* Светлая тема для карточек сертификатов */
  .certificate-card {
    background: rgba(0,0,0,0.03);
  }
  .certificate-card:hover {
    background: rgba(0,0,0,0.06);
  }
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
  .hero {
    padding: 40px 60px;
  }
  .hero-content h1 {
    font-size: 120px;
  }
  .about-section {
    padding: 80px 20px;
  }
  .about-row {
    gap: 30px;
    margin-bottom: 60px;
  }
  .about-carousel {
    flex: 0 0 34%;
    max-width: 34%;
  }
  .about-text h2 {
    font-size: 60px;
  }
  .training-section {
    padding: 80px 20px;
  }
  .section-title {
    font-size: 60px;
  }
  .contacts {
    padding: 80px 20px;
  }
  .contacts-card {
    flex-direction: column;
  }
  .contacts-map {
    min-height: 300px;
  }
  .footer {
    padding: 40px 20px;
  }
  /* Адаптив сертификатов */
  .certificate-card {
    flex: 0 0 calc((100% - 40px) / 3);
  }
}

@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
    justify-content: flex-end;
  }
  .burger {
    display: flex;
    margin-left: auto;
  }
  .nav {
    justify-content: flex-end;
  }
  .menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: right 0.3s ease;
    z-index: 100;
    margin: 0;
    padding: 0;
  }
  .menu.active {
    right: 0;
  }
  .menu a {
    font-size: 18px;
    color: #f5efe9;
  }
  @media (prefers-color-scheme: light) {
    .menu {
      background: rgba(244,239,233,0.98);
    }
    .menu a {
      color: #2c2c2c;
    }
  }
  .hero {
    padding: 40px 20px;
    background-position: 75% center;
  }
  .hero-content h1 {
    font-size: 80px;
  }
  .hero-content h3 {
    font-size: 16px;
  }
  .about-section {
    padding: 80px 20px;
  }
  .about-row {
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
  }
  .about-row.reverse {
    flex-direction: column;
  }
  .about-carousel {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }
  .about-text {
    flex: auto;
  }
  .about-text h2 {
    font-size: 50px;
  }
  .about-text p {
    font-size: 16px;
  }
  .training-section {
    padding: 80px 20px;
  }
  .section-title {
    font-size: 50px;
    text-align: center;
  }
  .training-columns {
    flex-direction: column;
  }
  .training-col {
    text-align: center;
  }
  .contacts {
    padding: 80px 20px;
  }
  .contacts-content {
    padding: 40px 30px;
  }
  .contacts-content h3 {
    font-size: 36px;
  }
  .contacts-map {
    min-height: auto;
    aspect-ratio: 1 / 1;
  }
  .footer {
    padding: 30px 20px;
  }
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
  /* Адаптив сертификатов */
  .certificate-card {
    flex: 0 0 calc((100% - 20px) / 2);
  }
  .certificates-wrapper .carousel-btn {
    opacity: 1;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .cert-prev-btn { left: 5px; }
  .cert-next-btn { right: 5px; }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 60px;
  }
  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
  .about-section {
    padding: 60px 20px;
  }
  .about-text h2 {
    font-size: 40px;
  }
  .carousel-wrapper {
    border-radius: 12px;
  }
  .training-section {
    padding: 60px 20px;
  }
  .section-title {
    font-size: 40px;
  }
  .contacts {
    padding: 60px 20px;
  }
  .contacts-content h3 {
    font-size: 28px;
  }
  .contacts-content {
    padding: 30px 20px;
  }
  .contacts-map {
    aspect-ratio: 1 / 1;
  }
  /* Адаптив сертификатов */
  .certificate-card {
    flex: 0 0 100%;
  }
}
