/* Define custom font */
@font-face {
  font-family: "FrutigerLTArabic65Bold";
  src: url("fonts/FrutigerLTArabic65Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
}

/* Custom quiz container scaling */
.custom-quiz-container {
  transform: scale(0.88);
  transition: transform 0.5s ease;
}

.custom-quiz-container.normal-scale {
  transform: scale(1);
}

* {
  box-sizing: border-box;
}

/* Question counter styles */
.question-counter {
  position: absolute;
  top: 15px;
  left: 15px;
  color: white;
  font-size: 16px;
  font-family: "FrutigerLTArabic65Bold";
  z-index: 10;
}

/* Question transition animations - reverting to previous values but keeping fixes */
@keyframes slideInRight {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  70% {
    transform: translateX(-5%);
  }
  85% {
    transform: translateX(2%);
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Fade in animation for info sections */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-in-right {
  animation: slideInRight 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
  animation-fill-mode: forwards;
}

/* Modern styling for answer options */
.modern-option {
  display: block;
  position: relative;
  margin-bottom: 10px;
  padding: 10px 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  width: 100%;
  text-align: right;
}
.modern-option span {
  color: #fff;
}
.modern-option:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.modern-option input[type="radio"],
.modern-option input[type="checkbox"] {
  visibility: hidden;
  margin-left: 24px;
  margin-right: -10px;
}

.modern-option input[type="radio"]::before {
  content: "";
  visibility: visible;
  display: inline-block;
  background: #ddd;
  background-clip: content-box;
  width: 26px;
  height: 26px;
  border: 3px solid #ccc;
  padding: 5px;
  box-sizing: border-box;
  transition: all 0.4s linear;
  vertical-align: middle;
  margin-right: 10px;
  position: unset;
  border-radius: 50px;
}

.modern-option input:checked + span {
  font-weight: bold;
}

.modern-option.selected {
  background-color: rgba(77, 190, 166, 0.3);
  border-color: #4dbea6;
}

/* Two-option questions - single column layout */
.two-options-layout {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 15px !important;
  grid-template-columns: unset !important;
  margin: 20px auto 30px !important;
}

#optionsC > div {
  width: 100%;
}

.swiper {
  width: 100%;
  height: fit-content;
  min-height: 280px;
  display: flex;
  align-items: center;
  overflow: auto !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

/* Apply custom font to buttons and inputs */
button,
input {
  font-family: "FrutigerLTArabic65Bold" !important;
}

/* General container styles */
#qcc {
  padding: 0px 0px;
  max-width: 1205px;
  margin: 0 auto;
  height: auto;
  position: relative;
  min-height: 275px;
  border-radius: 10px;
}

.home-bg {
  background-image: url("../assets/images/ht-COVER.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#qc {
  font-family: "FrutigerLTArabic65Bold";
  direction: rtl;
  text-align: right;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 278px;
  border-radius: 10px;
  background-color: #492674;
  overflow-x: hidden;
}

/* Add transparent background when showing results */
#qc.showing-results {
  background-color: transparent;
}

#error-message,
#error-message-two {
  font-size: 13px;
  color: #f30f0f;
  background-color: #fff;
  display: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: 0.4s all;
}
#questions {
  width: 100%;
  height: 95%;
  background-color: #492674;
  margin: 10px;
  align-items: center;
  justify-content: center;
  padding-left: 20px;
  padding-right: 20px;
  min-height: 300px;
}

/* Question styles */
.question {
  margin-bottom: 20px;
  min-width: 75%;
  max-width: 76%;
}

.question p {
  text-align: center;
  color: #fff;
  font-size: 20px;
  margin-top: 40px;
}

/* Result styles */
.result {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 0px 15px;
  gap: 15px;
}

.result-txt {
  color: #fff;
  font-size: 20px;
  text-align: start;
}

.result-img {
  width: 1050px !important;
  margin: 0 auto !important;
  display: inline-block;
  border-radius: 10px; /* Adding border radius to result images */
}

