/* =============================================
   COUNTRY HISTORY — country category pages
   Layout only; typography and colours come from the theme.
   ============================================= */

.country-history__intro {
  margin-bottom: 3rem;
}

.country-history__gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 1300px;
  margin: 0 auto 4rem;
}

.country-history__gallery figure {
  margin: 0;
  flex: 0 1 150px;
  min-width: 130px;
  box-sizing: border-box;
  padding: 10px 10px 12px;
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
}

/* Photo always fits inside its box, never cropped or stretched */
.country-history__gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

/* Caption stays inside the box: max two lines, same height everywhere */
.country-history__gallery figcaption {
  margin-top: 0.6rem;
  font-size: 0.68rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-light);
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.country-history__body {
  max-width: var(--content-width);
  margin: 0 auto;
}

.country-history__chapter {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border-light);
}

.country-history__chapter h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.5vw + 0.8rem, 1.8rem);
  font-weight: 400;
  color: var(--color-text);
  margin: 0 0 1rem;
}

.country-history__chapter p,
.country-history__chapter li {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text-light);
}

.country-history__chapter p {
  margin: 0 0 1rem;
}

.country-history__chapter ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.country-history__chapter strong {
  color: var(--color-text);
  font-weight: 600;
}

.country-history__nation {
  margin-bottom: 1.6rem;
}

.country-history__nation h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text);
  margin: 0 0 0.2rem;
}

.country-history__brand {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
}

.country-history__nation p {
  margin: 0;
}

.country-history__rows {
  display: grid;
  grid-template-columns: 9rem 1fr;
  margin: 0;
}

.country-history__rows dt,
.country-history__rows dd {
  margin: 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 1rem;
  line-height: 1.6;
}

.country-history__rows dt {
  font-family: var(--font-display);
  color: var(--color-accent);
  padding-right: 1rem;
}

.country-history__rows dd {
  color: var(--color-text-light);
}

.country-history__outro {
  padding-top: 3rem;
  border-top: 1px solid var(--color-border-light);
  max-width: var(--content-width);
}

.country-history__lineage {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-text);
  margin: 1rem 0 0;
}

@media (max-width: 600px) {
  .country-history__rows { grid-template-columns: 6rem 1fr; }
}

/* Country pills — one line, same width as the history column */
.filter-tabs--countries {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs--countries::-webkit-scrollbar { display: none; }

.filter-tabs--countries .filter-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .filter-tabs--countries { justify-content: flex-start; }
}
