/* =========================================================
   QUESTIONS CONTAINER
   ========================================================= */
.questions-container {
  background-image: url("/static/images/1-hero-and-nav/SurveyBG.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: right center;

  min-height: 900px;
  border-radius: 16px;
  padding: 64px 64px;

  position: relative;
  overflow: hidden;
}

.assessment-card {
  padding: 50px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   BACKGROUND OVERLAY
   ========================================================= */
.questions-container::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to right,
    rgba(6, 15, 20, 0.97) 0%,
    rgba(6, 15, 20, 0.92) 40%,
    rgba(6, 15, 20, 0.80) 60%,
    rgba(6, 15, 20, 0.65) 75%,
    rgba(6, 15, 20, 0.45) 90%,
    rgba(6, 15, 20, 0.30) 100%
  );

  z-index: 1;
  border-radius: 16px;
  pointer-events: none;
}

/* =========================================================
   QUESTION BLOCK
   ========================================================= */
.question-block {
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.question {
  font-size: 1.1rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 24px;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: "Poppins", sans-serif;
}

/* =========================================================
   OPTIONS GROUP
   ========================================================= */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================================
   CUSTOM RADIO BUTTON
   ========================================================= */
.custom-radio {
  display: flex;
  align-items: center;
  cursor: pointer;

  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 14px;
  font-family: "Poppins", sans-serif;

  transition: color 0.2s;
}

.custom-radio input {
  appearance: none;
  width: 22px;
  height: 22px;

  border: 1px solid #16c21f;
  border-radius: 50%;
  background: #141b1f;

  margin-right: 15px;
  display: grid;
  place-content: center;
  position: relative;
}

.custom-radio input:checked {
  border-color: #22c55e;
  background: #1b8f25;
}

.custom-radio input:checked::after {
  content: "✓";
  color: #ffffff;
  font-weight: bold;
  font-size: 14px;
}

/* =========================================================
   SUBMIT BUTTON
   ========================================================= */
/* Remove underlines from links */
.no-decoration {
  text-decoration: none !important;
}

.no-decoration:hover,
.no-decoration:focus,
.no-decoration:active {
  text-decoration: none !important;
}

.submit-analysis-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 200px;
  gap: 10px;
  margin: 0;
  padding: 16px 32px;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  color: #000000;
  border: none;
  border-radius: 50px;
  text-decoration: none !important;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 10;
  /* Bulged/3D effect with multiple shadow layers */
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  text-align: center;
}

.submit-analysis-btn:hover {
  background: linear-gradient(145deg, #f8f9fa, #e8e8e8);
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.25),
    0 6px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.submit-analysis-btn:active {
  transform: translateY(0px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button-svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
  color: #000000;
}

.submit-analysis-btn:hover .button-svg {
  transform: translateX(3px);
}

/* =========================================================
   SUBMIT BUTTON WRAPPER – Sticks at bottom of sticky card
   ========================================================= */
.submit-button-wrapper {
  padding: 20px 64px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    rgba(6, 15, 20, 0.95) 0%,
    rgba(6, 15, 20, 1) 100%
  );
  border-top: 2px solid rgba(34, 197, 94, 0.3);
  border-radius: 0 0 16px 16px;
}

/* =========================================================
   TAKE SURVEY BUTTON
   ========================================================= */
.take-survey-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #22c55e 0%, #16c21f 100%);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.take-survey-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.take-survey-btn:hover::before {
  width: 300px;
  height: 300px;
}

.take-survey-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.take-survey-btn:active {
  transform: translateY(0);
}

.take-survey-btn svg {
  transition: transform 0.3s ease;
}

.take-survey-btn:hover svg {
  transform: translateY(4px);
}

.hero-cta-wrapper {
  text-align: center;
  animation: fadeInUp 0.8s ease 0.3s both;
  margin-top: 40px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   STICKY SURVEY CONTAINER
   ========================================================= */
#survey-section {
  position: relative;
  padding-top: 40px;
  display: none; /* Hidden initially, shown when "Take Survey" is clicked */
}

