/* --------------------------------------------------
   ROOT VARIABLES
-------------------------------------------------- */
:root {
  --primary: #1b7fd3;
  --primary-dark: #0f5fa3;
  --bg: #f7f9fc;
  --bg-alt: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* --------------------------------------------------
   BASE
-------------------------------------------------- */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1100px, 90%);
  margin: auto;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section-lead {
  max-width: 600px;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* --------------------------------------------------
   HEADER
-------------------------------------------------- */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

/* --------------------------------------------------
   NAVIGATION
-------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.nav-list {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin-left: auto;
}

.nav-list a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.btn-nav {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  color: var(--primary);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
}

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text);
  transition: transform 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.15);
}

.theme-icon {
  pointer-events: none;
}

/* --------------------------------------------------
   MOBILE NAVIGATION — Option 1 (Slide-down)
-------------------------------------------------- */
@media (max-width: 800px) {
  .nav {
    justify-content: space-between; /* logo | hamburger | toggle */
  }

  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 1rem;
    width: 220px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.25s ease;
  }

  .nav-list.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------
   HERO
-------------------------------------------------- */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #eaf4ff, #ffffff);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.hero-sub {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* --------------------------------------------------
   BUTTONS
-------------------------------------------------- */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-primary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  border: 2px solid #fff;
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  margin-left: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------
   CARDS
-------------------------------------------------- */
.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
}

/* --------------------------------------------------
   SEARCH INPUT
-------------------------------------------------- */
.search-input {
  width: 100%;
  max-width: 500px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 1rem;
  margin-top: 1rem;
}

.no-results {
  text-align: center;
  color: var(--muted);
  margin-top: 1rem;
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */
.site-footer {
  padding: 2rem 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* --------------------------------------------------
   FORM FIELD ENHANCEMENTS
-------------------------------------------------- */
.form {
  max-width: 450px;
}

.form-field {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.9rem 0.75rem 0.4rem;
  border-radius: 6px;
  border: 1px solid #c9c9c9;
  background: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 127, 211, 0.15);
}

.form-field label {
  position: absolute;
  top: 0.85rem;
  left: 0.75rem;
  font-size: 0.9rem;
  color: #777;
  background: #fff;
  padding: 0 0.25rem;
  transition: all 0.2s ease;
}

.form-field.filled label,
.form-field input:focus + label,
.form-field textarea:focus + label,
.form-field select:focus + label {
  top: -0.55rem;
  font-size: 0.75rem;
  color: var(--primary);
}

.field-hint {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
}

.field-error {
  font-size: 0.8rem;
  color: #d60000;
  margin-top: 0.25rem;
  display: none;
}

.shake {
  animation: shake 0.3s ease;
}

@keyframes shake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
}

/* --------------------------------------------------
   HUMAN VERIFICATION CARD
-------------------------------------------------- */
.verification-card {
  border: 1px solid #d8ecd8;
  background: #f7fff7;
  padding: 1.25rem;
  border-radius: 8px;
  margin-top: 1.5rem;
}

.verification-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.verification-check {
  color: #1a8f1a;
  font-weight: bold;
  font-size: 1.2rem;
  display: none;
}

.verification-status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #444;
}

/* --------------------------------------------------
   SUCCESS PANEL
-------------------------------------------------- */
.success-box {
  display: none;
  background: #e6ffea;
  border: 1px solid #8fd19b;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.success-box.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------
   PRIVACY NOTE
-------------------------------------------------- */
.privacy-note {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.5rem;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */
@media (max-width: 600px) {
  .verification-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-field {
    margin-bottom: 1.25rem;
  }

  .success-box {
    padding: 1.25rem;
  }
}

/* --------------------------------------------------
   DARK MODE
-------------------------------------------------- */

/* Auto dark mode (system preference) */
@media (prefers-color-scheme: dark) {
  :root:not(.dark-mode):not(.light-mode) {
    --bg: #0f1115;
    --bg-alt: #1a1d22;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #2d3239;
    --shadow: 0 8px 24px rgba(0,0,0,0.45);

    --primary: #4ea3ff;
    --primary-dark: #1f6bb3;
  }
}

/* Manual dark mode override */
.dark-mode {
  --bg: #0f1115;
  --bg-alt: #1a1d22;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #2d3239;
  --shadow: 0 8px 24px rgba(0,0,0,0.45);

  --primary: #4ea3ff;
  --primary-dark: #1f6bb3;
}

/* Manual light mode override */
.light-mode {
  /* optional override */
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem 0;
  list-style: none;
  display: none;
  min-width: 160px;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background: var(--bg);
}

/* Show on hover (desktop) */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Mobile: show when nav-list is open */
@media (max-width: 800px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }
}

/* Footer Grid */
.footer-inner {
  padding: 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: var(--text);
}

/* Social icons */
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-social .icon {
  width: 22px;
  height: 22px;
  fill: var(--muted);
  transition: fill 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover .icon {
  fill: var(--primary);
  transform: scale(1.15);
}

.footer-copy {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Force all footer columns to left-align */
.footer-col {
  text-align: left;
}

/* Ensure social icons align left */
.footer-social {
  justify-content: flex-start;
}
