/* ===== RESET ===== */
* {
  margin: 0;
  box-sizing: border-box;
}

body {
  background-color: #9e928c;
}

hr {
  width: 99%;
}

a {
  text-decoration: none;
  color: #fff;
  font-family: "Comfortaa", sans-serif;
}

/* ===== TYPOGRAPHY ===== */
h1 {
  font-family: "Dela Gothic One", sans-serif;
  font-size: 90px;
  text-transform: uppercase;
  color: #f0f0f0;
  letter-spacing: 6px;
}

h3,
h5,
p,
li {
  font-family: "Comfortaa", sans-serif;
  color: #f0f0f0;
}

h5 {
  font-size: 20px;
  margin-top: 10px;
}

span {
  font-family: "Comfortaa", sans-serif;
  color: #62b6ea;
}

/* ===== HEADER ===== */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

.header-image {
  width: 100%;
  height: 850px;
  object-fit: cover;
}

.by {
  font-family: "Meow Script";
  font-size: 30px;
  color: #ebe7e5;
  margin: 10px 0;
}

/* ===== COMMON ===== */
.heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 90px;
}

/* ===== ABOUT ===== */
.about_me {
  display: flex;
  gap: 30px;
  margin: 80px;
}

.about_me hr {
  width: 1px;
  border: 1.2px solid #fff;
  border-radius: 2px;
}

.about_me p {
  font-size: 20px;
}

.about_me h5 {
  font-size: 25px;
  margin-bottom: 10px;
}

.middle,
.right div {
  background-color: #8c807a;
  border-radius: 10px;
  text-align: center;
}

.middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 50px;
}

.middle hr {
  width: 30px;
}

.right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.right div {
  padding: 20px;
}

/* ===== COURSE INFO ===== */
.info_bloks {
  display: flex;
  justify-content: space-around;
}

.info_bloks > div {
  width: 390px;
  height: 400px;
  background-color: #8ab7c0;
  border: 2px solid #fff;
  border-radius: 20px;
  padding: 20px 30px;
  margin-top: 50px;

  display: flex;
  flex-direction: column;
  justify-content: space-around;
  text-align: center;
}

.info_bloks h5 {
  font-size: 25px;
  margin-bottom: 10px;
}

.info_bloks p {
  font-size: 16px;
}

.info_bloks hr {
  width: 30px;
  margin: 0 auto;
  border: 1.2px solid #fff;
  border-radius: 3px;
}

/* ===== PAYMENT ===== */
.blok_payment {
  display: flex;
  justify-content: space-around;
  margin-top: 150px;
}

.blok_payment hr {
  width: 1px;
}

