/* =============================================
   TATTVAM — Discover Your Guna Quiz
   Personality assessment page styles
   ============================================= */

/* Trilateral Dawn-to-Dusk Theme for Guna Assessment */
.guna-page {
  background-color: #faf6f0 !important;
  background-image: 
    radial-gradient(ellipse at top left, rgba(122, 158, 106, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at top right, rgba(212, 148, 58, 0.1) 0%, transparent 45%),
    radial-gradient(ellipse at bottom, rgba(138, 123, 107, 0.12) 0%, transparent 50%) !important;
}

.guna-card--sattva {
  border: 1.5px solid rgba(122, 158, 106, 0.2) !important;
  background: linear-gradient(180deg, #ffffff, #f7faf5) !important;
}
.guna-card--sattva:hover {
  border-color: #7A9E6A !important;
  box-shadow: 0 12px 30px rgba(122, 158, 106, 0.15) !important;
}

.guna-card--rajas {
  border: 1.5px solid rgba(212, 148, 58, 0.2) !important;
  background: linear-gradient(180deg, #ffffff, #fcf9f2) !important;
}
.guna-card--rajas:hover {
  border-color: #D4943A !important;
  box-shadow: 0 12px 30px rgba(212, 148, 58, 0.15) !important;
}

.guna-card--tamas {
  border: 1.5px solid rgba(138, 123, 107, 0.2) !important;
  background: linear-gradient(180deg, #ffffff, #f7f6f5) !important;
}
.guna-card--tamas:hover {
  border-color: #8A7B6B !important;
  box-shadow: 0 12px 30px rgba(138, 123, 107, 0.15) !important;
}



/* ——— Hero Section ——— */
.guna-hero {
  padding-top: calc(var(--nav-height) + var(--space-20));
  padding-bottom: var(--space-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.guna-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(122, 158, 106, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(212, 148, 58, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(138, 123, 107, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: rgba(207, 166, 107, 0.1);
  border: 1px solid rgba(207, 166, 107, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-bronze);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.guna-hero h1 {
  font-size: var(--text-3xl);
  font-weight: 300;
  color: var(--color-text-dark);
  margin-bottom: var(--space-4);
  letter-spacing: 0.04em;
}

.guna-hero h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--color-gold);
}

.hero-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-4);
  line-height: 1.8;
}

.hero-shloka {
  font-family: var(--font-sanskrit);
  font-size: var(--text-lg);
  color: var(--color-text-dark);
  margin-bottom: var(--space-2);
  opacity: 0.7;
}

.hero-shloka-ref {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-10);
}

/* ——— Guna Overview Cards ——— */
.guna-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 900px;
  margin: 0 auto var(--space-12);
}

.guna-card {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.guna-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  transition: opacity var(--transition-base);
}

.guna-card--sattva::before { background: linear-gradient(90deg, #7A9E6A, #9ABF8A); }
.guna-card--rajas::before  { background: linear-gradient(90deg, #D4943A, #E8B060); }
.guna-card--tamas::before  { background: linear-gradient(90deg, #8A7B6B, #A89888); }

.guna-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-champagne);
}

.guna-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto var(--space-5);
}

.guna-card--sattva .guna-card-icon {
  background: rgba(122, 158, 106, 0.12);
}
.guna-card--rajas .guna-card-icon {
  background: rgba(212, 148, 58, 0.12);
}
.guna-card--tamas .guna-card-icon {
  background: rgba(138, 123, 107, 0.12);
}

.guna-card-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-1);
}

.guna-card-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.guna-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.hero-cta {
  margin-top: var(--space-10);
}

/* ——— Quiz Container ——— */
.quiz-section {
  display: none;
  min-height: 100vh;
  padding-top: calc(var(--nav-height) + var(--space-8));
  padding-bottom: var(--space-16);
  position: relative;
}

.quiz-section.active {
  display: block;
}

/* ——— Quiz Progress ——— */
.quiz-progress {
  max-width: 680px;
  margin: 0 auto var(--space-10);
  padding: 0 var(--space-4);
}

.quiz-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.quiz-progress-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.quiz-progress-count {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text-dark);
}

.quiz-progress-bar {
  width: 100%;
  height: 5px;
  background: var(--color-linen);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-saffron));
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out-expo);
  position: relative;
}

