/* ========================================
   LuranCare Assessment V3 - Styles
   Visual + Interaction upgrade
   Flow: 12 steps → 7 steps
   ======================================== */

/* === Design Tokens === */
:root {
  --bg-warm: #F8F5F1;
  --card-white: #FFFFFF;
  --primary: #E8A1AE;
  --primary-hover: #D98E9C;
  --primary-rgb: 232, 161, 174;
  --accent: #B7A99A;
  --text-dark: #2F1B17;
  --text-muted: #6B5D54;
  --text-light: #9A8D84;
  --border-light: #EDE8E4;
  --border-focus: #E8A1AE;
  --success-green: #7BA885;
  --success-bg: #F0F9F4;
  --shadow-sm: 0 1px 3px rgba(47,27,23,0.04);
  --shadow-md: 0 4px 16px rgba(47,27,23,0.06);
  --shadow-lg: 0 8px 32px rgba(47,27,23,0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

/* ========================================
   CRITICAL: Override global style.min.css
   ======================================== */

.assessment-wrapper {
  min-height: 100vh;
  background: var(--bg-warm);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  line-height: 1.5;
  padding-top: 56px;
}

.assessment-wrapper h1,
.assessment-wrapper h2,
.assessment-wrapper h3,
.assessment-wrapper h4,
.assessment-wrapper h5,
.assessment-wrapper h6 {
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-dark);
}

.assessment-wrapper h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.85rem, 4.5vw, 2.8rem);
  line-height: 1.12;
}

.assessment-wrapper h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.15;
}

.assessment-wrapper h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
}

.assessment-wrapper p {
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
  color: var(--text-muted);
}

.assessment-wrapper .container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ========================================
   Step Dots Indicator
   ======================================== */

.step-dots {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 0;
  background: rgba(248,245,241,0.95);
  backdrop-filter: blur(8px);
  z-index: 998;
  border-bottom: 1px solid var(--border-light);
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.step-dot.active {
  background: var(--primary);
  transform: scale(1.25);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.step-dot.completed {
  background: var(--success-green);
}

/* ========================================
   Section Base
   ======================================== */

.assessment-section {
  display: none;
  opacity: 0;
  min-height: auto;
  padding: 1.5rem 1.25rem 1rem;
}

.assessment-section.active {
  display: block;
  opacity: 1;
  animation: sectionIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

/* Init guard */
.assessment-wrapper:not(.initialized) .assessment-section {
  display: none !important;
}

.assessment-wrapper.initialized .assessment-section.active {
  display: block;
}

/* ========================================
   HERO
   ======================================== */

.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(80vh - 56px);
  padding: 3rem 1.25rem;
}

.hero-content {
  max-width: 520px;
}

.hero-emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.hero-subheadline {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  background: white;
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-cta {
  margin-bottom: 1rem;
}

.hero-trust {
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
}

/* ========================================
   BUTTONS
   ======================================== */

.assessment-wrapper .btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: 28px;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.25;
}

.assessment-wrapper .btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}

.assessment-wrapper .btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.3);
}

.assessment-wrapper .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}

.assessment-wrapper .btn-secondary {
  background: white;
  color: var(--text-dark);
  border: 1.5px solid var(--border-light);
}

.assessment-wrapper .btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.assessment-wrapper .btn-back {
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

.assessment-wrapper .btn-back:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.06);
}

.assessment-wrapper .btn-large {
  padding: 0.85rem 2.25rem;
  font-size: 0.95rem;
}

.assessment-wrapper .btn-full-width {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* ========================================
   QUESTION SECTIONS
   ======================================== */

.question-section {
  padding-top: 0.5rem;
  padding-bottom: 1rem;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
}

.question-section.active {
  display: flex;
}

.question-card {
  background: var(--card-white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-md);
  width: 100%;
}

.question-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.question-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
  text-align: center;
  line-height: 1.15;
}

.question-subtitle {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
  line-height: 1.4;
}

.question-helper {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0.85rem 0 0.3rem;
  text-align: center;
  line-height: 1.35;
}

/* ========================================
   OPTION CARDS - UPGRADED
   ======================================== */

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-top: 1rem;
}

.option-card {
  background: white;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 0.85rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.option-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.12);
}

.option-card:active {
  transform: scale(0.97);
}

.option-emoji {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
  display: block;
  transition: transform 0.25s ease;
}

.option-card:hover .option-emoji {
  transform: scale(1.15);
}

.option-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}

.option-description {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.25;
}

/* SELECTED state - much more prominent */
.option-card.selected {
  background: linear-gradient(135deg, #FFF5F7 0%, #FFFFFF 100%);
  border-color: var(--primary);
  border-width: 2.5px;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.2);
  transform: translateY(-2px);
}

.option-card.selected .option-emoji {
  transform: scale(1.2);
}

/* Multi-select checkmark */
.options-grid.multi-select .option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--primary);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: bold;
  animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popIn {
  from { transform: scale(0); }
  50% { transform: scale(1.2); }
  to { transform: scale(1); }
}

/* Wide option for single-column items */
.option-wide {
  grid-column: 1 / -1;
}