.payment {
  width: 1000px;
  background-color: #8c807a;
  padding: 10px 30px;
  border-radius: 20px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.payment h5 {
  font-size: 30px;
  margin-bottom: 30px;
}

.payment li {
  font-size: 20px;
  margin: 0 0 9px 30px;
}

.dies_price {
  display: flex;
  justify-content: space-around;
}

.dies {
  width: 450px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.dies div {
  width: 160px;
  padding: 10px;
  text-align: center;
  background-color: #8ab7c0;
  border-radius: 10px;
  border: 1px solid #fff;
}

/* ===== PRICE ===== */
.price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price button {
  width: 200px;
  height: 70px;
  font-size: 25px;
  border-radius: 30px;
  cursor: pointer;

  background-color: #8ab7c0;
  color: #f0f0f0;
  border: 1px solid #fff;

  transition: 0.3s;
}

.price button:hover {
  background-color: #cfeef4;
  color: #000;
}

.price button:active {
  transform: scale(1.03);
}

.price p {
  font-size: 9px;
}

/* ===== QUESTIONS (FIXED HEADER + ANIMATION) ===== */
.questions {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 60px;
}

.answers > div {
  width: 900px;
  margin-top: 30px;
  background-color: #8c807a;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* шапка вопроса */
.answers > div img {
  position: absolute;
  left: 30px;
  top: 35px;
}

.answers > div h3 {
  font-size: 30px;
  text-align: center;
  padding: 30px 80px;
}

/* контейнер ответа */
.answer-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.2s, opacity 0.2s;
}

/* активное состояние */
.answers div.active .answer-content {
  max-height: 400px; /* запас под длинный текст */
  opacity: 1;
}

/* текст ответа */
.answer-content p {
  padding: 0 60px 30px;
  font-size: 18px;
}

.answer-content a {
  color: rgb(86, 86, 214);
}

/* стрелка */
.answers .arrow {
  transition: transform 0.3s ease;
}

.answers div.active .arrow {
  transform: rotate(180deg);
}

/* ===== IMAGE ===== */
.questions_photo {
  width: 30%;
}

/* ===== FOOTER ===== */
footer {
  margin-top: 250px;
  background-color: #8c807a;
}

.socials_container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 98%;
  margin-bottom: 30px;
}

.socials_container .by {
  margin-left: 80px;
}

.legal-pages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-pages a:hover {
  color: #62b6ea;
}

/* ===== LEGAL PAGES ===== */
.legal {
  max-width: 900px;
  margin: 80px auto 120px;
  padding: 0 40px;
}

.legal h1 {
  font-size: 48px;
  text-align: center;
  margin-bottom: 50px;
}

.legal h3 {
  font-size: 26px;
  margin: 40px 0 15px;
}

.legal p,
.legal li {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.legal ul {
  margin-left: 20px;
}

.legal a {
  color: #62b6ea;
  word-break: break-word;
}

.socials {
  width: 300px;
  margin-left: 30px;
  padding: 20px;
  gap: 20px;

  background-color: #8ab7c0;
  border-radius: 20px;
  border: 1px solid #fff;

  display: flex;
  flex-direction: column;
}

.socials div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.disclaimer {
  font-size: 9px;
  margin: 0 0 5px 9px;
}

.contacts p {
  margin-bottom: 10px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  color: #ebe7e5;

  background-color: #62b6ea;
  border-radius: 20px;
  padding: 20px;
  margin: 10px 0px 0px 10px;
  font-size: 18px;
}

/* =========================
   MOBILE ADAPTIVE (≤ 768px)
   ========================= */
@media (max-width: 768px) {
  /* ----- GLOBAL ----- */
  body {
    overflow-x: hidden;
  }

  h1 {
    font-size: 36px;
    letter-spacing: 2px;
    text-align: center;
  }

  h3 {
    font-size: 20px;
  }

  h5 {
    font-size: 18px;
  }

  p,
  li {
    font-size: 16px;
    line-height: 1.4;
  }

  hr {
    display: none;
  }

  /* ----- HEADER / HERO ----- */
  header {
    padding: 20px 10px;
  }

  .by {
    font-size: 24px;
  }

  .header-image {
    width: 95%;
    height: 420px;
    margin: 0 auto;
    border-radius: 20px;
    display: block;
  }

  /* ----- COMMON HEADINGS ----- */
  .heading {
    margin-top: 60px;
  }

  /* ----- ABOUT ----- */
  .about_me {
    flex-direction: column;
    margin: 40px 10px;
    gap: 20px;
  }

  .about_me img {
    width: 100%;
    border-radius: 20px;
  }

  .middle {
    padding: 20px;
    gap: 25px;
  }

  .middle p {
    font-size: 16px;
  }

  .right {
    gap: 20px;
  }

  .right p {
    font-size: 16px;
  }

  .right div {
    padding: 20px;
  }

  /* ----- COURSE INFO CARDS ----- */
  .info_bloks {
    flex-direction: row;
    align-items: stretch;
    gap: 16px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    padding: 10px 20px;
    position: relative;
  }

  .info_bloks hr {
    display: block;
    margin-top: 5px;
    margin-bottom: 5px;
  }

  .info_bloks::-webkit-scrollbar {
    display: none;
  }

  .info_bloks::after {
    animation: hintMove 1.5s ease-in-out infinite;
  }

  .info_bloks::before {
    animation: hintMove 1.5s ease-in-out infinite reverse;
  }

  .info_bloks > div {
    flex: 0 0 85%;
    max-width: 90%;
    height: auto;

    scroll-snap-align: center;
  }

  .info_bloks h5 {
    font-size: 20px;
  }

  .info_bloks p {
    font-size: 16px;
  }

  /* ----- PAYMENT BLOCK ----- */
  .blok_payment {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
  }

  .blok_payment img {
    width: 60%;
  }

  .payment {
    width: 95%;
    padding: 20px;
  }

  .payment h5 {
    font-size: 22px;
    text-align: center;
  }

  .payment li {
    font-size: 16px;
    margin-left: 20px;
  }

  .dies_price {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .dies {
    width: 100%;
    justify-content: center;
  }

  .dies div {
    width: 140px;
    font-size: 14px;
  }

  /* ----- PRICE ----- */
  .price {
    align-items: center;
    gap: 10px;
  }

  .price h1 {
    font-size: 32px;
  }

  .price button {
    width: 90%;
    height: 65px;
    font-size: 22px;
  }

  .price p {
    font-size: 10px;
    text-align: center;
  }

  /* ----- QUESTIONS / FAQ ----- */
  .questions {
    flex-direction: column;
    margin-top: 40px;
  }

  .questions_photo {
    width: 90%;
    margin-bottom: 20px;
  }

  .answers {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .answers > div {
    width: 95%;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
  }

  .answers > div h3 {
    font-size: 18px;
    padding: 20px 50px;
  }

  .answers > div img {
    top: 15px;
    left: 20px;
  }

  .answer-content p {
    padding: 0 30px 25px;
    font-size: 15px;
  }

  /* ----- FOOTER ----- */
  footer {
    margin-top: 150px;
  }

  .socials_container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .socials {
    width: 90%;
    margin: 30px auto;
  }

  .socials div {
    justify-content: center;
  }

  .disclaimer {
    text-align: center;
    margin: 10px;
  }

  .legal {
    margin: 40px auto 80px;
    padding: 0 20px;
  }

  .legal h1 {
    font-size: 30px;
    letter-spacing: 2px;
    margin-bottom: 30px;
  }

  .legal h3 {
    font-size: 20px;
    margin: 30px 0 12px;
  }

  .legal p,
  .legal li {
    font-size: 15px;
    line-height: 1.55;
  }

  .legal ul {
    margin-left: 16px;
  }
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #8c807a;
  border-radius: 22px;
  padding: 30px 25px;
  width: 90%;
  max-width: 420px;
  color: #f0f0f0;

  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: 0.35s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal h3 {
  text-align: center;
  font-size: 26px;
  margin-bottom: 5px;
}

.modal-subtitle {
  text-align: center;
  margin-bottom: 20px;
}

.modal-subtitle span {
  color: #62b6ea;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 26px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.modal label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 5px;
  margin-bottom: 15px;
}

.modal input[type="email"] {
  padding: 14px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-size: 16px;
  outline: none;
}

.modal input[type="email"]:focus {
  border-color: #62b6ea;
}

.checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.checkbox input {
  margin-top: 3px;
}

.checkbox a {
  color: #62b6ea;
  text-decoration: underline;
}

.modal-buy {
  margin-top: 20px;
  width: 100%;
  height: 55px;
  border-radius: 30px;
  font-size: 18px;
  background-color: #8ab7c0;
  color: #fff;
  border: 1px solid #fff;
  cursor: pointer;
  transition: 0.3s;
}

.modal-buy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #7b8f93;
  border-color: #7b8f93;
}

.modal-note {
  font-size: 10px;
  text-align: center;
  margin-top: 10px;
}

/* ЮР ИНФА */

.legal {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.legal h3 {
  margin-top: 30px;
}

.legal p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
}

.modal-step {
  display: none;
}

.modal-step.active {
  display: block;
}

.red {
  text-align: center;
}

/* loader — можно простой */
.loader {
  width: 40px;
  height: 40px;
  margin: 40px auto;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.access-box {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
}

.retry {
  margin-top: 20px;
  width: 100%;
  height: 55px;
  border-radius: 30px;
  font-size: 18px;
  background-color: #8ab7c0;
  color: #fff;
  border: 1px solid #fff;
  cursor: pointer;
  transition: 0.3s;
}
