/* WaterScope Country Page v3.1 — visual polish */
/* Designed for the current v3 template */

.country-page {
  --ws-bg: #f3f6f8;
  --ws-surface: #ffffff;
  --ws-surface-alt: #eef3f6;
  --ws-surface-soft: #f8fafb;
  --ws-surface-dark: #0f1724;
  --ws-border: #dbe4eb;
  --ws-border-strong: #c9d6e2;
  --ws-text: #1f2937;
  --ws-text-strong: #111827;
  --ws-muted: #556274;
  --ws-accent: #1e6fb9;
  --ws-accent-soft: #dbeafb;
  --ws-dark-card: #1b2940;
  --ws-radius-sm: 12px;
  --ws-radius: 18px;
  --ws-radius-lg: 24px;
  --ws-shadow-xs: 0 2px 6px rgba(16, 31, 53, 0.04);
  --ws-shadow-sm: 0 8px 22px rgba(16, 31, 53, 0.06);
  --ws-shadow: 0 18px 44px rgba(16, 31, 53, 0.08);

  color: var(--ws-text);
  background: var(--ws-bg);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.country-page,
.country-page button,
.country-page input,
.country-page select,
.country-page textarea {
  font-family: inherit;
  color: var(--ws-text);
}

.country-page .container {
  max-width: 1120px;
  margin: 0 auto;
}

.country-page .container.narrow {
  max-width: 860px;
  margin: 0 auto;
}

.country-page a {
  color: var(--ws-accent);
}

.country-page a:hover {
  opacity: 0.88;
}

.country-page .screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.country-page .kicker,
.country-page .section-kicker,
.country-page .ws-eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ws-accent);
}

.country-page .section {
  padding: 84px 24px;
}

.country-page .section-alt {
  background: var(--ws-surface-alt);
}

.country-page .section-dark {
  background: linear-gradient(180deg, #102032 0%, #0d1623 100%);
  color: #ffffff;
}

.country-page .section-head {
  max-width: 790px;
  margin-bottom: 30px;
}

.country-page h1,
.country-page h2,
.country-page h3 {
  margin: 0;
  color: var(--ws-text-strong);
  letter-spacing: -0.025em;
}

.country-page h1 {
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.country-page h2,
.country-page .section h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  margin-bottom: 12px;
}

.country-page h3,
.country-page .section h3 {
  font-size: 24px;
  line-height: 1.22;
  margin-bottom: 10px;
}

.country-page .section-dark h2,
.country-page .section-dark h3 {
  color: #ffffff;
}

.country-page p,
.country-page li {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ws-muted);
}

.country-page .section-dark p,
.country-page .section-dark li {
  color: rgba(255, 255, 255, 0.9);
}

.country-page p + p {
  margin-top: 0.75em;
}

.country-page .lead,
.country-page .section-intro {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ws-muted);
  margin: 0;
}

/* Hero */
.country-page .country-hero {
  background:
    linear-gradient(135deg, rgba(30, 111, 185, 0.08), rgba(30, 111, 185, 0) 62%),
    linear-gradient(180deg, #f8fbfd 0%, #edf3f6 100%);
  border-bottom: 1px solid var(--ws-border);
  padding: 40px 24px 52px;
}

.country-page .country-hero .container {
  display: grid;
  gap: 30px;
}

.country-page .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--ws-muted);
}

.country-page .breadcrumbs a {
  color: var(--ws-muted);
  text-decoration: none;
}

.country-page .hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.country-page .hero-main h1 {
  margin-bottom: 18px;
}

.country-page .subtitle {
  max-width: 840px;
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ws-muted);
}

.country-page .intro {
  max-width: 780px;
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
  color: var(--ws-text);
}

.country-page .hero-takeaway {
  display: inline-block;
  margin: 20px 0 0;
  padding: 11px 15px;
  border-radius: 999px;
  background: var(--ws-accent-soft);
  color: #0d4f87;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.country-page .hero-side {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-lg);
  padding: 22px;
  box-shadow: var(--ws-shadow);
  backdrop-filter: blur(6px);
}

.country-page .hero-highlights ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}

.country-page .hero-highlights li {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--ws-radius-sm);
  background: #ffffff;
  border: 1px solid var(--ws-border);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ws-text);
  box-shadow: var(--ws-shadow-xs);
}

.country-page .hero-top-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

/* TOC */
.country-page .toc-section {
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ws-border);
}

.country-page .toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.country-page .toc-list li {
  margin: 0;
}

