/* Country-specific styles (UTF-8). Keep global header/footer styles in style.css */
/* Encoding: UTF-8 */

:root {
  --country-accent: #0ea5e9; /* sky-500 */
  --country-dark: #0f172a;   /* slate-900 */
  --country-text: #0f172a;
  --country-muted: #64748b;  /* slate-500 */
  --country-bg: #f8fafc;     /* slate-50 */
}

/* Page wrapper */
.country-page {
  background: var(--country-bg);
}

/* Hero */
.country-hero {
  padding: 64px 0 32px;
  background: linear-gradient(180deg, #e0f2fe 0%, #f8fafc 100%);
}
.country-hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}
.country-hero h1 {
  font-size: 40px;
  line-height: 1.2;
  color: var(--country-text);
  margin: 0 0 12px;
  text-align: center; /* center title */
}
.country-hero p.lead {
  font-size: 18px;
  color: var(--country-muted);
  text-align: center; /* center intro text */
}
.country-hero .hero-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center; /* center badge items */
  background: #fff;
  border: 1px solid #e2e8f0;
  color: var(--country-text);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  margin-top: 12px;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.12);
}
/* Hero CTA button */
.country-hero .hero-cta { text-align: center; margin-top: 14px; }
.country-hero .hero-cta .btn {
  display: inline-block;
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  letter-spacing: 0.2px;
  border: 0;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.country-hero .hero-cta .btn:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 12px 24px rgba(2,132,199,.3); }
.country-hero .hero-cta .btn:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(2,132,199,.28); }

/* Unified button style for all country pages */
.country-page .btn {
  display: inline-block;
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  letter-spacing: 0.2px;
  border: 0;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  text-decoration: none;
}
.country-page .btn:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 12px 24px rgba(2,132,199,.3); }
.country-page .btn:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(2,132,199,.28); }
.country-hero .hero-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.15);
}

/* Profiles */
.section {
  padding: 48px 0;
}
.section .section-title {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--country-text);
  text-align: center; /* center section headings */
}
.section .section-subtitle {
  color: var(--country-muted);
  margin-bottom: 24px;
  text-align: center; /* center section subheadings */
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.profile-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.profile-card img {
  width: 100%;
  height: 240px; /* unified height */
  object-fit: cover;
}
.profile-card .content {
  padding: 14px 14px 16px;
}
.profile-card .name {
  font-weight: 700;
  color: var(--country-text);
}
.profile-card .meta {
  font-size: 14px;
  color: var(--country-muted);
  margin: 6px 0 10px;
}
.profile-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 12px;
  color: var(--country-text);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 10px;
}

/* Testimonials fallback: unify layout and image sizes without changing HTML */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonials .quote {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.testimonials .quote img {
  width: 100%;
  height: 240px; /* unified height */
  object-fit: cover;
  display: block;
}
.testimonials .quote strong {
  display: block;
  padding: 12px 14px 0;
  color: var(--country-text);
}
.testimonials .quote p {
  padding: 8px 14px 14px;
  color: var(--country-muted);
}

/* Cities/Regions */
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.region-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}
.region-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  display: block;
}
.region-card h3 { margin: 0 0 6px; font-size: 18px; }
.region-card p { margin: 0; color: var(--country-muted); }

