@import url("fonts.css");

:root {
  --primary-color: #e71e62;
  --secondary-color: #7c7c7c;
}

h1,
p {
  margin: 0;
}

body {
  font-family: "Quastrial-Regular";
  font-weight: 400;
  margin: 0;
  padding: 0;
}

header .container {
  margin-bottom: 16px;
}

.logo-mobile {
  display: none;
  height: 30px;
}
.logo-desktop {
  display: block;
}

.container {
  width: 100%;
  max-width: 1312px;
  margin: auto;
}

.hero-flex {
  background-color: #F8F8F8;
}

.header {
  display: flex;
  justify-content: space-between;
}

.header-menu_top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 21px;
}
.header-menu_top div {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 24px;
}
.header-menu_top div:nth-last-child(1) {
  padding-right: 0;
}
.header-menu_buttom {
  display: flex;
  justify-content: end;
}
.header-menu_buttom img {
  padding-right: 24px;
}
.header-menu_buttom img:nth-last-child(1) {
  padding-right: 0;
}

.header-underline {
  display: flex;
  justify-content: center;
  color: #fff;
  padding: 8px 0;
  background-color: var(--primary-color);
}

.form-container {
  background: #fff;
  margin-top: 45px;
  padding: 24px;
  max-width: 486px;
  width: 100%;
  height: 580px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  max-height: none;
  overflow-y: visible;
}

form .subtitle {
  margin-bottom: 8px;
  font-size: 19px;
  text-decoration: none;
  color: #333333;
}

.title {
  font-weight: 400;
  font-size: 25px;
  margin-bottom: 4px;
  color: #333;
  line-height: 1.2;
}

.price-row {
  margin-bottom: 24px;
}

.price-new {
  color: #e71e62;
  font-size: 26px;
  margin-right: 10px;
}

.price-old {
  color: #878787;
  font-size: 26px;
  text-decoration: line-through;
}

form input,
form select {
  width: 100%;
  padding: 13px 22px;
  margin-bottom: 12px;
  border: 1px solid #bbb;
  border-radius: 3px;
  font-size: 17px;
  box-sizing: border-box;
  outline: none;
  transition: border 0.2s;
}

form input:focus,
form select:focus {
  border-color: #e6005c;
}

.row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
}

.row input,
.row .country-code,
.row .country-select {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 12px;
}

.row .country-select {
  margin-bottom: 0 !important;
}

.country-code {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 0 12px;
  background: #fafafa;
  min-width: 90px;
  margin-bottom: 16px;
}

.country-code label {
  width: 81px;
  font-size: 12px;
  color: #888;
  margin-top: 8px;
}

.country-code span {
  font-size: 16px;
  color: #222;
  margin-bottom: 8px;
}

.country-select {
  flex: 1;
  position: relative;
}

/* --- CUSTOM COUNTRY SELECT DESIGN --- */
.country-select::before,
.country-select::after {
  display: none; /* убираем старые декоративные элементы */
}

.country-select label {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: #28282899; /* 60% opacity */
  position: absolute; /* помещаем текст внутрь поля */
  top: 5px;
  left: 22px;
  pointer-events: none;
  margin: 0;
}

