/* ============================================================
   Country Pages — Shared Stylesheet
   Matches roboticscenter.ai main site design system
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* --- Design tokens (same as main styles.css) --- */
:root {
  --color-bg: #08090b;
  --color-bg-deep: #050608;
  --color-bg-elevated: #0e1014;
  --color-bg-card: #111318;
  --color-surface: #161a20;
  --color-surface-hover: #1c2129;
  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-hover: rgba(255, 255, 255, 0.14);
  --color-border-glow: rgba(200, 245, 60, 0.2);
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dim: #7a8fa8;
  --color-accent: #c8f53c;
  --color-accent-dim: rgba(200, 245, 60, 0.10);
  --color-accent-glow: rgba(200, 245, 60, 0.22);
  --color-success: #34d399;
  --font-display: 'Syne', 'SF Pro Display', sans-serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(200, 245, 60, 0.06);
  --shadow-glow: 0 0 24px rgba(200, 245, 60, 0.08);
}

/* --- Light mode override --- */
[data-theme="light"] {
  --color-bg: #f5f7fb;
  --color-bg-deep: #eff3f9;
  --color-bg-elevated: #ffffff;
  --color-bg-card: #ffffff;
  --color-surface: #edf2f8;
  --color-surface-hover: #e4ebf4;
  --color-border: rgba(15, 23, 42, 0.12);
  --color-border-hover: rgba(15, 23, 42, 0.22);
  --color-border-glow: rgba(37, 99, 235, 0.22);
  --color-text: #0f172a;
  --color-text-muted: #334155;
  --color-text-dim: #64748b;
  --color-accent: #2563eb;
  --color-accent-dim: rgba(37, 99, 235, 0.12);
  --color-accent-glow: rgba(37, 99, 235, 0.2);
  --color-success: #059669;
  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 16px 34px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(37, 99, 235, 0.1);
  --shadow-glow: 0 0 18px rgba(37, 99, 235, 0.12);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  background-image:
    radial-gradient(ellipse 100% 100% at 50% 0%, rgba(200, 245, 60, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(200, 245, 60, 0.02) 0%, transparent 40%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Animated top accent bar (same as main site) --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c8f53c 0%, #38bdf8 50%, #c8f53c 100%);
  background-size: 200% 100%;
  animation: accent-bar-shift 6s linear infinite;
  z-index: 10000;
  pointer-events: none;
}
[data-theme="light"] body::before {
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 50%, #2563eb 100%);
  background-size: 200% 100%;
  animation: accent-bar-shift 6s linear infinite;
}
@keyframes accent-bar-shift {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
}

p, li { text-wrap: pretty; }

img { max-width: 100%; height: auto; }

/* --- Container --- */
.country-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   TOPBAR — matches main site .site-header
   ============================================================ */
.country-topbar {
  position: sticky;
  top: 3px; /* below accent bar */
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 2rem;
  background: rgba(6, 8, 12, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

[data-theme="light"] .country-topbar {
  background: rgba(245, 247, 251, 0.92);
}

.country-topbar__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.country-topbar__logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-hover);
  background: var(--color-bg-elevated);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.16);
  transition: border-color var(--transition);
}

.country-topbar__logo:hover {
  border-color: var(--color-border-glow);
}

.country-topbar__logo span {
  color: var(--color-accent);
}

.country-topbar__back {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.country-topbar__back:hover { color: var(--color-text); }

.country-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.country-topbar__cta {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 48%, transparent);
  background: var(--color-accent-dim);
  transition: all var(--transition);
  white-space: nowrap;
}
.country-topbar__cta:hover {
  color: var(--color-text);
  border-color: color-mix(in srgb, var(--color-accent) 72%, transparent);
  background: color-mix(in srgb, var(--color-accent) 20%, transparent);
  box-shadow: 0 6px 16px rgba(200, 245, 60, 0.16);
}

/* ============================================================
   HERO
   ============================================================ */
.country-hero {
  text-align: center;
  padding: 7rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.country-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(200, 245, 60, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
[data-theme="light"] .country-hero::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.06) 0%, transparent 60%);
}

.country-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.4;
}

.country-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-accent-dim);
  border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  color: var(--color-accent);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  position: relative;
}

.country-hero__title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  color: var(--color-text);
  position: relative;
}

.country-hero__subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  position: relative;
}

.country-hero__actions {
  display: inline-flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
  position: relative;
}

/* Trust strip below hero */
.country-hero__trust {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.country-hero__trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.country-hero__trust-icon {
  color: var(--color-accent);
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-dim);
  border-radius: 50%;
}

/* ============================================================
   BUTTONS — matches main site btn / btn-primary / btn-secondary
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #08090b;
}
.btn-primary:hover {
  box-shadow: 0 8px 24px var(--color-accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-hover);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-dim);
}

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.84rem;
}

/* ============================================================
   STATS GRID
   ============================================================ */
.country-stats {
  padding: 3.5rem 1.5rem;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}

.country-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.country-stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}
.country-stat:hover {
  border-color: var(--color-border-glow);
  box-shadow: var(--shadow-card-hover);
}

