/* His Tabernacle Spiritual Maturity Quiz Stylesheet */

/* ========================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ======================================== */

:root {
  /* Main Palette Colors */
  --oak-leaves: #CB561F;
  --snow: #F5EEEA;
  --maple: #951F12;
  --gray-skies: #D6CAFF;
  --sunshine: #D67700;
  --mud: #372523;
  --lake: #0f4e49;

  /* Season One Colors */
  --peach: #F7B0A9;
  --melon: #F9CFA2;
  --sweet-mint: #3ba49b;

  /* Season Two Colors */
  --buttercup: #EA5C46;
  --denim: #3F5675;
  --lime: #DEDF56;
  --aloe: #3D7C74;

  /* Season Three Colors */
  --winter-sky: #292F4C;
  --frost: #B4D5E5;

  /* Feminine Colors */
  --lilac: #E0B1D3;
  --grape: #702C60;

  /* Typography */
  --font-logo: 'Imperial URW', Georgia, serif;
  --font-title: 'Merriweather Bold', Georgia, serif;
  --font-body: 'Acumin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--mud);
  background-color: var(--snow);
  font-size: 16px;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--oak-leaves);
}

h1 {
  font-size: 2.5rem;
  font-family: var(--font-logo);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--mud);
}

.tagline {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--sunshine);
  margin-bottom: var(--spacing-lg);
}

.scripture-reference {
  font-size: 0.9rem;
  color: var(--lake);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   LAYOUT & CONTAINERS
   ======================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.hero-section {
  background: linear-gradient(135deg, var(--oak-leaves) 0%, var(--sunshine) 100%);
  color: white;
  padding: var(--spacing-xxl) 0;
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.hero-section h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}

.hero-section .tagline {
  color: var(--snow);
  font-size: 1.3rem;
}

.section {
  margin-bottom: var(--spacing-xl);
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-light);
  border-left: 4px solid var(--oak-leaves);
}

.card-header {
  border-bottom: 2px solid var(--snow);
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

/* ========================================
   QUIZ SPECIFIC STYLES
   ======================================== */

.quiz-container {
  max-width: 800px;
  margin: 0 auto;
}

.category-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-medium);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.category-title {
  color: var(--oak-leaves);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
}

.category-subtitle {
  color: var(--lake);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-sm);
}

.key-ideas {
  background: var(--snow);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--mud);
  margin-bottom: var(--spacing-md);
  border-left: 3px solid var(--sunshine);
}

.question-list {
  list-style: none;
  counter-reset: question-counter;
}

.question-item {
  counter-increment: question-counter;
  margin-bottom: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: #fafafa;
  border-radius: var(--radius-sm);
  position: relative;
  padding-left: calc(var(--spacing-lg) + var(--spacing-sm));
}

.question-item::before {
  content: counter(question-counter);
  position: absolute;
  left: -5px;
  top: var(--spacing-sm);
  background: var(--oak-leaves);
  color: white;
  width: var(--spacing-lg);
  height: var(--spacing-lg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
}

/* ========================================
   BUTTONS & INTERACTIVE ELEMENTS
   ======================================== */

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  margin: 2px;
}

.btn-primary {
  background: var(--oak-leaves);
  color: white;
}

.btn-primary:hover {
  background: var(--maple);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: var(--lake);
  color: white;
}

.btn-secondary:hover {
  background: var(--aloe);
}

.btn-outline {
  background: transparent;
  color: var(--oak-leaves);
  border: 2px solid var(--oak-leaves);
}

.btn-outline:hover {
  background: var(--oak-leaves);
  color: white;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

.form-group {
  margin-bottom: var(--spacing-md);
}

label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--mud);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: 2px solid var(--gray-skies);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--oak-leaves);
  box-shadow: 0 0 0 3px rgba(203, 86, 31, 0.1);
}

/* User Info Section Styles */
.user-info-section {
  background: var(--snow);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  margin: var(--spacing-lg) 0;
  border: 1px solid var(--gray-skies);
}

.user-info-section h3 {
  color: var(--oak-leaves);
  margin-bottom: var(--spacing-md);
  text-align: center;
}

/* Scale Input for Quiz Questions */
.scale-input {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-sm) 0;
  flex-wrap: wrap;
}

.scale-input input[type="range"] {
  flex: 1;
  min-width: 200px;
  height: 6px;
  border-radius: 3px;
  background: var(--gray-skies);
  outline: none;
  -webkit-appearance: none;
}

.scale-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--oak-leaves);
  cursor: pointer;
  box-shadow: var(--shadow-light);
}

.scale-input input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--oak-leaves);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-light);
}

.scale-labels {
  font-size: 0.8rem;
  color: var(--lake);
  font-weight: 600;
}

.scale-value {
  background: var(--oak-leaves);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: bold;
  min-width: 30px;
  text-align: center;
}

/* ========================================
   RESULTS & FEEDBACK STYLES
   ======================================== */

.result-card {
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-medium);
}

.result-immature {
  background: linear-gradient(135deg, var(--peach) 0%, var(--melon) 100%);
  border-left: 6px solid var(--sunshine);
}

.result-growing {
  background: linear-gradient(135deg, var(--sweet-mint) 0%, var(--aloe) 100%);
  color: white;
  border-left: 6px solid var(--lime);
}

