/* Shared CSS for mental health quiz pages - Pulihkan Diri */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
  --pd-yale: #4A628A;
  --pd-yale-dark: #2C3E5A;
  --pd-baby: #7AB2D3;
  --pd-light: #B9E5E8;
  --pd-light-bg: #F4FAFC;
  --pd-text: #2C3E5A;
  --pd-text-muted: #5A6B85;
  --pd-text-light: #7B8AA1;
  --pd-white: #FFFFFF;
  --pd-border: rgba(74, 98, 138, 0.12);
  --green: #027A48;
  --green-bg: #D1FADF;
  --yellow: #B54708;
  --yellow-bg: #FEF0C7;
  --red: #B42318;
  --red-bg: #FEE4E2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', -apple-system, sans-serif;
  color: var(--pd-text);
  line-height: 1.6;
  background: var(--pd-light-bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><path d='M0 40 Q20 15 40 40 T80 40' fill='none' stroke='%237AB2D3' stroke-opacity='0.1' stroke-width='2.5'/><path d='M0 60 Q20 35 40 60 T80 60' fill='none' stroke='%237AB2D3' stroke-opacity='0.1' stroke-width='2.5'/><path d='M0 20 Q20 -5 40 20 T80 20' fill='none' stroke='%237AB2D3' stroke-opacity='0.1' stroke-width='2.5'/></svg>");
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pd-border);
  z-index: 100;
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  max-width: 900px; margin: 0 auto;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: 0.04em; font-size: 15px;
}
.logo img { width: 32px; height: 32px; object-fit: contain; }
.logo-text { color: var(--pd-yale); }
.logo-text-light { color: var(--pd-baby); }

.nav-back {
  background: var(--pd-light-bg);
  color: var(--pd-yale);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s;
}
.nav-back:hover { background: var(--pd-light); }

.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Quiz hub */
.hub-header {
  padding: 60px 0 40px;
  text-align: center;
}
.hub-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(185, 229, 232, 0.6);
  color: var(--pd-yale);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  letter-spacing: 0.05em;
}
.hub-title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 700;
  color: var(--pd-yale);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hub-subtitle {
  font-size: 15px;
  color: var(--pd-text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.quiz-card {
  background: var(--pd-white);
  border-radius: 16px;
  padding: 28px 24px;
  transition: all 0.3s;
  border: 1px solid var(--pd-border);
  display: flex;
  flex-direction: column;
}
.quiz-card:hover {
  transform: translateY(-4px);
  border-color: var(--pd-baby);
  box-shadow: 0 16px 32px rgba(74, 98, 138, 0.08);
}
.quiz-icon {
  width: 52px; height: 52px;
  background: var(--pd-light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.quiz-icon i { font-size: 26px; color: var(--pd-yale); }
.quiz-card h3 {
  font-size: 17px; font-weight: 700; color: var(--pd-yale);
  margin-bottom: 6px; letter-spacing: -0.01em;
}
.quiz-card-meta {
  font-size: 11px; color: var(--pd-text-light);
  letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 14px;
}
.quiz-card p {
  font-size: 13px; color: var(--pd-text-muted); line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}
.quiz-card-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pd-yale);
  color: var(--pd-white);
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  width: 100%;
}
.quiz-card-btn:hover { background: var(--pd-yale-dark); }

/* Disclaimer box */
.disclaimer {
  background: var(--pd-white);
  border-left: 4px solid var(--pd-baby);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 32px 0;
  font-size: 13px;
  color: var(--pd-text-muted);
  line-height: 1.8;
}
.disclaimer strong { color: var(--pd-yale); }
.disclaimer-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--pd-yale);
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 8px;
}
.disclaimer-title i { color: var(--pd-baby); font-size: 16px; }