.country-page .toc-list a {
  display: inline-flex;
  align-items: center;
  padding: 10px 13px;
  border-radius: 999px;
  border: 1px solid var(--ws-border);
  background: #ffffff;
  color: var(--ws-text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  box-shadow: var(--ws-shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.country-page .toc-list a:hover {
  transform: translateY(-1px);
  box-shadow: var(--ws-shadow-sm);
  border-color: var(--ws-border-strong);
}

/* Card system */
.country-page .ws-card,
.country-page .sidebar-card,
.country-page .dark-card,
.country-page .table-wrap {
  border-radius: var(--ws-radius);
}

.country-page .ws-card {
  background: var(--ws-surface);
  border: 1px solid var(--ws-border);
  box-shadow: var(--ws-shadow-sm);
}

.country-page .ws-metric-card,
.country-page .ws-stat-box,
.country-page .ws-feature-card,
.country-page .ws-source-summary-card,
.country-page .ws-richtext-card {
  padding: 22px;
}

.country-page .ws-metric-card,
.country-page .ws-stat-box,
.country-page .ws-feature-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.country-page .ws-metric-card:hover,
.country-page .ws-stat-box:hover,
.country-page .ws-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ws-shadow);
  border-color: var(--ws-border-strong);
}

.country-page .ws-feature-card {
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
}

.country-page .ws-feature-card h3 {
  margin-bottom: 10px;
}

.country-page .ws-feature-card p {
  margin: 0;
}

.country-page .ws-feature-meta {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ws-muted);
}

.country-page .ws-metric-value,
.country-page .ws-stat-value {
  margin: 0 0 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ws-text-strong);
}

.country-page .ws-metric-value {
  font-size: clamp(30px, 4vw, 48px);
}

.country-page .ws-stat-value {
  font-size: clamp(24px, 3vw, 34px);
}

.country-page .ws-meta-stack {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.country-page .ws-meta-stack p,
.country-page .ws-stat-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ws-muted);
}

.country-page .ws-meta-stack span {
  display: inline-block;
  min-width: 46px;
  margin-right: 6px;
  font-weight: 700;
  color: var(--ws-text);
}

/* Generic grids */
.country-page .metrics-grid,
.country-page .four-col-grid,
.country-page .three-col,
.country-page .two-by-two-grid,
.country-page .trend-stats {
  display: grid;
  gap: 18px;
}

.country-page .metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.country-page .four-col-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.country-page .three-col,
.country-page .trend-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.country-page .two-by-two-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.country-page .country-metrics-wrap {
  padding-top: 56px;
  padding-bottom: 30px;
}

.country-page .two-col,
.country-page .two-col-alt {
  display: grid;
  gap: 30px;
  align-items: start;
}

.country-page .two-col {
  grid-template-columns: 1.25fr 0.75fr;
}

.country-page .two-col-alt {
  grid-template-columns: 1fr 1fr;
}

/* Sidebar */
.country-page .sidebar-card {
  position: sticky;
  top: 24px;
  background: #ffffff;
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-lg);
  padding: 24px;
  box-shadow: var(--ws-shadow);
}

.country-page .sidebar-card ul,
.country-page .source-power-list ul,
.country-page .watch-list,
.country-page .related-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.country-page .sidebar-card li,
.country-page .source-power-list li,
.country-page .watch-list li {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--ws-radius-sm);
  background: var(--ws-surface-soft);
  border: 1px solid var(--ws-border);
}

.country-page .sidebar-card ul,
.country-page .source-power-list ul,
.country-page .watch-list {
  display: grid;
  gap: 10px;
}

.country-page .sidebar-extra {
  margin-top: 18px;
}

.country-page .sidebar-extra p,
.country-page .methodology-extra p,
.country-page .sources-summary {
  margin: 0;
}

.country-page .methodology-extra {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ws-border);
}

/* Tables */
.country-page .table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--ws-border);
  box-shadow: var(--ws-shadow);
  padding: 8px;
}

.country-page .data-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.country-page .data-table th,
.country-page .data-table td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ws-border);
}

.country-page .data-table thead th {
  background: #f8fbfd;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ws-muted);
}

.country-page .data-table tbody th {
  font-weight: 700;
  color: var(--ws-text);
}

.country-page .data-table tbody td {
  color: var(--ws-muted);
}

/* Dark section */
.country-page .dark-card {
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 22px;
}

.country-page .dark-card p {
  margin: 0;
}

.country-page .risk-meta {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

/* FAQ */
.country-page .faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--ws-border);
}

.country-page .faq-item:last-child {
  border-bottom: 0;
}

.country-page .faq-item h3 {
  margin-bottom: 10px;
}

.country-page .faq-item p {
  margin: 0;
}

/* Rich text / sources */
.country-page .rich-text,
.country-page .rich-text p,
.country-page .rich-text li {
  color: var(--ws-muted);
}

.country-page .ws-source-summary-card,
.country-page .ws-richtext-card {
  padding: 18px 20px;
  margin-bottom: 18px;
}

.country-page .ws-richtext-card ul {
  margin: 0;
  padding-left: 20px;
}

.country-page .ws-richtext-card li + li {
  margin-top: 8px;
}

.country-page .source-power-list {
  margin-top: 28px;
}

.country-page .source-power-list h3 {
  margin-bottom: 14px;
}

.country-page .related-links {
  margin-top: 34px;
}

.country-page .related-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.country-page .related-links li {
  margin: 0;
}

