/* ============================================
   MindTests — Design System
   Aesthetic: Professional & Scientific
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-primary: #0B2545;
  --color-primary-light: #134074;
  --color-accent: #13A89E;
  --color-accent-light: #1BC5BA;
  --color-accent-glow: rgba(19, 168, 158, 0.15);

  --color-bg: #F7F9FC;
  --color-surface: #FFFFFF;
  --color-surface-alt: #EEF2F7;
  --color-border: #D8DEE9;
  --color-border-light: #E8EDF3;
  --color-text: #1A2332;
  --color-text-secondary: #5A6B80;
  --color-text-muted: #8A97A8;

  --color-success: #0F9D58;
  --color-warning: #F4B400;
  --color-danger: #DB4437;
  --color-info: #4285F4;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --container-max: 1120px;
  --container-narrow: 720px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(11, 37, 69, 0.06), 0 1px 2px rgba(11, 37, 69, 0.04);
  --shadow-md: 0 4px 12px rgba(11, 37, 69, 0.08), 0 2px 4px rgba(11, 37, 69, 0.04);
  --shadow-lg: 0 12px 32px rgba(11, 37, 69, 0.10), 0 4px 8px rgba(11, 37, 69, 0.06);
  --shadow-glow: 0 0 24px rgba(19, 168, 158, 0.20);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus-visible {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 9999;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-light);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--color-primary);
  line-height: 1.2;
}

h1 {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

main {
  flex: 1;
}

/* Subtle dot grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(11, 37, 69, 0.03) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.logo-icon::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2.5px solid white;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-icon::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  top: 7px;
  right: 7px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--color-primary);
}

.logo-text span {
  color: var(--color-accent);
}

.logo img {
  max-height: 32px;
  width: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

nav a {
  color: var(--color-text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition-fast);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  transition: width var(--transition-base);
}

nav a:hover,
nav a.active {
  color: var(--color-primary);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  margin: 5px 0;
  border-radius: 2px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  margin-bottom: var(--space-lg);
  position: relative;
}

.hero p {
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-accent-glow);
  color: var(--color-accent);
  font-size: 0.825rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-md);
  border-radius: 50px;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   FILTERS & SORT
   ============================================ */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.filters-categories {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 50px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-glow);
}

.filter-chip.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.filters-sort {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-muted);
}

.filters-sort label {
  display: flex;
  align-items: center;
}

.filters-sort select {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235A6B80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--transition-fast);
}

.filters-sort select:hover,
.filters-sort select:focus {
  border-color: var(--color-accent);
  outline: none;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: var(--space-xl);
  transition: border-color var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.search-bar svg {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.search-bar input {
  border: none;
  outline: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--color-text-muted);
}

/* ============================================
   TEST CARDS
   ============================================ */
.tests-section {
  padding: var(--space-3xl) 0;
}

.tests-section h2 {
  text-align: center;
  margin-bottom: var(--space-md);
}

.tests-section>.container>p {
  text-align: center;
  max-width: 520px;
  margin: 0 auto var(--space-2xl);
}

.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.test-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease both;
}

.test-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0.25;
  transition: opacity var(--transition-base);
}

.test-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.test-card:hover::before {
  opacity: 1;
}

.test-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.test-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: inset 0 1px 3px rgba(11, 37, 69, 0.08), 0 1px 2px rgba(11, 37, 69, 0.06);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.test-card:hover .test-card__icon {
  transform: scale(1.08);
}

.test-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
  width: fit-content;
}

.test-card__badge--validated {
  background: rgba(15, 157, 88, 0.1);
  color: var(--color-success);
}

.test-card__badge--popular {
  background: rgba(66, 133, 244, 0.1);
  color: var(--color-info);
}

.test-card__badge--category {
  background: var(--color-accent-glow);
  color: var(--color-accent);
}

.test-card h3 {
  margin-bottom: var(--space-sm);
}

.test-card p {
  font-size: 0.925rem;
  margin-bottom: var(--space-md);
  flex: 1;
  color: var(--color-text-secondary);
}

.test-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  margin-bottom: var(--space-md);
}

.test-card__tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: 0.725rem;
  font-weight: 500;
  border-radius: 50px;
  border: 1px solid var(--color-border-light);
}

.test-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  font-size: 0.825rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.test-card__meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.test-card__meta svg {
  opacity: 0.7;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.empty-state h3 {
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  font-size: 0.95rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1;
}

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

.btn--primary:hover {
  background: var(--color-primary-light);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

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

.btn--accent:hover {
  background: var(--color-accent-light);
  color: white;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-alt);
}

.btn--full {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   TEST ENGINE UI
   ============================================ */
.test-container {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

.test-intro {
  text-align: center;
  padding: var(--space-3xl) 0;
  animation: fadeInUp 0.6s ease;
}

.test-intro h1 {
  margin-bottom: var(--space-md);
}

.test-intro p {
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto var(--space-lg);
}

.test-intro__details {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.test-intro__details span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Progress */
.progress-wrapper {
  margin-bottom: var(--space-2xl);
  animation: fadeIn 0.4s ease;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  font-size: 0.825rem;
  color: var(--color-text-muted);
}

.progress-header strong {
  color: var(--color-text);
  font-weight: 600;
}

.progress-bar {
  height: 6px;
  background: var(--color-surface-alt);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 3px;
  transition: width var(--transition-slow);
  min-width: 2%;
}

/* Question card */
.question-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease;
}

.question-card__number {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.question-card h2 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.options-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.option-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: 14px 18px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: left;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.option-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-glow);
}

.option-btn.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-glow);
  font-weight: 500;
}

