@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap");

* {
  scroll-behavior: smooth;
}

body {
  font-family: Manrope;
  color: #9d9d9b;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -1px;
  background: #10100f;
}

.container {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  margin-top: 60px;
  margin-bottom: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 20px;
  z-index: 15;
}

.header__container {
  border-radius: 24px;
  border: 1px solid #2a2a27;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 35px;
  background: rgba(16, 16, 15, 0.3);
  backdrop-filter: blur(10px);
}

.header .logo {
  aspect-ratio: 1/1;
  width: 40px;
  height: 40px;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 35px;
  color: #e1e1e1;
  font-weight: 600;
}

.navbar .btn {
  padding: 5px 10px;
}

.btn {
  font-weight: 600;
  color: #1a1a18;
  display: flex;
  padding: 7px 15px;
  background: #fff;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #c7f829;
  scale: 0.95;
  cursor: pointer;
}

.btn.main {
  background: #c7f829;
}

.btn.main:hover {
  background: #fff;
  color: #1a1a18;
}

.navbar__item {
  padding: 5px 10px;
  transition: all 0.3s ease;
}

.navbar__item:hover {
  color: #c7f829;
  cursor: pointer;
}

.home {
  margin-bottom: 90px;
}

.home__container {
  display: flex;
  max-width: 935px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 50px;
}
.home__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
  align-self: stretch;
}

.home__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  align-self: stretch;
}

h1 {
  color: #fff;
  text-align: center;
  font-size: 72px;
  font-weight: 700;
  line-height: 110%;
  letter-spacing: -1.8px;
}

.home__text p {
  text-align: center;
  font-size: 24px;
}

.green {
  color: #c7f829;
}

.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.buttons span {
  color: #5a5a57;
  font-size: 18px;
}

.countries {
  display: flex;
  max-width: 750px;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 23px 10px;
  flex-wrap: wrap;
}

.countries li {
  border-radius: 30px;
  background: #2a2a27;
  display: flex;
  padding: 8px;
  justify-content: center;
  align-items: center;
  gap: 5px;
  text-align: center;
  leading-trim: both;
  text-edge: cap;
}

.countries .flag {
  width: 30px;
  height: 30px;
  aspect-ratio: 1/1;
}

.calculator {
  margin-bottom: 90px;
  padding: 50px 0;
  background: #141413;
}
.calculator__container {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}
.calculator__main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

h2 {
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1.8px;
}

section header:nth-child(1) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  align-self: stretch;
}

.inputs {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

label {
  color: #9d9d9b;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.5px;
}

.input__wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  align-self: stretch;
}
.field {
  border-radius: 16px;
  border: 1px solid #2a2a27;
  background: #10100f;
  display: flex;
  padding: 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: space-between;
}

/* ===== Custom select dropdown ===== */

.field {
  position: relative; /* чтобы дропдаун можно было позиционировать рядом */
}

.select__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;

  border-radius: 14px;
  border: 1px solid #2a2a27;
  background: #10100f;

  padding: 6px;
  display: none;
  z-index: 50;

  max-height: 280px;
  overflow: auto;
}

.select__dropdown.is-open {
  display: block;
}

.select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  width: 100%;
  padding: 12px 10px;
  border-radius: 10px;

  cursor: pointer;
  user-select: none;
}

.select__option:hover,
.select__option[aria-selected="true"] {
  background: rgba(199, 248, 41, 0.12);
}

.select__option .left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.select__option .flag {
  width: 20px;
  height: 20px;
}

/* маленький текст-код справа */
.select__option .code {
  color: #cfcfca;
  font-size: 14px;
}

/* Поворот стрелки у селекта */
.select svg {
  transition: transform 200ms ease;
}

.select.is-open svg {
  transform: rotate(180deg);
}