.result-mature {
  background: linear-gradient(135deg, var(--oak-leaves) 0%, var(--maple) 100%);
  color: white;
  border-left: 6px solid var(--sunshine);
}

.result-title {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-sm);
  color: inherit;
}

.result-scripture {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  margin: var(--spacing-sm) 0;
  font-style: italic;
}

.action-steps {
  list-style: none;
  margin-top: var(--spacing-md);
}

.action-steps li {
  padding: var(--spacing-xs) 0;
  padding-left: var(--spacing-lg);
  position: relative;
}

.action-steps li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--sunshine);
  font-weight: bold;
}

/* ========================================
   PROGRESS & INDICATORS
   ======================================== */

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-skies);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: var(--spacing-md) 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--oak-leaves) 0%, var(--sunshine) 100%);
  transition: width 0.3s ease;
}

/* ========================================
   RESULTS VISUALIZATION STYLES
   ======================================== */

.scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.score-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-medium);
  transition: transform 0.2s ease;
  border: 3px solid transparent;
}

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

.score-immature {
  border-color: var(--sunshine);
  background: linear-gradient(135deg, rgba(247, 176, 169, 0.1) 0%, rgba(249, 207, 162, 0.1) 100%);
}

.score-growing {
  border-color: var(--lake);
  background: linear-gradient(135deg, rgba(0, 80, 73, 0.1) 0%, rgba(61, 124, 116, 0.1) 100%);
}

.score-mature {
  border-color: var(--oak-leaves);
  background: linear-gradient(135deg, rgba(203, 86, 31, 0.1) 0%, rgba(149, 31, 18, 0.1) 100%);
}

.score-category-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--oak-leaves);
  margin-bottom: var(--spacing-xs);
}

.score-reference {
  font-size: 0.9rem;
  color: var(--lake);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-visual {
  margin: var(--spacing-md) 0;
  display: flex;
  justify-content: center;
}

.score-circle {
  width: 120px;
  height: 120px;
}

.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 120px;
  max-height: 120px;
}

.circle-bg {
  fill: none;
  stroke: var(--gray-skies);
  stroke-width: 2.8;
}

.score-immature .circle {
  fill: none;
  stroke: var(--sunshine);
  stroke-width: 2.8;
  stroke-linecap: round;
  animation: progress 2s ease-in-out forwards;
}

.score-growing .circle {
  fill: none;
  stroke: var(--lake);
  stroke-width: 2.8;
  stroke-linecap: round;
  animation: progress 2s ease-in-out forwards;
}

.score-mature .circle {
  fill: none;
  stroke: var(--oak-leaves);
  stroke-width: 2.8;
  stroke-linecap: round;
  animation: progress 2s ease-in-out forwards;
}

.percentage {
  fill: var(--mud);
  font-family: var(--font-body);
  font-size: 0.5em;
  font-weight: bold;
  text-anchor: middle;
}

@keyframes progress {
  0% {
    stroke-dasharray: 0 100;
  }
}

.score-level {
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: var(--spacing-sm) 0;
  color: var(--mud);
}

.score-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-skies);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: var(--spacing-sm);
}

.score-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 2s ease-in-out;
}

.score-immature .score-fill {
  background: linear-gradient(90deg, var(--sunshine) 0%, var(--oak-leaves) 100%);
}

.score-growing .score-fill {
  background: linear-gradient(90deg, var(--lake) 0%, var(--aloe) 100%);
}

.score-mature .score-fill {
  background: linear-gradient(90deg, var(--oak-leaves) 0%, var(--maple) 100%);
}

.results-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--snow);
}

/* Overall Score Styling */
.result-card h3 {
  color: inherit;
  margin-bottom: var(--spacing-sm);
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-heavy);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: 2px solid var(--snow);
}

.modal-header h3 {
  margin: 0;
  color: var(--oak-leaves);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--mud);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background: var(--snow);
}

.modal-body {
  padding: var(--spacing-lg);
}

.modal-footer {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
  padding: var(--spacing-lg);
  border-top: 2px solid var(--snow);
}

/* Enhanced checkbox styles */
.form-group input[type="checkbox"] {
  margin-right: var(--spacing-xs);
  transform: scale(1.2);
  accent-color: var(--oak-leaves);
}

.form-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Alert Messages */
.alert {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-medium);
  font-weight: 600;
}

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

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .category-card,
  .card {
    padding: var(--spacing-md);
  }
  
  .question-item {
    padding-left: var(--spacing-lg);
  }
  
  .scale-input {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-xs);
  }

  .scale-input input[type="range"] {
    min-width: unset;
    width: 100%;
  }
  
  .scores-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .results-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .results-actions .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .score-circle {
    width: 100px;
    height: 100px;
  }
  
  .circular-chart {
    max-width: 100px;
    max-height: 100px;
  }

  .user-info-section {
    padding: var(--spacing-md);
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.color-primary { color: var(--oak-leaves); }
.color-secondary { color: var(--lake); }
.color-accent { color: var(--sunshine); }

.bg-primary { background-color: var(--oak-leaves); }
.bg-secondary { background-color: var(--lake); }
.bg-light { background-color: var(--snow); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }
.visible { display: block; }