.option-btn__radio {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.option-btn.selected .option-btn__radio {
  border-color: var(--color-accent);
}

.option-btn.selected .option-btn__radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  border-radius: 50%;
}

.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
}

/* ============================================
   RESULTS
   ============================================ */
.result-container {
  animation: fadeInUp 0.6s ease;
  padding-bottom: var(--space-3xl);
}

.result-header {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.result-header__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: 2rem;
}

.result-header h1 {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.score-display {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.score-display__value {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.score-display__number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--color-primary);
  line-height: 1;
}

.score-display__max {
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.score-display__label {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: var(--space-sm);
}

.severity-scale {
  margin-top: var(--space-lg);
}

.severity-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.severity-bar__segment {
  flex: 1;
  position: relative;
}

.severity-marker {
  position: absolute;
  top: -6px;
  width: 20px;
  height: 20px;
  background: var(--color-surface);
  border: 3px solid var(--color-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: var(--shadow-sm);
}

.severity-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Big Five trait bars */
.bigfive-results {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.trait-bar {
  margin-bottom: var(--space-lg);
}

.trait-bar:last-child {
  margin-bottom: 0;
}

.trait-bar__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-sm);
}

.trait-bar__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}

.trait-bar__score {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-accent);
}

.trait-bar__track {
  height: 10px;
  background: var(--color-surface-alt);
  border-radius: 5px;
  overflow: hidden;
}

.trait-bar__fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.trait-description {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Result sections */
.result-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.result-section h3 {
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.result-section p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.result-section--crisis {
  border-left: 3px solid var(--color-danger);
  background: rgba(219, 68, 55, 0.03);
}

.disclaimer {
  background: var(--color-surface-alt);
  border-left: 3px solid var(--color-warning);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--color-text);
  display: block;
  margin-bottom: var(--space-xs);
}

/* Share */
.share-section {
  text-align: center;
  padding: var(--space-xl) 0;
}

.share-section h4 {
  margin-bottom: var(--space-lg);
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: white;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-btn--whatsapp {
  background: #25D366;
}

.share-btn--twitter {
  background: #1DA1F2;
}

.share-btn--facebook {
  background: #1877F2;
}

.share-btn--copy {
  background: var(--color-primary);
}

.result-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* ============================================
   INFO SECTION (homepage trust block)
   ============================================ */
.info-section {
  padding: var(--space-3xl) 0;
}

.info-section .result-section {
  text-align: center;
}

.info-section .result-section h3 {
  justify-content: center;
}

.info-section .result-section p+p {
  margin-top: var(--space-md);
}

/* ============================================
   STATIC PAGES (about, privacy, terms)
   ============================================ */
.page-header {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
}

.page-header h1 {
  margin-bottom: var(--space-md);
}

.page-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-3xl);
}

.page-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.page-content p {
  margin-bottom: var(--space-md);
  font-size: 0.975rem;
}

.page-content ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  color: var(--color-text-secondary);
}

.page-content li {
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) 0;
  margin-top: auto;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: white;
}

.footer-logo span {
  color: var(--color-accent-light);
}

.footer-logo img {
  max-height: 32px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
}

/* ============================================
   AD PLACEHOLDER
   ============================================ */
.ad-space {
  background: var(--color-surface-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: var(--space-xl) 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   FOCUS STYLES (keyboard accessibility)
   ============================================ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.option-btn:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.filter-chip:focus-visible {
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* ============================================
   QUESTION CARD TRANSITIONS
   ============================================ */
.question-card {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.option-btn.selected {
  animation: optionPulse 0.3s ease;
}

@keyframes optionPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.015);
  }

  100% {
    transform: scale(1);
  }
}

/* ============================================
   PRINT STYLES (for results page)
   ============================================ */
@media print {

  body::before,
  .site-header,
  .site-footer,
  .ad-space,
  .share-section,
  .result-cta,
  .question-nav {
    display: none !important;
  }

  body {
    background: white;
  }

  .test-container {
    padding: 0;
    max-width: 100%;
  }

  .result-container {
    padding: 0;
  }

  .result-section,
  .bigfive-results,
  .score-display,
  .disclaimer {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .trait-bar__fill {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .severity-bar__segment {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .score-display__label {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* ============================================
   LOADING
   ============================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) 0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border-light);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    padding: var(--space-2xl) 0;
  }

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

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-md);
    gap: var(--space-sm);
  }

  nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }

  .test-intro__details {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .share-buttons {
    flex-direction: column;
    align-items: center;
  }

  .result-cta {
    flex-direction: column;
  }

  .question-card {
    padding: var(--space-xl);
  }

  .score-display__number {
    font-size: 2.5rem;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-categories {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
  }

  .filters-sort {
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 15px;
  }

  .container {
    padding: 0 var(--space-md);
  }

  h1 {
    font-size: 1.75rem;
  }

  .question-card {
    padding: var(--space-lg);
  }

  .severity-labels {
    font-size: 0.6rem;
  }
}