/* ========================================
   QUESTION NAV
   ======================================== */

.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  gap: 1rem;
}

/* ========================================
   RESULTS + FORM (combined section)
   ======================================== */

.results-form-section {
  padding-top: 0.5rem;
  padding-bottom: 2rem;
}

.results-form-card {
  background: var(--card-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.results-top {
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
}

.results-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.results-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
  line-height: 1.15;
}

.results-subheadline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Recommendation Primary */
.recommendation-primary {
  background: linear-gradient(135deg, #FFF5F7 0%, #FFFFFF 100%);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
  text-align: left;
}

.recommendation-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.22rem 0.7rem;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.recommendation-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.recommendation-content {
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.recommendation-content ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.55rem;
}

.recommendation-content li {
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
}

.recommendation-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-green);
  font-weight: bold;
  font-size: 0.82rem;
}

/* Add-ons */
.recommendation-addons {
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0;
  text-align: left;
}

.addons-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.65rem;
}

.addons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.addon-item {
  background: white;
  padding: 0.4rem 0.85rem;
  border-radius: 16px;
  font-size: 0.78rem;
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  font-weight: 500;
}

/* Divider */
.results-divider {
  position: relative;
  text-align: center;
  padding: 0 1.75rem;
  margin: 0;
  border-top: 1px solid var(--border-light);
}

.divider-text {
  position: relative;
  top: -0.6em;
  background: var(--card-white);
  padding: 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ========================================
   FORM (inside results card)
   ======================================== */

.form-body {
  padding: 1.25rem 1.75rem 2rem;
}

.form-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  text-align: center;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.form-input, .form-select {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all 0.22s ease;
  background: white;
  color: var(--text-dark);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: #C4B9B1;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-input.error, .form-select.error {
  border-color: #E57373;
  box-shadow: 0 0 0 3px rgba(229,115,115,0.1);
}

.form-input.valid {
  border-color: var(--success-green);
}

.form-error {
  font-size: 0.72rem;
  color: #E57373;
  min-height: 1rem;
  margin-top: 0.15rem;
}

.form-helper {
  font-size: 0.73rem;
  color: var(--text-light);
  margin-top: 0.3rem;
  line-height: 1.35;
}

/* Submit button */
#submitBtn {
  position: relative;
  min-height: 48px;
}

.btn-loading {
  display: none;
}

#submitBtn.loading .btn-text {
  visibility: hidden;
}

#submitBtn.loading .btn-loading {
  display: inline-block;
  position: absolute;
}

/* ========================================
   SUCCESS
   ======================================== */

.success-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(80vh - 56px);
  padding: 2rem 1.25rem;
}

.success-card {
  background: var(--card-white);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 560px;
  width: 100%;
}

.success-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 300;
  animation: successPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes successPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.success-confetti {
  position: absolute;
  inset: -10px;
  pointer-events: none;
}

.success-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.success-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Timeline - vertical */
.success-timeline {
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.25rem 0;
  text-align: left;
}

.timeline-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.65rem 0;
  position: relative;
}

.timeline-item:not(:last-child) {
  border-bottom: none;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 28px;
  bottom: -4px;
  width: 2px;
  background: var(--border-light);
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.timeline-content {
  flex: 1;
}

.timeline-time {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.82rem;
  display: block;
  margin-bottom: 0.15rem;
}

.timeline-text {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
  display: block;
}

.success-support {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 1rem 0 1.25rem;
}

/* ========================================
   NAV (override global)
   ======================================== */

.assessment-wrapper ~ .navbar,
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(47,27,23,0.06);
  z-index: 1000;
}

.assessment-wrapper ~ .navbar .nav-container,
.navbar .nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assessment-wrapper ~ .navbar .nav-logo .logo-text,
.navbar .nav-logo .logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.assessment-wrapper ~ .navbar .nav-cta,
.navbar .nav-cta,
.navbar .nav-cta-active {
  padding: 0.5rem 1.4rem;
  background: var(--primary) !important;
  color: white !important;
  border-radius: 28px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.assessment-wrapper ~ .navbar .nav-cta:hover,
.navbar .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb),0.35);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
}

/* ========================================
   FOOTER
   ======================================== */

.assessment-footer {
  background: white;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-headline {
    font-size: 1.85rem;
  }

  .question-card {
    padding: 1.5rem 1.15rem;
  }

  .question-title {
    font-size: 1.35rem;
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

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

  .question-nav {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .btn-back {
    align-self: center;
  }

  .btn-primary:not(.btn-full-width) {
    width: 100%;
  }

  .results-form-card {
    border-radius: var(--radius-lg);
  }

  .results-top, .form-body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .success-card {
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 1.65rem;
  }

  .question-title {
    font-size: 1.25rem;
  }

  .results-headline {
    font-size: 1.35rem;
  }

  .success-headline {
    font-size: 1.4rem;
  }

  .option-card {
    min-height: 56px;
    padding: 0.85rem 0.75rem;
  }

  .step-dots {
    padding: 10px 0;
  }

  .step-dot {
    width: 8px;
    height: 8px;
  }
}