/* Updated swiper navigation styles for results */
.results-swiper .swiper-button-next,
.results-swiper .swiper-button-prev {
  top: auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.swiper-pagination {
  display: none !important;
}

.results-swiper .swiper-button-next:after,
.results-swiper .swiper-button-prev:after {
  font-size: 30px;
  font-weight: 900;
  color: #289ab4;
}

/* Advice image styles */
.advice-img {
  width: 100%;
  min-width: 300px;
}

#banner-img {
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 300px;
}

/* Start button styles */
#next-button {
  width: 150px;
  height: 45px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Banner styles */
#home-banner {
  width: fit-content;
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: -80px;
}

.start-button-wrapper {
  padding: 2px;
  width: 220px;
  background-color: #492674;
  border-radius: 10px;
  transition: 0.3s;
}
.start-button-wrapper:hover {
  background-color: #402363;
}
#start-btn {
  background-color: rgba(255, 0, 0, 0);
  width: 100%;
  height: 50px;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 20px;
}

/* Options container styles */
#optionsC,
.optionsC {
  margin-top: 44px;
  font-size: 18px;
  line-height: 36px;
  letter-spacing: 1.4px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 120px;
  row-gap: 35px;
  text-align: center;
  align-items: baseline;
}

/* User info styles */
#userInfo,
.userInfo {
  flex-direction: column;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 14px 68px;
  min-height: 300px;
  border-radius: 10px;
}

.userInfo .input-section {
  grid-template-columns: repeat(2, 1fr);
  column-gap: 80px;
  margin-top: 15px;
  font-size: 18px;
  line-height: 36px;
  letter-spacing: 1.4px;
  display: grid;
  row-gap: 35px;
}

#userInfo .input-section {
  grid-template-columns: repeat(1, 1fr);
  width: 300px;
}

#section-c .input-section {
  grid-template-columns: repeat(3, 1fr);
}

#userInfo label,
.userInfo label {
  font-size: 18px;
  color: #fff;
}

.userInfo input[type="text"],
.userInfo input[type="number"],
.userInfo select {
  width: 100%;
  padding: 8px;
  height: 44px;
  font-size: 100%;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  margin-top: 10px;
  font-family: "FrutigerLTArabic65Bold";
}

#userInfo button,
.userInfo button {
  padding: 10px 50px;
  background-color: #4dbea6;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  font-size: 18px;
  transition: 0.3s;
}

#chooseTest > div > div > label {
  color: #fff;
}

#userInfo button:hover,
.userInfo button:hover {
  background-color: #46a7b4;
}

/* Title styles */
.title {
  color: #fff;
  font-size: 32px;
  display: flex;
  flex-direction: column;
  margin: 0px;
}

.result {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: start;
}

.tip {
  color: #fff;
  margin: auto;
  padding-top: 25px;
}
.tip h2 {
  font-size: 24px;
  color: #fff;
  margin: 0px;
}

.tip p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 15px;
  margin-top: 0px;
}

.tip ol,
.tip ul {
  margin: 0;
  padding-left: 20px;
  margin-bottom: 25px;
}

.tip li {
  margin-bottom: 10px;
  font-size: 18px;
}

.primary {
  background-color: #492674 !important;
}

.bg {
  background-color: #492674 !important;
}

.next-button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.next-button:hover {
  background-color: #0056b3;
}

/* Social Share Buttons Styling */
#social-share {
  margin-top: 20px;
  text-align: center;
  position: absolute;
  top: 230px;
}

#social-share .content-wrapper {
  padding: 20px;
}

#social-share p {
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 18px;
  color: #000;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.share-btn {
  width: 50px;
  height: 50px;
  border: none;
  background-color: #081929;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  position: relative;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-btn:hover {
  transform: scale(1.2);
  opacity: 0.9;
}

/* Social share icon styling */
.share-btn::before {
  content: "";
  display: block;
  width: 60%;
  height: 60%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#facebook-share::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='white' d='M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z'%3E%3C/path%3E%3C/svg%3E");
}

