/*
  Serranxia compact-country article
  Page-local only. Uses shared archive/theme variables and changes no dark-mode geometry.
*/

.serranxia-page {
  --serranxia-rule: var(--theme-rule);
  --serranxia-ink: var(--theme-ink);
  --serranxia-muted: var(--theme-muted);
  --serranxia-paper: var(--theme-paper);
  --serranxia-paper-light: var(--theme-paper-light);
  --country-rule: var(--serranxia-rule);
  --country-rule-strong: var(--serranxia-rule);
  --country-wrap-width: min(calc(100% - 2rem), 74rem);
  --country-wrap-padding: 0;
  --country-hero-columns: minmax(0, 0.92fr) minmax(22rem, 1.08fr);
  --country-hero-gap: clamp(2rem, 6vw, 5rem);
  --country-hero-padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
  --country-map-link-display: block;
  --country-map-min-height: 0;
  --country-map-padding: 0;
  --country-map-frame-border: 0;
  --country-map-frame-background: transparent;
  --country-map-frame-shadow: none;
  --country-map-image-border: 1px solid var(--serranxia-rule);
  --country-map-image-background: var(--serranxia-paper-light);
  --country-map-image-shadow: 10px 12px 0 color-mix(in srgb, var(--serranxia-ink) 10%, transparent);
  --country-map-caption-margin: .7rem 0 0;
  --country-map-caption-font: 700 .7rem Inter, Arial, sans-serif;
  --country-facts-columns: repeat(4, minmax(0, 1fr));
  --country-fact-min-height: 0;
  --country-fact-padding: 1rem 1.1rem;
  --country-fact-term-margin-bottom: 0;
  --country-fact-label-color: var(--serranxia-muted);
  --country-fact-label-font: 800 .66rem Inter, Arial, sans-serif;
  --country-fact-value-margin: .35rem 0 0;
  --country-fact-value-size: .98rem;
  color: var(--serranxia-ink);
  font-family: Georgia, "Times New Roman", serif;
}

.serranxia-main {
  padding-top: clamp(2.5rem, 6vw, 5rem);
}

.serranxia-hero {
  border-bottom: 1px solid var(--serranxia-rule);
}

.serranxia-hero-copy {
  min-width: 0;
}

.serranxia-hero h1 {
  margin: 0 0 1rem;
}

.serranxia-deck {
  max-width: 34rem;
  margin: 0 0 1.5rem;
  color: var(--serranxia-ink);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  line-height: 1.4;
}

.serranxia-hero-copy > p:not(.eyebrow):not(.serranxia-deck) {
  max-width: 41rem;
}

.serranxia-section {
  padding: clamp(3.25rem, 7vw, 6rem) 0;
  border-bottom: 1px solid var(--serranxia-rule);
}

.serranxia-section:last-child {
  border-bottom: 0;
}

.serranxia-section-heading h2 {
  margin: 0;
}

.serranxia-wide-heading {
  max-width: 54rem;
  margin-bottom: 2rem;
}

.serranxia-wide-heading > p:last-child {
  max-width: 46rem;
  margin-top: 1rem;
  color: var(--serranxia-muted);
}

.serranxia-settlement-type,
.serranxia-related-grid span {
  color: var(--serranxia-muted);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.serranxia-two-column {
  display: grid;
  grid-template-columns: minmax(13rem, 0.43fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: start;
}

.serranxia-sticky-heading {
  position: sticky;
  top: 7rem;
}

.serranxia-copy {
  min-width: 0;
}

.serranxia-copy p:first-child {
  margin-top: 0;
}

.serranxia-copy p {
  max-width: 66ch;
}

.serranxia-power-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.serranxia-panel,
.serranxia-settlement,
.serranxia-related-grid a {
  border: 1px solid var(--serranxia-rule);
  background: color-mix(in srgb, var(--serranxia-paper-light) 58%, transparent);
}

.serranxia-panel {
  padding: 1.35rem 1.4rem;
}

.serranxia-panel h3,
.serranxia-settlement h3 {
  margin: 0.4rem 0 0.65rem;
}

.serranxia-panel p,
.serranxia-settlement p {
  margin-bottom: 0;
  color: var(--serranxia-muted);
}

.serranxia-panel-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(10rem, 0.32fr) minmax(0, 1fr);
  column-gap: 2rem;
  align-items: start;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.serranxia-panel-featured .eyebrow {
  grid-row: 1 / span 2;
  margin: 0;
}

.serranxia-panel-featured h3 {
  margin-top: 0;
}

.serranxia-panel-featured p:last-child {
  max-width: 58rem;
}

.serranxia-settlement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.serranxia-settlement {
  min-height: 12rem;
  padding: 1.3rem 1.35rem;
}

.serranxia-settlement-primary {
  grid-column: span 2;
}

.serranxia-settlement-primary p {
  max-width: 50rem;
}

.serranxia-settlement-small {
  min-height: 10rem;
}

.serranxia-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.serranxia-related-grid a {
  display: block;
  min-width: 0;
  padding: 1.2rem 1.25rem;
  color: var(--serranxia-ink);
  text-decoration: none;
}

.serranxia-related-grid a:hover {
  transform: translateY(-1px);
}

.serranxia-related-grid strong,
.serranxia-related-grid small {
  display: block;
}

.serranxia-related-grid strong {
  margin: 0.45rem 0 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.serranxia-related-grid small {
  color: var(--serranxia-muted);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.5;
}

@media (max-width: 950px) {
  .serranxia-page { --country-hero-columns: 1fr; --country-facts-columns: repeat(2, minmax(0, 1fr)); }

  .serranxia-map-card {
    max-width: 48rem;
  }

  .serranxia-power-grid,
  .serranxia-settlement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .serranxia-settlement-primary {
    grid-column: 1 / -1;
  }

  .serranxia-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .serranxia-page { --country-wrap-width: min(calc(100% - 1.5rem), 74rem); --country-hero-gap: 2rem; --country-hero-padding-bottom: 3rem; --country-facts-columns: 1fr; }

  .serranxia-main {
    padding-top: 2rem;
  }

  .serranxia-power-grid,
  .serranxia-settlement-grid,
  .serranxia-related-grid,
  .serranxia-two-column,
  .serranxia-panel-featured {
    grid-template-columns: 1fr;
  }

  .serranxia-sticky-heading {
    position: static;
  }

  .serranxia-panel-featured .eyebrow {
    grid-row: auto;
  }

  .serranxia-settlement-primary {
    grid-column: auto;
  }
}