#survey-container {
  position: relative;
  transition: all 0.3s ease;
}

/* When sticky: flex column so questions scroll, button stays at bottom */
#survey-container.sticky-survey {
  position: sticky;
  top: 20px;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow: hidden; /* clip to the flex container bounds */
}

/* Header stays at top */
#survey-container.sticky-survey .assessment-header {
  flex-shrink: 0;
}

/* Questions area fills remaining space and scrolls */
#survey-container.sticky-survey .questions-container {
  flex: 1 1 auto;
  min-height: 0;          /* override the 900px min-height so it can shrink */
  overflow-y: auto;       /* scroll questions */
  overflow-x: hidden;
  border-radius: 16px 16px 0 0; /* flat bottom since button wrapper sits below */
}

/* Button wrapper stays pinned at the bottom of the sticky card */
#survey-container.sticky-survey .submit-button-wrapper {
  flex-shrink: 0;
}

/* =========================================================
   SCROLLABLE QUESTIONS — Custom Scrollbar
   ========================================================= */
#questions-scroll-container::-webkit-scrollbar {
  width: 8px;
}

#questions-scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#questions-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.5);
  border-radius: 10px;
}

#questions-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.7);
}

/* =========================================================
   QUESTION TRANSITIONS
   ========================================================= */
.question-block.active {
  opacity: 1;
  transform: translateY(0);
}

.question-block.current {
  background: rgba(34, 197, 94, 0.05);
  border-left: 3px solid #22c55e;
  padding-left: 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* =========================================================
   D-STRESS HERO IMAGE – Reduced Width
   ========================================================= */
.destress-logo-hero,
.destress-logo-hero.img-fluid {
  max-width: 55%;
  margin-top: -20px;
  height: auto;
  margin-bottom: 20px;
}

/* =========================================================
   SMOOTH PAGE TRANSITIONS
   ========================================================= */
.insights-hero {
  animation: fadeIn 0.8s ease;
  padding-top: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
  }
}

.hero-title {
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-text {
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* =========================================================
   RESPONSIVE (≤768px)
   ========================================================= */
@media (max-width: 768px) {
  .questions-container {
    background-size: cover;
    background-position: center;
    padding: 40px 24px;
  }

  .questions-container::before {
    background: rgba(6, 15, 20, 0.92);
  }

  .take-survey-btn {
    padding: 18px 40px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    max-width: 90%;
    border-radius: 50px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow:
      0 0 20px rgba(34, 197, 94, 0.5),
      0 0 40px rgba(34, 197, 94, 0.25),
      0 6px 16px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    justify-content: center;
    text-align: center;
  }

  #survey-container.sticky-survey {
    top: 10px;
    border-radius: 16px;
    max-height: calc(100vh - 20px);
  }

  .submit-button-wrapper {
    padding: 15px 24px;
  }

  .submit-analysis-btn {
    width: 100%;
    max-width: 320px;
    min-width: auto;
  }

  .question-block {
    margin-bottom: 40px;
  }

  .question-block.current {
    padding-left: 15px;
    margin-left: -15px;
  }
}

/* =========================================================
   RESPONSIVE (≤480px)
   ========================================================= */
@media (max-width: 480px) {
  .take-survey-btn {
    padding: 16px 32px;
    font-size: 0.95rem;
    max-width: 85%;
    box-shadow:
      0 0 18px rgba(34, 197, 94, 0.45),
      0 0 36px rgba(34, 197, 94, 0.2),
      0 5px 14px rgba(0, 0, 0, 0.3);
  }

  .assessment-card {
    padding: 20px;
  }

  #survey-container.sticky-survey {
    top: 5px;
    max-height: calc(100vh - 10px);
  }

  .submit-button-wrapper {
    padding: 12px 16px;
  }

  .submit-analysis-btn {
    width: 100%;
    max-width: 280px;
    min-width: auto;
    padding: 14px 20px;
  }

  .question-block {
    margin-bottom: 32px;
  }
}
