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

:root {
  --primary: #1a365d;
  --primary-light: #2a4a7f;
  --accent: #c9953c;
  --accent-light: #daa84e;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #ffffff;
  --bg-alt: #f7fafc;
  --bg-dark: #0f2440;
  --border: #e2e8f0;
  --success: #38a169;
  --error: #e53e3e;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Typography === */
h1, h2, h3, h4 {
  color: var(--primary);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #1a365d;
}

/* === Navigation === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navbar-bg, rgba(255, 255, 255, 0.97));
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-logo svg {
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
  margin-left: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-btn {
  padding: 0.35rem 0.75rem;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
  transition: all var(--transition);
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
}

.lang-btn:hover:not(.active) {
  background: var(--bg-alt);
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
  border-radius: 2px;
}

/* === Hero === */
.hero {
  padding: 10rem 0 6rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at 70% 50%, rgba(201, 149, 60, 0.15) 0%, transparent 70%);
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 3rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.35rem;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === About === */
.about {
  padding: 6rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.25rem;
  color: var(--text-light);
  font-size: 1.05rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

.about-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-lg);
}

.about-image-placeholder svg {
  width: 120px;
  height: 120px;
}

/* === Services === */
.services {
  padding: 6rem 0;
  background: var(--bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--bg);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid transparent;
}

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

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: #fff;
}

.service-icon svg {
  width: 28px;
  height: 28px;
}

.service-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* === Why Section === */
.why {
  padding: 6rem 0;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.why-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.why-icon {
  width: 72px;
  height: 72px;
  background: var(--bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--accent);
}

.why-icon svg {
  width: 32px;
  height: 32px;
}

.why-card h3 {
  margin-bottom: 0.75rem;
}

.why-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* === Contact === */
.contact {
  padding: 6rem 0;
  background: var(--bg-alt);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
}

.contact-details svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

/* === Form === */
.contact-form {
  background: var(--bg);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg);
  color-scheme: light;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  color-scheme: dark;
}

.form-group select option {
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 149, 60, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.form-checkbox input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.form-checkbox label {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
}

.form-message.success {
  background: #f0fff4;
  color: var(--success);
  border: 1px solid var(--success);
  display: block;
}

.form-message.error {
  background: #fff5f5;
  color: var(--error);
  border: 1px solid var(--error);
  display: block;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1.05rem;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === Footer === */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .nav-logo {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.footer-nav a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

/* === Dark Mode === */
[data-theme="dark"] {
  --primary: #a3bfdf;
  --primary-light: #c2d6ed;
  --accent: #daa84e;
  --accent-light: #e8be6e;
  --text: #e2e8f0;
  --text-light: #a0aec0;
  --bg: #1a202c;
  --bg-alt: #2d3748;
  --bg-dark: #0d1117;
  --border: #4a5568;
  --navbar-bg: rgba(26, 32, 44, 0.97);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0d1117 0%, #1a202c 100%);
}

[data-theme="dark"] .form-message.success {
  background: rgba(56, 161, 105, 0.15);
}

[data-theme="dark"] .form-message.error {
  background: rgba(229, 62, 62, 0.15);
}

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background: var(--bg-alt);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.theme-toggle .icon-sun {
  display: block;
}

/* === Quiz Styles === */
.quiz-section {
  padding: 10rem 0 6rem;
  min-height: 80vh;
}

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

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-left: 1rem;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.quiz-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.quiz-question {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.quiz-option-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-alt);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(201, 149, 60, 0.08);
}

.quiz-option-correct {
  border-color: var(--success) !important;
  background: rgba(56, 161, 105, 0.12) !important;
  color: var(--success);
  font-weight: 600;
}

.quiz-option-wrong {
  border-color: var(--error) !important;
  background: rgba(229, 62, 62, 0.12) !important;
  color: var(--error);
}

.quiz-option-disabled {
  cursor: default !important;
  opacity: 0.65;
}

.quiz-option-correct,
.quiz-option-wrong {
  opacity: 1 !important;
}

.quiz-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
}

.quiz-feedback-correct {
  background: rgba(56, 161, 105, 0.12);
  color: var(--success);
}

.quiz-feedback-wrong {
  background: rgba(229, 62, 62, 0.12);
  color: var(--error);
}

.quiz-nav {
  margin-top: 1.5rem;
}

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

.quiz-results {
  text-align: center;
  padding: 2rem 0;
}

.quiz-results-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.quiz-results-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.quiz-results-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.quiz-results-pct {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-light);
}

.quiz-results-bar {
  width: 100%;
  max-width: 400px;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}

.quiz-results-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 5px;
  transition: width 1s ease;
}

.quiz-results-text {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.quiz-results-message {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 2rem;
  font-weight: 500;
}

.quiz-results-actions {
  margin-bottom: 2.5rem;
}

.quiz-results-cta {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.quiz-results-cta p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.quiz-results-cta .btn-outline {
  color: var(--accent);
  border-color: var(--accent);
}

.quiz-results-cta .btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.quiz-start {
  text-align: center;
  padding: 2rem 0;
}

.quiz-start p {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.quiz-count-select {
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.quiz-count-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  font-weight: 600;
}

.quiz-count-btn:hover,
.quiz-count-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* === Animations === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 968px) {
  h1 { font-size: 2.25rem; }
  .hero h1 { font-size: 2.5rem; }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-image { order: -1; }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid .why-card:last-child {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

@media (max-width: 640px) {
  html { font-size: 15px; }

  .hero { padding: 8rem 0 4rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.1rem; }

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

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .why-grid .why-card:last-child {
    max-width: none;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  section {
    padding: 4rem 0;
  }
}
