/* ==========================================================================
   НейСі-3М — clean independent stylesheet
   ========================================================================== */

:root {
  --black: #14151c;
  --surface: #1b1d29;
  --brand: #0827ad;
  --brand-light: #281ca5;
  --coral: #ff8946;
  --alice-blue: #f5fbfc;
  --slate-grey: #a8abba;
  --white: #ffffff;
  --ink: #211f54;
  --shadow: 0 14px 42px rgba(10, 11, 20, 0.35);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1218px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--black);
  background-image: url("../assets/img/bg-waves.svg");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------- Header ------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(20, 21, 28, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo img {
  height: 40px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: 36px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--coral);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ------------------------------------ Hero -------------------------------- */

.hero {
  position: relative;
  padding: 168px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  opacity: 0.55;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 39, 173, 0.55), rgba(20, 21, 28, 0.92));
  mix-blend-mode: multiply;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-copy h1 {
  font-size: 64px;
  line-height: 1;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--white);
}

.hero-copy .lead {
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--alice-blue);
  margin: 0 0 36px;
  max-width: 520px;
}

.hero-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ------------------------------------ Buttons ----------------------------- */

.btn {
  display: inline-block;
  border-radius: var(--radius-sm);
  padding: 20px 40px;
  font-size: 18px;
  font-weight: 600;
  transition: transform 0.25s, background-color 0.25s;
}

.btn-primary {
  background-color: var(--brand);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--coral);
  transform: translateY(-3px);
}

/* ------------------------------------ Features ---------------------------- */

.features {
  padding: 60px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background-color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 7px rgba(20, 20, 43, 0.06);
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 140px;
}

.feature-card h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: var(--white);
}

/* ------------------------------------ Sections ---------------------------- */

.section {
  padding: 90px 0;
}

.section-title {
  color: var(--alice-blue);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 48px;
}

.section-title.center {
  text-align: center;
}

.subsection-title {
  color: var(--alice-blue);
  font-size: 26px;
  font-weight: 700;
  margin: 64px 0 40px;
}

/* --------------------------------- Featured media --------------------------- */

.featured-media {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.video-embed {
  position: relative;
  padding-top: 56.17%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.featured-media-copy h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--alice-blue);
  margin: 0 0 12px;
}

.featured-media-copy p {
  color: var(--slate-grey);
  margin: 0;
}

/* --------------------------------- Media grid -------------------------------- */

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 28px;
  row-gap: 56px;
}

.media-card {
  display: block;
}

.media-card .video-embed {
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.media-card-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.media-card-image img {
  width: 100%;
  aspect-ratio: 640 / 360;
  object-fit: cover;
}

.media-card h4 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--alice-blue);
  margin: 0 0 8px;
}

.media-card p {
  font-size: 14px;
  color: var(--slate-grey);
  margin: 0;
}

/* ----------------------------------- Carousels ------------------------------- */

.carousel {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.carousel-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 24px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.carousel-arrow {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.carousel-arrow:hover {
  background-color: var(--brand);
  transform: scale(1.05);
}

.carousel-arrow img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

.testimonial-item {
  width: 260px;
}

.testimonial-item video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.cert-item {
  width: 340px;
}

.cert-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  cursor: zoom-in;
  box-shadow: var(--shadow);
}

.cert-thumb img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* -------------------------------------- Docs --------------------------------- */

.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.doc-card {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}

.doc-card:hover {
  transform: translateY(-4px);
}

.doc-card img {
  width: 100%;
  object-fit: cover;
}

/* ------------------------------------- Contact ------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  margin-top: 8px;
}

.contact-block p {
  color: var(--slate-grey);
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
}

.contact-block a {
  color: var(--alice-blue);
  text-decoration: underline;
  text-decoration-color: rgba(245, 251, 252, 0.35);
}

.contact-block a:hover {
  color: var(--coral);
}

.contact-block strong {
  color: var(--white);
}

/* ------------------------------------- Footer -------------------------------- */

.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  justify-content: center;
}

.footer-inner .logo img {
  height: 32px;
  opacity: 0.8;
}

/* ------------------------------------- Lightbox ------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 20, 0.9);
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ------------------------------------- Responsive ------------------------------- */

@media (max-width: 991px) {
  .hero-copy h1 {
    font-size: 52px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-media {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .header-inner {
    height: 72px;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 16px 24px 28px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }

  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 18px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: 128px 0 56px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

  .media-grid {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 30px;
  }

  .docs-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