/* Quiz page */
.quiz-header {
  padding: 48px 0 32px;
  text-align: center;
}
.quiz-category {
  display: inline-block;
  background: var(--pd-yale);
  color: var(--pd-white);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.quiz-title {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  color: var(--pd-yale);
  line-height: 1.25;
  margin-bottom: 14px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.02em;
}
.quiz-subtitle {
  font-size: 14px; color: var(--pd-text-muted);
  max-width: 460px; margin: 0 auto;
}
.quiz-meta {
  display: flex; gap: 20px; justify-content: center;
  margin-top: 20px;
  font-size: 12px; color: var(--pd-text-light);
  flex-wrap: wrap;
}
.quiz-meta span {
  display: inline-flex; align-items: center; gap: 5px;
}
.quiz-meta i { color: var(--pd-baby); }

/* Progress bar */
.progress-wrap {
  background: var(--pd-white);
  border-radius: 12px;
  padding: 18px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(74, 98, 138, 0.04);
}
.progress-info {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: var(--pd-text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.progress-info strong { color: var(--pd-yale); font-weight: 700; }
.progress-bar {
  height: 8px;
  background: var(--pd-light-bg);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pd-baby), var(--pd-yale));
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

/* Question card */
.question-card {
  background: var(--pd-white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(74, 98, 138, 0.06);
  margin-bottom: 24px;
}
.question-num {
  font-size: 12px;
  color: var(--pd-baby);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.question-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--pd-yale);
  line-height: 1.5;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--pd-light-bg);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: var(--pd-text);
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.option:hover {
  background: var(--pd-light);
  border-color: var(--pd-baby);
}
.option.selected {
  background: var(--pd-yale);
  color: var(--pd-white);
  border-color: var(--pd-yale-dark);
}
.option-circle {
  width: 22px; height: 22px;
  border: 2px solid var(--pd-baby);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}
.option.selected .option-circle {
  border-color: var(--pd-white);
  background: var(--pd-white);
}
.option.selected .option-circle::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 10px; height: 10px;
  background: var(--pd-yale);
  border-radius: 50%;
}

/* Navigation buttons */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 40px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--pd-yale);
  color: var(--pd-white);
}
.btn-primary:hover:not(:disabled) {
  background: var(--pd-yale-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 98, 138, 0.2);
}
.btn-primary:disabled {
  background: var(--pd-text-light);
  cursor: not-allowed;
  opacity: 0.5;
}
.btn-secondary {
  background: var(--pd-white);
  color: var(--pd-yale);
  border: 1.5px solid var(--pd-baby);
}
.btn-secondary:hover { background: var(--pd-light-bg); }
.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Intro section */
.intro-card {
  background: var(--pd-white);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(74, 98, 138, 0.06);
}
.intro-card h2 {
  font-size: 18px;
  color: var(--pd-yale);
  margin-bottom: 14px;
  font-weight: 700;
}
.intro-card p {
  color: var(--pd-text-muted);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
}
.intro-card p:last-child { margin-bottom: 0; }
.intro-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.intro-list li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  font-size: 14px;
  color: var(--pd-text-muted);
}
.intro-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 8px;
  width: 20px; height: 20px;
  background: var(--pd-light);
  color: var(--pd-yale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* Result section */
.result-card {
  background: var(--pd-white);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(74, 98, 138, 0.06);
}
.result-zone-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.zone-green { background: var(--green-bg); color: var(--green); }
.zone-yellow { background: var(--yellow-bg); color: var(--yellow); }
.zone-red { background: var(--red-bg); color: var(--red); }

.result-score {
  font-size: 56px;
  font-weight: 800;
  color: var(--pd-yale);
  margin: 0 0 6px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.result-score-label {
  font-size: 12px;
  color: var(--pd-text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 24px;
}
.result-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--pd-yale);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.result-description {
  font-size: 15px;
  color: var(--pd-text-muted);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto 24px;
  text-align: left;
}

.recommendations {
  background: var(--pd-light-bg);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 24px 0;
  text-align: left;
}
.recommendations h4 {
  font-size: 13px;
  color: var(--pd-yale);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
}
.recommendations ul {
  list-style: none; padding: 0;
}
.recommendations li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  font-size: 13px;
  color: var(--pd-text-muted);
  line-height: 1.7;
}
.recommendations li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px; height: 6px;
  background: var(--pd-baby);
  border-radius: 50%;
}

.result-cta {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.btn-whatsapp {
  background: #25D366;
  color: var(--pd-white);
}
.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
}

.crisis-warning {
  background: var(--red-bg);
  border-left: 4px solid var(--red);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--red);
}
.crisis-warning strong { display: block; margin-bottom: 6px; font-weight: 700; }

.share-section {
  text-align: center;
  padding: 24px;
  background: var(--pd-white);
  border-radius: 16px;
  margin-bottom: 32px;
}
.share-section p {
  font-size: 13px;
  color: var(--pd-text-muted);
  margin-bottom: 12px;
}
.share-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.share-btn {
  background: var(--pd-light-bg);
  color: var(--pd-yale);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.share-btn:hover { background: var(--pd-light); }

/* Footer */
.footer {
  background: var(--pd-yale-dark);
  color: var(--pd-light);
  padding: 32px 24px 24px;
  text-align: center;
  margin-top: 40px;
}
.footer .logo { justify-content: center; margin-bottom: 14px; }
.footer .logo span { color: var(--pd-white); }
.footer .logo span span { color: var(--pd-light); }
.footer-text { font-size: 12px; opacity: 0.7; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease-out backwards; }

.hidden { display: none !important; }

@media (max-width: 600px) {
  .quiz-header { padding: 32px 0 24px; }
  .question-card { padding: 24px 20px; }
  .question-text { font-size: 16px; }
  .option { padding: 14px 16px; font-size: 13px; }
  .result-card { padding: 28px 22px; }
  .result-score { font-size: 44px; }
  .quiz-nav { flex-direction: column-reverse; }
  .quiz-nav .btn { width: 100%; justify-content: center; }
  .result-cta .btn { width: 100%; justify-content: center; }
}
