/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  color: #333;
  text-align: center;
  background: linear-gradient(
    to top left,
    #3498db 20%,
    #2c3e50 80%
  ); /* Від синього до темно-синього */
  background-attachment: fixed;
}

header {
  margin-bottom: 2rem;
  width: 100%;
  background: white;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 4px;
}

.img_wrapper {
  display: flex;
  align-items: center;
}

.header_wrapper {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding-top: 25px;
  padding-bottom: 25px;
}

.logo {
  width: 170px;
  height: auto;
}

.line {
  color: #888888;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  margin: 0;
  text-align: right;
}

.intro-label {
  font-size: 20px;
  text-align: center;
}

.intro-text {
  padding-top: 20px;
  padding-bottom: 10px;
}

.warning {
  padding-top: 20px;
}

#welcome {
  background-color: #ffffff;
  color: #1a2e4b;
  max-width: 700px;
  margin: 50px auto;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 60, 120, 0.1);
  border-bottom: 8px solid #234871;
}

#welcome h1 {
  font-size: 26px;
  color: #234871;
}

#welcome .intro-text {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 15px;
}

#welcome p {
  font-size: 17px;
  margin-bottom: 12px;
}

#welcome .warning {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 12px 15px;
  border-radius: 6px;
  font-weight: 500;
}

#welcome .today-date {
  color: #dc3545;
}

.start-btn {
  background-color: #234871;
  color: white;
  border: none;
  padding: 14px 26px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

.start-btn:hover {
  background-color: #0056b3;
}

section {
  margin-top: 30px;
  max-width: 710px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 4px;
  border-radius: 10px;
  margin-bottom: 30px;
}

button {
  background-color: #007bff;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 1rem;
}

button:hover {
  background-color: #0056b3;
}

.hidden {
  display: none;
}

/* Плавний блок квізу */
#quiz {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#quiz.visible {
  opacity: 1;
  transform: translateY(0);
  margin-bottom: 30px;
}

/* Контейнер питання */
#questionBox {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#questionBox.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Відповіді */
#answers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

/* Кнопки */
.answer-btn {
  opacity: 0;
  transform: translateY(20px);
  background-color: #234871;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.3s;
}

.answer-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.answer-btn:hover {
  background-color: #5c82bc;
}

/* Loader */
.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #ccc;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.product-img {
  width: 200px;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  max-width: 1000px;
}

.product-image img {
  width: 280px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-details {
  flex: 1;
  min-width: 300px;
}

.product-details h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.product-benefits {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.product-benefits li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.product-message {
  font-weight: 500;
  margin: 1rem 0;
  line-height: 1.6;
}

.price-box {
  margin: 1rem 0;
  font-size: 1.4rem;
}

.original-price {
  font-size: 24px;
  transition: all 0.4s ease-in-out;
}

/* Перечеркування з плавною зміною кольору */
.original-price.line-through {
  text-decoration: line-through;
  color: #999;
}

.new-price {
  font-size: 26px;
  color: #d32f2f;
  margin-left: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  display: inline-block;
}

.new-price.visible {
  opacity: 1;
  transform: translateY(0);
}

.product-note {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1rem;
}

.more-btn {
  background-color: #234871;
  color: white;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 0px;
}

.more-btn:hover {
  background-color: #1b3554;
}

/* Mobile adaptation */
@media (max-width: 768px) {
  .product-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .product-details {
    text-align: center;
  }

  .product-benefits {
    text-align: left;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-intro {
  padding-top: 20px;
}

.modal-highlight {
  padding-top: 15px;
}

.modal-content {
  background-color: #fff;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
  position: relative;
  scroll-behavior: smooth;
}

.marker {
  list-style-type: none;
  padding-left: 0;
  margin-left: 0;
  padding-top: 10px;
  padding-left: 10px;
  padding-right: 10px;
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.25s ease;
  text-decoration: none;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.contact-btn {
  background-color: #234871;
}

.contact-btn:hover {
  background-color: #1a3456;
}
.ok-btn {
  background-color: #e63946; /* Яскравий червоний для приваблення уваги до знижки */
  color: #fff;
  border: none;
  padding: 14px 28px; /* Трохи збільшений padding для більшого вигляду */
  border-radius: 8px; /* Сучасні, трохи закруглені кути */
  font-size: 18px; /* Більший шрифт для кращої читабельності */
  font-weight: 700; /* Жирніший шрифт для акценту */
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(230, 57, 70, 0.4); /* Виразна тінь */
  transition: background-color 0.3s ease, transform 0.2s ease,
    box-shadow 0.3s ease;
}

.ok-btn:hover {
  background-color: #c72c3b; /* Трохи темніший червоний при наведенні */
  transform: translateY(-3px); /* Невеликий підйом кнопки */
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.5); /* Більш виразна тінь при наведенні */
}

.ok-btn:active {
  transform: translateY(0); /* Повернення до початкового стану при натисканні */
  box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}

/* Show modal */
.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-buttons .btn {
  flex: 1 1 40%;
  min-width: 140px;
  max-width: 200px;
  text-align: center;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0px;
  margin: 0px;
}

#order-form {
  background-color: #ffffff;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  max-width: 520px;
  margin: 3rem auto;
  font-family: "Segoe UI", sans-serif;
  border: 1px solid #e0e0e0;
}

.order-form {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.order-form.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-wrapper {
  display: flex;
  flex-direction: column;
}

.form-title {
  text-align: center;
  color: #234871;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  text-align: center;
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #333;
}

.form-group input {
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
  border-color: #234871;
  box-shadow: 0 0 0 3px rgba(35, 72, 113, 0.1);
  outline: none;
}

.submit-btn {
  padding: 1rem;
  background-color: #234871;
  color: white;
  font-size: 1.1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 1rem;
}

.input-error {
  border-color: #d32f2f !important;
  box-shadow: 0 0 5px rgba(211, 47, 47, 0.7);
}
.error {
  color: #d32f2f;
  font-size: 0.9rem;
  margin-top: 0.3rem;
  display: none;
}

.submit-btn:hover {
  background-color: #1a3456;
}

/* --- Анімація модалки --- */
.modal.show .modal-content {
  animation: modalFadeIn 0.4s ease forwards;
}

.floating-call-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: white;
  border: 2px solid #234871;
  color: #234871;
  padding: 12px 18px;
  border-radius: 50px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.floating-call-button:hover {
  background-color: #234871;
  color: white;
  transform: scale(1.05);
}

@keyframes modalFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Анімація появи нової ціни --- */
@keyframes priceBounce {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.new-price.animated {
  animation: priceBounce 0.6s ease;
}

@media screen and (max-width: 558px) {
  .header_wrapper {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media screen and (max-width: 768px) {
  .header_wrapper {
    padding-left: 15px;
    padding-right: 15px;
  }

  section {
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 60px;
  }

  .product-benefits li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-align: center;
  }

  #order-form {
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 60px;
  }

  #welcome {
    margin-left: 20px;
    margin-right: 20px;
  }

  .floating-call-button {
    padding: 6px 6px;
    font-size: 12px;
  }

  .modal-content {
    background-color: #fff;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
    position: relative;
    margin-left: 20px;
    margin-right: 20px;
    scroll-behavior: smooth;
  }

  .modal-title {
    font-size: 20px;
  }
}

@media screen and (max-width: 455px) {
  section {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .floating-call-button {
    bottom: 10px;
  }
}
