body {
  background-color: var(--sand);
  color: var(--ink);
  margin: 0;
  padding-top: 110px; /* clear the fixed navbar */
}

main {
  padding: 0 40px 40px;
}

.continent-section {
  margin-bottom: 56px;
}

.continent-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--ink);
  margin-bottom: 16px;
  position: relative;
  padding-left: 16px;
}

.continent-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--crimson);
  border-radius: 2px;
}

.scroll-row {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 16px;
  padding-bottom: 18px;
  /* Pas de scroll-snap ici : ça entrait en conflit avec le défilement
     automatique piloté en JS (requestAnimationFrame) et provoquait
     l'effet de "slide" saccadé au lieu d'un scroll fluide et continu. */
}

.scroll-row::-webkit-scrollbar {
  height: 8px;
}

.scroll-row::-webkit-scrollbar-thumb {
  background-color: var(--stone);
  border-radius: 4px;
}

.scroll-row::-webkit-scrollbar-track {
  background: transparent;
}

.country-card {
  position: relative;
  width: 220px;
  height: 260px;
  flex-shrink: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.country-card.filtered-out {
  display: none;
}

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

.country-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  /* Graceful fallback when an image file is missing */
  background: linear-gradient(135deg, var(--ink-soft), var(--ink));
  color: transparent;
  font-size: 0;
}

.country-card:hover .country-image {
  transform: scale(1.05);
}

.country-name {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(20, 33, 61, 0.92), rgba(20, 33, 61, 0));
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 26px 14px 12px;
  text-align: left;
  box-sizing: border-box;
}

/* Continent search header */
.continent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 1rem;
}

.country-filter {
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--stone);
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  width: 280px;
  max-width: 100%;
  outline: none;
  background: var(--paper);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.country-filter:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-tint);
}

/* FAQ styles */
.faq-section {
  background: var(--paper);
  padding: 40px;
  border: 1px solid var(--stone);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  max-width: 820px;
  margin: 64px auto 40px;
}

.faq-section h2 {
  font-family: var(--font-display);
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--ink);
}

#faq-search {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: var(--font-body);
  margin-bottom: 22px;
  border: 1px solid var(--stone);
  border-radius: 12px;
  box-sizing: border-box;
  background: var(--sand);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#faq-search:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-tint);
}

.faq-categories {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.faq-category {
  background: var(--stone-soft);
  color: var(--ink);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
}

.faq-category:hover {
  background: var(--crimson);
  color: white;
}

.faq-item {
  margin-bottom: 6px;
  border-bottom: 1px solid var(--stone);
}

.faq-question {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.05rem;
  padding: 18px 0;
  cursor: pointer;
  outline: none;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding-right: 32px;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--crimson);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: "\2013";
}

.faq-answer {
  padding: 0 4px 20px;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 600px) {
  main {
    padding: 0 16px 24px;
  }
  .country-card {
    width: 150px;
    height: 190px;
  }
  .faq-section {
    padding: 24px 18px;
    margin: 32px 4px;
  }
  .faq-category {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  .faq-question {
    font-size: 0.98rem;
  }
  .faq-answer {
    font-size: 0.95rem;
  }
}