.select {
  border-radius: 12px;
  border: 1px solid #2a2a27;
  background: #10100f;
  display: flex;
  padding: 12px;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.select .currency {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-align: center;
  font-size: 18px;
  line-height: 110%;
}

input {
  color: #fff;
  font-size: 24px;
  width: 80%;
}

.select .flag {
  width: 20px;
  height: 20px;
  aspect-ratio: 1/1;
}

input::placeholder {
  color: #5a5a57;
}

.field:has(input#give:focus) {
  border: 1px solid #c7f829;
}

.input__wrap:nth-child(2) {
  cursor: not-allowed;
}

.calculator__currencies {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
}

.currency__item {
  display: flex;
  padding: 20px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  background: #10100f;
  width: 100%;
}
.rate {
  color: #fff;
  width: 100%;
  text-align: center;
}
.currency__info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: #fff;
}

.currency__info .flag {
  width: 25px;
  height: 25px;
  aspect-ratio: 1/1;
}

.about {
  margin-bottom: 90px;
}

.about__container {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.about__items {
  display: flex;
  align-items: center;
  gap: 14px;
  align-self: stretch;
}

.about__item {
  display: flex;
  padding-bottom: 40px;
  flex-direction: column;
  align-items: center;
  border-radius: 24px;
  background: linear-gradient(180deg, #141413 0%, #10100f 50%, #141413 100%);
  width: 100%;
}

.about header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 40px 20px;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

h3 {
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1.8px;
}

.reviews {
  margin-bottom: 90px;
}

.reviews__container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
}
.reviews__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  width: 100%;
}

.line {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  overflow: hidden;
}

.review__item {
  border-radius: 24px;
  background: #141413;
  display: flex;
  width: 470px;
  padding: 40px 20px;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  align-self: stretch;
}

.review__item p {
  height: 100%;
}

.stars {
  display: flex;
  align-items: center;
  gap: 14px;
}

.faq {
  margin-bottom: 90px;
}

.faq__container {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.faq__list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  width: 100%;
}

.faq__item {
  width: 100%;
  border-radius: 24px;
  background: #141413;
  display: flex;
  padding: 20px 30px;
  position: relative;
  gap: 14px;
  cursor: pointer;
}

.answer {
  border-radius: 0 0 24px 24px;
  background: #141413;
  padding: 20px 30px;
  width: 100%;
  position: absolute;
  top: 90%;
  left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    visibility 220ms ease;
  pointer-events: none; /* чтобы скрытый блок не ловил мышку */
}

.faq__item.is-open .answer {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.faq__item.is-open {
  z-index: 10;
}

.question {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #e1e1e1;
  font-size: 24px;
}

.question svg {
  flex-shrink: 0;
}

.footer {
  margin-bottom: 60px;
}

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

.footer__container div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  align-self: stretch;
}

.footer ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer li {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-size: 16px;
}

.footer ul:nth-child(3) {
  align-items: flex-end;
}

@media (max-width: 1200px) {
  /* .header__container {
    gap: 25px;
  }

  .navbar {
    gap: 25px;
  }

  h1 {
    font-size: 60px;
  }

  h2 {
    font-size: 40px;
  }

  h3 {
    font-size: 24px;
  } */

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

  .about__items {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .about__item:nth-child(3) {
    grid-column: span 2;
  }

  .calculator__container {
    flex-direction: column;
  }

  .footer__container {
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
  }

  .footer ul:nth-child(3) {
    align-items: flex-start;
  }
}

@media (max-width: 850px) {
  .navbar__item {
    display: none;
  }

  .navbar__item:nth-child(6) {
    display: flex;
  }

  .home {
    padding-top: 60px;
  }

  .header {
    top: auto;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    margin-bottom: 0;
  }

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

  .about__item:nth-child(3) {
    grid-column: auto;
  }

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

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

@media (max-width: 550px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }

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

  .home__text p {
    font-size: 20px;
  }

  body {
    font-size: 18px;
  }

  .home,
  .calculator,
  .reviews,
  .about,
  .faq {
    margin-bottom: 60px;
  }

  section header:nth-child(1) {
    gap: 10px;
  }

  input {
    font-size: 20px;
  }

  .about__container,
  .calculator__container,
  .faq__container {
    gap: 20px;
  }

  .reviews__container {
    margin-bottom: 20px;
  }

  input {
    width: 60%;
  }

  input::placeholder {
    font-size: 18px;
  }

  .review__item {
    width: 90vw;
  }
}