#twitter-share::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='white' d='M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'%3E%3C/path%3E%3C/svg%3E");
}

#linkedin-share::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='white' d='M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z'%3E%3C/path%3E%3C/svg%3E");
}

/* Media queries for responsiveness */
@media only screen and (max-width: 600px) {
  #qcc {
    padding: 0px 5px;
    min-height: 450px;
  }
  #qc {
    background-position: center;
    min-height: 448px;
  }
  .home-bg {
    background-image: url("../assets/images/ht-COVER-m.webp");
  }

  .bg-pattren-top-left {
    width: 227px;
    height: 111px;
  }
  .bg-pattren-bottom-right {
    width: 227px;
    height: 111px;
  }
  .title {
    font-size: 20px;
  }
  /* #optionsC {
    grid-template-columns: 1fr; 
    column-gap: 0;
    row-gap: 14px; 
    margin-top: 16px;
    text-align: start;
  } */

  .question {
    min-width: none;
    max-width: none;
    width: 100%;
  }
  .question p {
    text-align: start;
  }
  #optionsC > label {
    margin-bottom: 8px;
  }

  #userInfo .input-section,
  .userInfo .input-section {
    grid-template-columns: 1fr; /* Stack items in a single column */
    column-gap: 0; /* Remove column gap */
    margin: 0px;
    row-gap: 10px; /* Adjust row gap as needed */
  }

  #userInfo button,
  .userInfo button {
    margin: 10px auto !important;
  }

  #banner-img {
    width: 200px;
    bottom: 0;
  }

  #section-c .input-section {
    grid-template-columns: repeat(1, 1fr);
  }

  #titlesC {
    top: -40px;
  }

  .advice-img {
    width: 100%;
  }

  #title2 {
    font-size: 25px;
  }

  #title1 {
    font-size: 22px;
  }

  .result {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    text-align: center;
    margin: auto 0px;
    gap: 2px;
  }
  .swiper-slide {
    margin: auto;
  }
  .result-txt {
    margin: 0px !important;
    font-size: 18px;
    text-align: center !important;
  }

  #userInfo,
  .userInfo {
    padding: 14px 40px;
  }

  .tip {
    padding-top: 5px;
  }
  .tip li {
    font-size: 13px;
  }
  .tip h2 {
    font-size: 14px;
  }
  .tip p {
    font-size: 13px;
  }
  #questions {
    min-height: 350px;
  }

  .result-img {
    width: 100% !important;
  }
  .start-button-wrapper {
    padding: 2px;

    width: 235px;
  }
  .swiper-button-next,
  .swiper-button-prev {
    top: var(--swiper-navigation-top-offset, 84%);
  }
  #userInfo {
    height: 480px;
  }
  #chooseTest {
    height: 480px;
  }
  .no-bg {
    background-color: transparent !important;
  }
  #questions {
    min-height: 480px;
  }
  #questions > div > p {
    margin-bottom: 40px;
  }
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
  #playerIntro {
    min-height: 480px;
  }
  .optionsC {
    grid-template-columns: repeat(1, 1fr);
  }
  #optionsC {
    display: flex;
    justify-content: space-around;
    margin-top: 55px;
    flex-direction: column;
    align-items: flex-start;
  }
}

.option-wrapper {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: right;
}

/* For multi-choice questions: align items to the right */
.option-wrapper.multi-wrapper {
  align-items: flex-start;
}

/* For other (single-choice) questions: center align items */
.option-wrapper.single-wrapper {
  align-items: center;
}

@media (max-width: 500px) {
  .option-wrapper.single-wrapper {
    align-items: flex-start;
  }
}

@media (min-width: 500px) {
  .input-answer {
    margin-right: 110px;
  }
}

.button-wrapper {
  text-align: center;
}

.next-button {
  padding: 10px 30px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.next-button:hover {
  background-color: #0056b3;
}

input[type="checkbox"],
input[type="radio"] {
  margin-left: 10px;
}

input {
  border-radius: 8px;
  outline: none;
  border: 2px solid #331459;
}