/* Language dropdown behavior on country pages: click-to-open (aligns with index.html) */
/* Show dropdown only when the parent .lang has .open class */
.country-page .lang.open .lang-menu { display: block; }
/* Ensure the dropdown overlays content correctly */
.country-page .site-header .lang-menu { z-index: 2000; }
.country-page .lang { position: relative; }
.country-page .lang-toggle { display: flex; align-items: center; gap: 8px; background: rgba(63,61,86,.12); color: #111827; border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.country-page .lang-menu { position: absolute; top: 42px; right: 0; width: 320px; background: #ffffff; color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 24px rgba(17,24,39,.18); display: none; max-height: 380px; overflow: auto; }
.country-page .lang-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.country-page .lang-menu a:last-child { border-bottom: 0; }
.country-page .lang-menu a:hover { background: #f3f4f6; }
.country-page .lang-menu .group-title { padding: 8px 12px; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .2px; color: #6b7280; background: #f9fafb; border-bottom: 1px solid var(--border); }

/* Mobile menu fallback (works without JS) */
@media (max-width: 720px) {
  /* When header or any of its children has focus (e.g., tapping Menu), show overlay menu */
  .country-page header.site-header:focus-within nav.menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    position: fixed;
    inset: 0;
    background: #fff;
    padding: 70px 24px 24px;
    z-index: 1200;
    overflow-y: auto;
  }
  .country-page header.site-header:focus-within nav.menu a {
    color: #3f3d56;
    font-weight: 600;
    font-size: 18px;
    padding: 12px 8px;
    border-radius: 8px;
  }
/* Language dropdown inside overlay when opened via focus */
.country-page header.site-header:focus-within .lang { margin-top: 8px; }
  .country-page header.site-header:focus-within .lang-toggle { background: #ececf9; color: #3f3d56; font-weight: 700; }
  .country-page header.site-header:focus-within .lang-menu { position: static; width: 100%; right: auto; top: auto; box-shadow: 0 12px 24px rgba(17,24,39,.12); max-height: none; }
  .country-page header.site-header:focus-within .lang-menu .group-title { position: sticky; top: 0; z-index: 1; }
  /* Show a close button even without JS; tapping outside header will close due to loss of focus */
  .country-page header.site-header:focus-within .menu-close {
    display: block;
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 1300;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #3f3d56;
    line-height: 1;
    cursor: pointer;
  }
}

/* Features with SVG */
.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr)); /* widen cards to avoid overly narrow text */
  gap: 18px;
}
.feature {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}
/* Center content within feature cards on country pages */
.country-page .features { justify-items: center; }
.country-page .feature { display: flex !important; flex-direction: column; align-items: center; text-align: center; }
.country-page .feature svg { width: 28px; height: 28px; color: var(--country-accent); margin-bottom: 6px; }
.country-page .feature .title { font-weight: 700; margin: 8px 0 6px; text-align: center; }
.country-page .feature p { color: var(--country-muted); font-size: 14px; text-align: center; }

/* Tables: responsive, no overflow on mobile */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.table thead th {
  background: #f9fafb;
  color: var(--country-text);
  font-weight: 700;
}
.table th, .table td {
  border: 1px solid #e2e8f0;
  padding: 12px;
  text-align: left;
  color: var(--country-text);
  vertical-align: top;
  /* Prevent long text from overflowing */
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.table { table-layout: fixed; }

@media (max-width: 720px) {
  .table th, .table td { padding: 10px; font-size: 14px; }
  .table { table-layout: fixed; }
}

/* CTA */
.cta {
  background: #0ea5e9;
  color: #fff;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}
.cta h2 { margin: 0 0 10px; }
.cta a.btn {
  display: inline-block;
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px; /* bigger button */
  font-weight: 800;
  letter-spacing: 0.2px;
  border: 0;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.cta a.btn:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 12px 24px rgba(2,132,199,.3); }
.cta a.btn:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(2,132,199,.28); }

/* Center all action button groups on country pages */
.country-page .actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  text-align: center;
}
.country-page .actions .btn { margin: 0 4px; }

/* Country table styles (used by city overview sections) */
.table-wrap { overflow-x: auto; margin-top: 8px; }
.country-table { width: 100%; border-collapse: collapse; }
.country-table thead th {
  text-align: left;
  font-weight: 800;
  color: var(--country-text);
  padding: 12px 14px;
  border-bottom: 2px solid #e2e8f0;
}
.country-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--country-text);
}
.country-table tbody tr:hover { background: #f9fafb; }

@media (max-width: 720px) {
  .country-table thead { display: none; }
  .country-table, .country-table tbody, .country-table tr, .country-table td { display: block; width: 100%; }
  .country-table tr { margin-bottom: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
  .country-table td { border-bottom: 0; padding: 10px 12px; }
  .country-table td::before { content: attr(data-label) ": "; font-weight: 700; color: var(--country-muted); }
}

/* Stats overrides for country pages: readable on light background */
.country-page .stats { gap: 16px; }
.country-page .stat { background: #fff; border: 1px solid #e2e8f0; color: var(--country-text); box-shadow: 0 6px 14px rgba(15,23,42,.06); }
.country-page .stat .label { color: var(--country-muted); opacity: 1; }

/* Responsive */
@media (max-width: 900px) {
  .country-hero .container { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .region-grid { grid-template-columns: repeat(2, 1fr); }
  .country-hero .hero-image img { height: 240px; }
}
@media (max-width: 640px) {
  .profile-grid { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .region-grid { grid-template-columns: 1fr; }
  /* Center footer on mobile for country pages */
  .country-page .site-footer .footer-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .country-page .site-footer .footer-brand { align-items: center; }
  .country-page .site-footer .footer-bottom { text-align: center; }
}