.quiz-progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(207, 166, 107, 0.2);
  transition: all var(--transition-base);
}

/* ——— Question Viewport ——— */
.quiz-viewport {
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  min-height: 480px;
}

.quiz-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.5s var(--ease-out-expo);
  pointer-events: none;
  padding: 0 var(--space-4);
}

.quiz-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.quiz-slide.exit-left {
  opacity: 0;
  transform: translateX(-60px);
}

.quiz-slide.enter-right {
  transform: translateX(60px);
  opacity: 0;
}

/* ——— Question Card ——— */
.question-number {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 300;
  color: var(--color-champagne);
  margin-bottom: var(--space-2);
  line-height: 1;
}

.question-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text-dark);
  line-height: 1.5;
  margin-bottom: var(--space-8);
  max-width: 580px;
}

/* ——— Answer Options ——— */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.quiz-option {
  background: var(--color-warm-white);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
}

.quiz-option:hover {
  border-color: var(--color-champagne);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quiz-option.selected {
  border-color: var(--color-gold);
  background: rgba(207, 166, 107, 0.06);
  box-shadow: 0 0 0 3px rgba(207, 166, 107, 0.1);
}

.quiz-option.selected .option-marker {
  background: var(--color-gold);
  color: var(--color-cream);
  border-color: var(--color-gold);
}

.option-marker {
  width: 32px;
  height: 32px;
  border: 2px solid var(--color-border-medium);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  flex-shrink: 0;
  transition: all var(--transition-base);
  margin-top: 2px;
}

.option-text {
  font-size: var(--text-base);
  color: var(--color-text-primary);
  line-height: 1.6;
  padding-top: 4px;
}

/* ——— Quiz Navigation ——— */
.quiz-nav {
  max-width: 680px;
  margin: var(--space-8) auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-4);
}

.quiz-nav .btn {
  min-width: 140px;
}

.quiz-nav .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ——— Results Section ——— */
.result-section {
  display: none;
  padding-top: calc(var(--nav-height) + var(--space-12));
  padding-bottom: var(--space-24);
  position: relative;
  overflow: hidden;
}

.result-section.active {
  display: block;
}

/* ——— Mandala Reveal Animation ——— */
.result-reveal {
  text-align: center;
  margin-bottom: var(--space-16);
  position: relative;
}

.mandala-reveal {
  width: 280px;
  height: 280px;
  margin: 0 auto var(--space-10);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mandala-reveal-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(207, 166, 107, 0.3);
  opacity: 0;
  transform: scale(0.3);
  animation: mandalaExpand 1.2s var(--ease-out-expo) forwards;
}

.mandala-reveal-ring:nth-child(2) {
  inset: 15px;
  border-color: rgba(207, 166, 107, 0.2);
  animation-delay: 0.15s;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(207, 166, 107, 0.04) 0deg 12deg,
    transparent 12deg 24deg
  );
}

.mandala-reveal-ring:nth-child(3) {
  inset: 30px;
  border-color: rgba(207, 166, 107, 0.15);
  animation-delay: 0.3s;
}

@keyframes mandalaExpand {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-30deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* ——— Donut Chart ——— */
.donut-chart {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    #7A9E6A 0deg 0deg,
    #D4943A 0deg 0deg,
    #8A7B6B 0deg 360deg
  );
  position: absolute;
  inset: 0;
  transition: none;
}

.donut-chart-ring.animated {
  transition: none;
}

.donut-chart-center {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--color-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-inner);
}

.donut-primary-guna {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-dark);
  line-height: 1.2;
}

