/* Country profile pages — loaded after styles.css + quiz.css.
   Only what the quiz pages don't already have: the flag + outline hero,
   the glance table, the highlighted country on the map, photo cards,
   picture options in the round, and the hub's compact country cards. */

/* ---- Hero: flag beside outline ---- */
.country-hero .ch-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.6rem;
}
.country-hero .ch-flag {
  width: 240px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--paper-alt);
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-hero);
}
.country-hero .ch-shape svg { width: 150px; height: 120px; display: block; }
.country-hero .ch-shape svg path { fill: var(--shape); stroke: var(--shape-line); stroke-width: 0.6; stroke-linejoin: round; }

/* ---- At a glance ---- */
.glance th {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-align: left;
  font-weight: 700;
  width: 34%;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-lite);
  vertical-align: top;
}
.glance td { font-weight: 700; }

/* ---- Where it is: this country lit on its continent ---- */
.country-map svg path.is-here { fill: var(--coral); stroke: var(--ink); stroke-width: 0.8; }

/* ---- Places to find ---- */
.places {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.place-card {
  margin: 0;
  background: var(--ivory);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.place-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid var(--ink);
  background: var(--paper-alt);
}
.place-card figcaption { padding: 0.85rem 1rem 0.95rem; display: grid; gap: 0.35rem; }
.place-card b { font-family: var(--font-display); font-size: 1.05rem; }
.place-card .pc-city { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--coral-dark); }
.place-card p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.place-card .pc-credit { font-size: 0.7rem; color: var(--ink-muted); line-height: 1.4; margin-top: 0.2rem; }
.place-card .pc-credit a { color: var(--ink-muted); text-decoration: underline; }
.places-more { margin: 1rem 0 0; font-weight: 700; }

/* ---- Round: picture options (flags, outlines, photos) ---- */
.mq-options-media { grid-template-columns: 1fr 1fr; }
.mq-opt-media { flex-direction: column; align-items: stretch; padding: 0.5rem; gap: 0.35rem; }
.mq-opt-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; display: block; background: var(--paper-alt); }
.mq-opt-shape { display: block; height: 96px; }
.mq-opt-shape svg { width: 100%; height: 100%; display: block; }
.mq-opt-shape svg path { fill: var(--shape); stroke: var(--shape-line); stroke-width: 0.6; stroke-linejoin: round; }
.mq-opt-media .mq-detail { text-align: center; }
.mq-media img { width: 100%; max-width: 360px; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---- Hub: compact country cards ---- */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
}
.country-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.7rem;
  align-items: center;
  background: var(--ivory);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  min-width: 0;
}
.country-card:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: 2px 3px 0 var(--ink); }
.country-card img { grid-row: 1 / 3; width: 40px; height: 27px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1.5px var(--ink); background: var(--paper-alt); }
.country-card .cc-name { font-weight: 700; font-size: 0.93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.country-card .cc-count { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-muted); letter-spacing: 0.05em; }

@media (max-width: 560px) {
  .country-hero .ch-visual { gap: 1.2rem; }
  .country-hero .ch-flag { width: 168px; height: 112px; }
  .country-hero .ch-shape svg { width: 100px; height: 84px; }
  .mq-options-media { grid-template-columns: 1fr 1fr; }
  .glance th { width: 40%; }
}

@media (prefers-reduced-motion: reduce) {
  .country-card { transition: none; }
  .country-card:hover { transform: none; }
}