.country-page .related-links a {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--ws-border);
  background: #ffffff;
  color: var(--ws-accent);
  text-decoration: none;
  box-shadow: var(--ws-shadow-xs);
}

.country-page .last-updated {
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ws-muted);
}

/* Mobile / tablet */
@media (max-width: 1024px) {
  .country-page .hero-grid,
  .country-page .two-col,
  .country-page .two-col-alt {
    grid-template-columns: 1fr;
  }

  .country-page .metrics-grid,
  .country-page .four-col-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .country-page .hero-top-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .country-page .sidebar-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .country-page .section,
  .country-page .country-hero {
    padding-left: 20px;
    padding-right: 20px;
  }

  .country-page .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .country-page .metrics-grid,
  .country-page .four-col-grid,
  .country-page .three-col,
  .country-page .two-by-two-grid,
  .country-page .trend-stats,
  .country-page .hero-top-stats {
    grid-template-columns: 1fr;
  }

  .country-page .toc-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .country-page h1 {
    font-size: 36px;
  }

  .country-page .subtitle,
  .country-page .intro,
  .country-page p,
  .country-page li {
    font-size: 17px;
  }

  .country-page h2,
  .country-page .section h2 {
    font-size: 32px;
  }

  .country-page h3,
  .country-page .section h3 {
    font-size: 21px;
  }

  .country-page .ws-metric-value {
    font-size: 34px;
  }

  .country-page .ws-stat-value {
    font-size: 28px;
  }
}

/* Load this AFTER country-page-only.css */

.country-page .hero-grid {
  gap: 34px;
}

.country-page .hero-main h1 {
  margin-bottom: 20px;
}

.country-page .subtitle {
  margin-bottom: 20px;
}

.country-page .intro {
  max-width: 820px;
}

.country-page .hero-top-stats {
  gap: 16px;
}

.country-page .ws-stat-box {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.country-page .section-head {
  margin-bottom: 34px;
}

.country-page .section-head h2 {
  margin-bottom: 14px;
}

.country-page .metrics-grid,
.country-page .four-col-grid,
.country-page .three-col,
.country-page .two-by-two-grid,
.country-page .trend-stats {
  gap: 20px;
}

.country-page .ws-feature-card,
.country-page .dark-card {
  min-height: 100%;
}

.country-page .ws-feature-card {
  padding: 24px;
}

.country-page .ws-feature-card h3 {
  min-height: 58px;
}

.country-page .ws-feature-meta {
  margin-bottom: 12px;
  font-size: 15px;
}

.country-page .ws-feature-card p {
  font-size: 17px;
  line-height: 1.75;
}

.country-page .dark-card p {
  font-size: 17px;
  line-height: 1.78;
}

.country-page .risk-meta {
  margin-bottom: 14px;
  font-size: 14px;
}

.country-page .watch-list {
  gap: 12px;
}

.country-page .watch-list li {
  padding: 14px 16px;
  background: #f8fafb;
  box-shadow: 0 2px 10px rgba(16, 31, 53, 0.03);
}

.country-page .faq-item h3 {
  font-size: 24px;
}

.country-page .faq-item p,
.country-page .methodology-extra p,
.country-page .sidebar-extra p,
.country-page .sources-summary,
.country-page .rich-text,
.country-page .rich-text p,
.country-page .rich-text li {
  font-size: 17px;
  line-height: 1.8;
}

.country-page .source-power-list ul {
  gap: 8px;
}

.country-page .source-power-list li {
  padding: 9px 12px;
}

.country-page .related-links {
  margin-top: 28px;
}

.country-page .related-links a {
  padding: 9px 13px;
}

.country-page .table-wrap {
  box-shadow: 0 14px 34px rgba(16, 31, 53, 0.06);
}

.country-page .data-table th,
.country-page .data-table td {
  padding: 16px 18px;
}

.country-page .section + .section,
.country-page .country-metrics-wrap + .section {
  border-top: 1px solid rgba(217, 226, 234, 0.35);
}

@media (max-width: 1024px) {
  .country-page .hero-grid {
    gap: 26px;
  }

  .country-page .ws-feature-card h3 {
    min-height: 0;
  }

  .country-page .ws-stat-box {
    min-height: 136px;
  }
}

@media (max-width: 720px) {
  .country-page .section-head {
    margin-bottom: 26px;
  }

  .country-page .ws-feature-card,
  .country-page .ws-metric-card,
  .country-page .ws-stat-box,
  .country-page .dark-card {
    padding: 20px;
  }

  .country-page .ws-feature-card p,
  .country-page .dark-card p,
  .country-page .faq-item p,
  .country-page .methodology-extra p,
  .country-page .sidebar-extra p,
  .country-page .sources-summary,
  .country-page .rich-text,
  .country-page .rich-text p,
  .country-page .rich-text li {
    font-size: 16px;
    line-height: 1.75;
  }

  .country-page .watch-list li {
    padding: 12px 14px;
  }
}