.donut-primary-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ——— Donut Legend ——— */
.donut-legend {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot--sattva { background: #7A9E6A; }
.legend-dot--rajas  { background: #D4943A; }
.legend-dot--tamas  { background: #8A7B6B; }

.legend-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.legend-value {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text-dark);
  margin-left: var(--space-1);
}

/* ——— Result Title ——— */
.result-title-section {
  text-align: center;
  margin-bottom: var(--space-12);
}

.result-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.result-main-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-2);
}

.result-main-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.result-main-desc {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ——— Result Detail Cards ——— */
.result-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 1000px;
  margin: 0 auto var(--space-16);
}

.result-card {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.result-card.primary-card {
  border-width: 2px;
  box-shadow: var(--shadow-md);
}

.result-card.primary-card.sattva-primary { border-color: #7A9E6A; }
.result-card.primary-card.rajas-primary  { border-color: #D4943A; }
.result-card.primary-card.tamas-primary  { border-color: #8A7B6B; }

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.result-card--sattva::before { background: #7A9E6A; }
.result-card--rajas::before  { background: #D4943A; }
.result-card--tamas::before  { background: #8A7B6B; }

.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.result-card-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-dark);
}

.result-card-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.result-card-score {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
}

.result-card--sattva .result-card-score { color: #7A9E6A; }
.result-card--rajas .result-card-score  { color: #D4943A; }
.result-card--tamas .result-card-score  { color: #8A7B6B; }

/* Score bar inside result cards */
.result-card-bar {
  width: 100%;
  height: 6px;
  background: var(--color-linen);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
  overflow: hidden;
}

.result-card-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  width: 0;
  transition: width 1.2s var(--ease-out-expo) 0.6s;
}

.result-card--sattva .result-card-bar-fill { background: #7A9E6A; }
.result-card--rajas .result-card-bar-fill  { background: #D4943A; }
.result-card--tamas .result-card-bar-fill  { background: #8A7B6B; }

.result-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.result-card-list-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  font-weight: 500;
}

.result-card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.result-card-list li {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  line-height: 1.6;
}

.result-card-list li::before {
  content: '•';
  color: var(--color-gold);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ——— Share Section ——— */
.share-section {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.share-section h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.share-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

/* ——— Shareable Card ——— */
.share-card {
  background: var(--color-parchment);
  border: 1px solid var(--color-champagne);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
}

.share-card::before {
  content: 'ॐ';
  position: absolute;
  font-family: var(--font-sanskrit);
  font-size: 12rem;
  color: rgba(207, 166, 107, 0.04);
  bottom: -30px;
  right: -10px;
  line-height: 1;
  font-style: normal;
  pointer-events: none;
}

.share-card-brand {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.share-card-guna {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-2);
}

.share-card-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.share-mini-donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto var(--space-6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-mini-donut-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: absolute;
  inset: 0;
}

.share-mini-donut-center {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-parchment);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text-dark);
}

.share-card-scores {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.share-card-scores span {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Share buttons */
.share-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ——— Retake Section ——— */
.retake-section {
  text-align: center;
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border-light);
}

.retake-section p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  max-width: 100%;
}

/* ——— Verse Section in Results ——— */
.result-verse {
  max-width: 700px;
  margin: 0 auto var(--space-16);
}

/* ——— Responsive ——— */
@media (max-width: 1024px) {
  .result-details {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .guna-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .guna-hero h1 {
    font-size: var(--text-2xl);
  }

  .quiz-viewport {
    min-height: 520px;
  }

  .question-text {
    font-size: var(--text-lg);
  }

  .quiz-option {
    padding: var(--space-4) var(--space-5);
  }

  .donut-legend {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }

  .mandala-reveal {
    width: 220px;
    height: 220px;
  }

  .donut-chart {
    width: 180px;
    height: 180px;
  }

  .donut-chart-center {
    width: 110px;
    height: 110px;
  }

  .share-card-scores {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
  }
}

@media (max-width: 480px) {
  .guna-hero {
    padding-top: calc(var(--nav-height) + var(--space-12));
    padding-bottom: var(--space-10);
  }

  .quiz-nav {
    flex-direction: column-reverse;
    gap: var(--space-3);
  }

  .quiz-nav .btn {
    width: 100%;
  }
}