.country-select select {
  /* оставляем только SVG-стрелку 24×24 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5 8l7 8 7-8' stroke='%23222' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center; /* стрелка */
  background-size: 24px 24px;
  height: 45px;
  padding: 17px 60px 5.5px 22px; /* верхний padding 17px -> примерно 12px между label и значением */
  line-height: 24px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

button[type="submit"] {
  width: 100%;
  background: #222;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  padding: 14px 0;
  border: none;
  border-radius: 3px;
  margin-top: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

button[type="submit"]:hover {
  background: #e6005c;
}

/* mistery-box */

.mystery-box-container {
  background: #f8f8f8;
  padding-left: 32px;
  padding-right: 32px;
  width: 733px;
  max-width: 733px;
  height: auto;
  margin-bottom: 24px;
}

.mystery-box-container h2 {
  font-weight: 400;
  text-align: center;
  color: #444;
  padding-bottom: 20px;
  border-bottom: 1px solid #efefef;
}

.mystery-box-content h3 {
  margin-bottom: 18px;
  color: #222;
}

.mystery-box-content p {
  margin-bottom: 18px;
}

.mystery-box-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 35px;
}

.mystery-box-content ul li {
  position: relative;
  padding-left: 24px;
}

.mystery-box-content ul li::before {
  content: "●";
  color: #e85ca7;
  position: absolute;
  left: 0;
  font-size: 1.1em;
  top: 0;
}

.subtitle {
  font-size: 14px;
  text-decoration: underline;
  color: #222;
}

.card {
  text-align: center;
  height: 375px;
}

.card p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.wrapper {
  display: flex;
  gap: 24px;
}

.wrapper .box:nth-child(1) .card {
  border: 8px dashed var(--primary-color);
}

.wrapper .box:nth-child(2) .card {
  border: 8px solid var(--primary-color);
  padding-left: 50px;
  padding-right: 50px;
}

.wrapper .box:nth-child(3) .card {
  border: 8px dotted var(--primary-color);
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.newsletter-form input {
  border: 1px solid #ddd;
  padding: 10px;
  outline: none;
  font-size: 14px;
  width: 200px;
}

.newsletter-form button {
  border: 1px solid #ddd;
  padding: 10px 16px;
  background: white;
  color: #e91e63; /* розовый */
  cursor: pointer;
  font-size: 14px;
}

/* Advantages section */
.advantages-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 44px 0 100px 0;
  flex-wrap: wrap;
}
.advantage-col {
  flex: 1 1 300px;
  min-width: 220px;
  max-width: 100%;
  text-align: center;
  margin-bottom: 24px;
}
.advantage-col .advantage-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.advantage-col .advantage-line {
  width: 43px;
  height: 2px;
  background: #e71e62;
  opacity: 0.4;
  margin-top: 16px;
  border-radius: 1px;
}
.advantage-col .advantage-icon {
  height: 32px;
  width: 32px;
  opacity: 0.7;
  margin: 0 38px;
}
.advantage-col .advantage-title {
  font-weight: 600;
  color: #222;
  margin-bottom: 20px;
}
.advantage-col .advantage-desc {
  color: #777;
  font-size: 15px;
}

.footer {
  background: #fff;
  padding-bottom: 30px;
}
.footer-container {
  display: flex;
  gap: 30px;
  width: 100%;
}
.footer-col {
  min-width: 204px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 24px;
}
.footer-title {
  margin-bottom: 22px;
  color: #222;
  font-size: 16px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  color: #222;
  margin-bottom: 2px;
}
.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.footer-social-icon {
  width: 32px;
  height: 28px;
}
.footer-social-icon:hover {
  opacity: 0.7;
}

.section-line {
  width: 42px;
  height: 1px;
  background: #e71e62;
  opacity: 0.2;
  margin: 8px auto 0 auto;
  border-radius: 1px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-bottom: 18px;
}
.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: #222;
  text-align: center;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.box {
  width: 100%;
  margin: 0 auto 24px auto;
}

@media (max-width: 900px) {
  .wrapper,
  .advantages-row,
  .footer-container {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }
  .box,
  .advantage-col,
  .footer-col,
  .mystery-box-container,
  .form-container {
    width: 100%;
    margin: 0 auto 24px auto;
  }
  .advantages-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .box,
  .advantage-col,
  .footer-col,
  .mystery-box-container,
  .form-container {
    width: 100%;
    margin: 0 auto 24px auto;
  }
  .newsletter-form {
    gap: 0px;
    width: 100%;
    justify-content: center;
  }
  .form-container {
    padding: 12px;
    padding-top: 16px;
  }
  .mystery-box-container {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 1250px) {
  .header-underline {
    font-size: 12px;
  }
  .logo-desktop {
    display: none;
  }
  .logo-mobile {
    display: block;
    max-width: 160px;
  }
  .container {
    padding: 0 12px;
    margin: 0 auto;
  }
  .header-menu_top {
    display: none;
  }
  .hero-flex,
  .mystery-flex {
    flex-direction: column !important;
    align-items: center !important;
  }
  .hero-flex img,
  .mystery-flex img {
    order: 1;
    display: block;
    max-width: 100%;
    height: auto;
  }
  .title {
    font-size: 20px;
  }
  form .subtitle {
    font-size: 14px;
  }
  .hero-flex img {
    margin-right: 0 !important;
  }
  .hero-flex .form-container,
  .mystery-flex .mystery-box-container {
    order: 2;
    width: 100%;
    margin: 0 auto 24px auto;
    max-width: none;
  }
  .hero-flex .form-container {
    padding-left: 16px;
    padding-right: 16px;
    margin-left: 0;
    margin-right: 0;
  }
  button[type="submit"] {
    margin-top: 16px;
  }
  .section-title-row {
    gap: 10px;
  }
  .footer-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
  }
  .footer-col {
    width: 204px;
    max-width: 100%;
    text-align: center;
    margin: 0;
  }
  .footer-socials {
    justify-content: center;
  }
  .footer-col img {
    display: block;
    margin: 0 auto;
  }
  .wrapper {
    flex-wrap: wrap;
  }
  .wrapper .box {
    width: 321px;
  }
  .wrapper .box:nth-child(3) .card > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-flex {
    padding: 0;
  }
  .hero-flex .form-container {
    width: 100%;
    max-width: none;
  }
  .hero-img-wrapper {
    width: 460px !important;
    height: 350px !important;
    background: none !important;
    margin-right: 0 !important;
    position: relative;
  }
  .hero-img-mobile {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .hero-img-wrapper .hero-text {
    display: none;
  }
  .newsletter-form {
    gap: 0;
  }
  .container.hero-flex {
    padding-left: 0;
    padding-right: 0;
  }
}

/*****************************/
/* GLOBAL BOX-SIZING */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/*****************************/

.hero-img-wrapper {
  width: 733px;
  height: 670px;
  background: url("../img/hero_img.jpg") no-repeat center/cover;
  position: relative;
  margin-right: 63px;
}
.hero-img-wrapper .hero-text {
  position: absolute;
  top: 50px; 
  left: 50%;
  transform: translateX(-50%); 
  color: #333333; 
  text-align: left; 
}
.hero-img-wrapper .hero-text h2 {
  font-size: 36px;
  margin: 0;
  font-weight: 400;
}
.hero-img-wrapper .hero-text p {
  font-size: 20px;
  margin: 0;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- INPUT FONT OVERRIDE --- */
input,
select {
  font-family: "Inter-Regular", sans-serif;
  height: 45px;
}

/* --- PHONE ROW STYLE REWORK --- */
.phone-row {
  display: flex;
  height: 45px;
  border: 1px solid #bbb;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}

.phone-row .country-code {
  width: 78px;
  min-width: 78px;
  flex: 0 0 120px;
  height: 45px;
  padding: 0 24px 0 22px;
  background: white;
  border: none;
  position: relative;
}

.phone-row .country-code span {
  font-family: "Inter-Regular", sans-serif;
  font-size: 16px;
}

.phone-row .country-code::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  right: 0;
  width: 1px;
  background: #ddd;
}

.phone-row input[type="tel"] {
  flex: 1;
  padding: 5.5px 24px;
  font-family: "Inter-Regular", sans-serif;
  font-size: 17px;
  color: #282828;
  height: 100%;
  border: none;
}

/* default hide mobile image */
.hero-img-mobile {
  display: none;
}

/* --- CUSTOM SELECT --- */
.native-select {
  display: none;
}
.custom-select {
  position: relative;
  height: 45px;
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 17px 60px 5.5px 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.cs-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.cs-list {
  position: absolute;
  padding: 0;
  margin: 0;
  left: 0;
  right: 0;
  top: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #bbb;
  display: none;
  z-index: 20;
}
.cs-list li {
  display: flex;
  align-items: center;
  padding: 12px 22px;
  gap: 8px;
  border-bottom: 1px solid #DDDCDC;
  cursor: pointer;
}
.cs-list li:hover,
.cs-list li.selected {
  background: #ff4f9a;
  color: #fff;
}
.custom-select.open .cs-list {
  display: block;
}
