* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* чтобы шапка не закрывала */
section:target {
  scroll-margin-top: 80px;
}

.section-name {
  font-size: 36px;
}

body {
  font-family: sans-serif;
  line-height: 1.5;
  color: #222;
  background: linear-gradient(45deg, #c8deff, #f4e8ff);
}

img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

hr {
  border: none;
  height: 1px;
  background-color: #000;
  margin: 16px auto;
  width: 80%;
  opacity: 0.2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  width: 100%;
}

.hyperlink {
  color: #3b82f6;
  text-decoration: none;
  font-weight: bold;
}

/* шапка */
header {
  background: #c8deff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  color: #000;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 90%;
  margin: 0 auto;
  padding: 16px;
}

.logo {
  height: 50px;
  display: block;
}

nav ul {
  display: flex;
  list-style: none;
}

nav li {
  margin-left: 40px;
}

nav li:first-child {
  margin-left: 0;
}

nav a {
  font-size: 20px;
  font-style: bold;
  color: #000;
  text-decoration: none;
  transition: color 0.5s;
}

nav a:hover {
  color: #6e6ef0;
}

.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

/* главное */
.hero {
  padding-top: 80px;
}

.hero-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  max-width: 90%;
  margin: 0 auto;
  position: relative;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 40px;
  margin: 0 16px 16px 0;
  line-height: 1.2;
}

.hero-text p {
  font-size: 20px;
  margin: 16px 16px 16px 0;
}

.hero-image img {
  max-width: 100%;
  height: auto;
}

.hero-text,
.hero-image {
  flex: 1 1 50%;
  min-width: 300px;
}

.btn {
  display: inline-block;
  margin-top: 10px;
  padding: 20px 60px;
  font-size: 150%;
  font-weight: bold;
  background: #6e6ef0;
  color: white;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn:hover {
  background: #7d7dff;
}

/* о нас */
.about {
  padding: 0;
  text-align: center;
}

/* о нас - блок */
.about .benefit-grid {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 8px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.about .benefit-text p {
  margin-bottom: 12px;
  line-height: 1.6;
  font-size: 16px;
  text-align: left;
}

/* преимущества - блоки */
.benefits {
  padding: 0;
  text-align: center;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.benefit-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  min-height: 80px;
  height: 100%;
}

.benefit-icon {
  width: 28px;
  height: 28px;
  margin-right: 16px;
  flex-shrink: 0;
  fill: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit-text {
  text-align: left;
  font-size: 16px;
  line-height: 1.2;
}

.benefit-item:hover {
  transform: translateY(-4px);
}

/* отзывы */
.reviews {
  padding: 0;
  text-align: center;
}

.review-carousel {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  scroll-snap-type: x mandatory;
  padding: 16px 0;
  margin-bottom: 16px;
}

.review-carousel::-webkit-scrollbar {
  height: 8px;
  background-color: #ccc;
  border-radius: 4px;
}

.review-carousel::-webkit-scrollbar-track {
  background-color: #ccc;
  border-radius: 4px;
}

.review-carousel::-webkit-scrollbar-thumb {
  background-color: #666;
  border-radius: 4px;
}

.review-img {
  flex: 0 0 auto;
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: 20% center;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  scroll-snap-align: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.reviews p a:hover {
  text-decoration: underline;
}

/* модалка */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 12px;
}

.modal.show {
  display: flex;
}

.close {
  position: absolute;
  top: 20px;
  right: 32px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  z-index: 999;
}

.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 32px;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 999;
  display: none;
}

.modal-prev {
  left: 10px;
}

.modal-next {
  right: 10px;
}

#modal.show .modal-prev,
#modal.show .modal-next {
  display: block;
}

/* FAQ */
.faq {
  padding: 0;
  text-align: center;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.accordion-item {
  border-bottom: 2px solid rgba(110, 110, 240, 0.3);
  padding-bottom: 8px;
  transition: border-color 0.3s;
}

.accordion-item.active {
  border-color: #6e6ef0;
}

.accordion-header {
  background: none;
  border: none;
  width: 100%;
  padding: 16px 0;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  text-align: left;
}

.accordion-body {
  display: none;
  padding-bottom: 8px;
  padding-left: 4px;
  padding-right: 4px;
  color: #555;
  font-size: 16px;
}

.accordion-item.active .accordion-body {
  display: block;
}

/* футер */
footer {
  background: #111;
  color: #fff;
  padding: 16px;
  text-align: center;
}

footer nav a {
  color: #fff;
  margin: 0 8px;
  text-decoration: none;
}

footer nav a:hover {
  text-decoration: underline;
}

.burger {
  display: none;
  font-size: 28px;
  background: none;
  color: white;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 10px 10px 10px 16px;
  }

  .logo {
    height: 40px;
    max-width: 100%;
  }

  .section-name {
    font-size: 28px;
  }

  .header-container nav ul li a {
    color: #fff;
  }

  nav ul {
    flex-direction: column;
    background: #222;
    position: absolute;
    top: 60px;
    right: 10px;
    width: 40%;
    display: none;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 999;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    margin: 0;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  .burger {
    display: block;
    font-size: 28px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
  }

  .hero-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    left: 0 !important;
  }

  .hero-text h1 {
    font-size: 28px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .btn {
    padding: 12px 36px;
  }

  .hero-image img {
    width: 100%;
    max-width: none;
  }

  .about .benefit-text p {
    font-size: 14px;
  }

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

  .review-img {
    width: 120px;
    height: 120px;
  }

  .modal-prev,
  .modal-next {
    display: none !important;
  }
}