.country-stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.country-stat__label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* ============================================================
   SECTIONS — generic section wrapper
   ============================================================ */
.country-section {
  padding: 5rem 1.5rem;
}

.country-section--alt {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.country-section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.country-section__title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: var(--color-text);
}

.country-section__subtitle {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   CARDS GRID — verticals, services, policies, ecosystem
   ============================================================ */
.country-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.country-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.country-card:hover {
  border-color: var(--color-border-glow);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.country-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-dim);
  color: var(--color-accent);
  border-radius: var(--radius);
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--color-accent) 16%, transparent);
}

.country-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.country-card__text {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
}

.country-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap var(--transition);
}
.country-card__link:hover {
  gap: 0.5rem;
}

.country-card .btn-sm {
  margin-top: 1.25rem;
  align-self: flex-start;
}

/* ============================================================
   CERT / PILL ROW
   ============================================================ */
.country-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2.5rem;
}

.country-pill {
  background: var(--color-accent-dim);
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
  color: var(--color-accent);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   LEAD MAGNET
   ============================================================ */
.country-lead {
  padding: 5rem 1.5rem;
  background: var(--color-bg-deep);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.country-lead__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.country-lead__title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.country-lead__subtitle {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.country-lead__bullets {
  list-style: none;
  text-align: left;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.country-lead__bullets li {
  padding: 0.4rem 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.country-lead__bullets li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.55rem;
}

.country-lead__form {
  display: flex;
  gap: 0.6rem;
  max-width: 440px;
  margin: 0 auto;
}

.country-lead__form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
}
.country-lead__form input[type="email"]:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-dim);
}

.country-lead__form button {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #08090b;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font-body);
}
.country-lead__form button:hover {
  box-shadow: 0 6px 18px var(--color-accent-glow);
}

.country-lead__success {
  display: none;
  color: var(--color-success);
  font-weight: 600;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.country-lead__error {
  display: none;
  color: #ef4444;
  font-weight: 500;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.country-faq__list {
  max-width: 760px;
  margin: 0 auto;
}

.country-faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: border-color var(--transition);
  box-shadow: var(--shadow-card);
}

.country-faq__item[open] {
  border-color: var(--color-border-glow);
}

.country-faq__item summary {
  padding: 1.1rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text);
  transition: color var(--transition);
}

.country-faq__item summary::-webkit-details-marker { display: none; }

.country-faq__item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--color-accent);
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform var(--transition);
}

.country-faq__item[open] summary::after {
  content: '\2212';
}

.country-faq__item summary:hover { color: var(--color-accent); }

.country-faq__answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================================
   NEIGHBORS
   ============================================================ */
.country-neighbors__row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.country-neighbor {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--color-text);
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}
.country-neighbor:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

/* ============================================================
   CTA — Final call to action
   ============================================================ */
.country-cta {
  text-align: center;
  padding: 6rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.country-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(200, 245, 60, 0.04) 0%, transparent 65%);
  pointer-events: none;
}
[data-theme="light"] .country-cta::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 65%);
}

.country-cta__title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  color: var(--color-text);
}

.country-cta__text {
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
  position: relative;
}

.country-cta__actions {
  position: relative;
  display: inline-flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.country-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-deep);
}

.country-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.country-footer__links a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.country-footer__links a:hover { color: var(--color-accent); }

.country-footer__copy {
  color: var(--color-text-dim);
}

/* ============================================================
   LOCAL COMPANIES strip
   ============================================================ */
.country-companies {
  text-align: center;
  max-width: 800px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.country-companies__title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-dim);
  margin-bottom: 0.5rem;
}

.country-companies__list {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

/* ============================================================
   RTL Support
   ============================================================ */
[dir="rtl"] .country-topbar { flex-direction: row-reverse; }
[dir="rtl"] .country-topbar__left { flex-direction: row-reverse; }
[dir="rtl"] .country-topbar__right { flex-direction: row-reverse; }
[dir="rtl"] .country-lead__bullets { text-align: right; }
[dir="rtl"] .country-lead__form { flex-direction: row-reverse; }
[dir="rtl"] .country-faq__item summary::after { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .country-card .btn-sm { align-self: flex-end; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .country-hero { padding: 5rem 1rem 3.5rem; }
  .country-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .country-cards { grid-template-columns: 1fr; }
  .country-hero__trust { gap: 0.75rem; }
  .country-lead__form { flex-direction: column; }
  .country-lead__form input[type="email"],
  .country-lead__form button { width: 100%; }
  .country-topbar { padding: 0.65rem 1rem; }
  .country-section { padding: 3.5rem 1rem; }
}

@media (max-width: 480px) {
  .country-hero { padding: 4rem 1rem 2.5rem; }
  .country-stats__grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .country-stat__value { font-size: 1.6rem; }
  .country-hero__trust { flex-direction: column; align-items: center; gap: 0.5rem; }
  .country-topbar { padding: 0.55rem 0.75rem; }
  .country-topbar__logo { font-size: 1rem; }
}
