@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

:root {
  --dark:    #0F1E35;
  --dark2:   #162840;
  --mid:     #1E3A5F;
  --accent:  #2ECC8A;
  --gold:    #C9A84C;
  --sand:    #F5F0E8;
  --sand2:   #EDE8DF;
  --text:    #1C2E44;
  --muted:   #6B7C93;
  --white:   #FFFFFF;
  --red:     #E05252;
  --orange:  #E08B3A;
  --radius:  10px;
  --shadow:  0 4px 20px rgba(15,30,53,0.10);
  --shadow2: 0 8px 32px rgba(15,30,53,0.16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--sand);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

/* ── HEADER ─────────────────────────────────────────── */
#site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.logo-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

nav::-webkit-scrollbar { display: none; }

nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

nav a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

nav a.active {
  background: rgba(46,204,138,0.15);
  color: var(--accent);
}

nav a .flag { font-size: 16px; }

.header-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(46,204,138,0.12);
  border: 1px solid rgba(46,204,138,0.3);
  border-radius: 20px;
  padding: 5px 12px;
  flex-shrink: 0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.badge-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ── HERO / PAGE HERO ────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--mid) 100%);
  padding: 64px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(46,204,138,0.12) 0%, transparent 70%);
}

.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(46,204,138,0.15);
  border: 1px solid rgba(46,204,138,0.35);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  max-width: 720px;
  margin: 0 auto 16px;
  position: relative;
}

.page-hero h1 span { color: var(--accent); }

.page-hero .hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 32px;
  position: relative;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  position: relative;
}

.hero-tag {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── LAYOUT ──────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 56px 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}

/* ── CARDS ───────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.06);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h3 .icon {
  width: 36px; height: 36px;
  background: var(--sand2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

/* ── TAGS / BADGES ───────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.tag-green  { background: #e7f8ef; color: #1a7a4a; }
.tag-red    { background: #fde8e8; color: #b83232; }
.tag-orange { background: #fef0e0; color: #a0570e; }
.tag-blue   { background: #e5f0fd; color: #1a5299; }
.tag-gold   { background: #fdf5e0; color: #8a6318; }

/* ── TABLE ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 14px;
}

thead th {
  background: var(--dark);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
}

thead th:first-child { border-radius: var(--radius) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius) 0 0; }

tbody tr { border-bottom: 1px solid var(--sand2); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--sand); }
tbody td { padding: 11px 16px; color: var(--text); vertical-align: top; }
tbody td:first-child { font-weight: 500; color: var(--dark); }

/* ── STEP LIST ───────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0; }

.step {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--sand2);
  position: relative;
}

.step:last-child { border-bottom: none; }

.step-num {
  width: 36px; height: 36px;
  background: var(--dark);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content h4 {
  font-weight: 600;
  font-size: 15px;
  color: var(--dark);
  margin-bottom: 4px;
}

.step-content p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.step-content .step-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── ALERT / INFO BOXES ──────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-green  { background: #e7f8ef; border-left: 4px solid var(--accent); color: #174d30; }
.alert-yellow { background: #fef9e5; border-left: 4px solid var(--gold);   color: #7a5a10; }
.alert-red    { background: #fde8e8; border-left: 4px solid var(--red);    color: #7a2020; }
.alert-blue   { background: #e5f0fd; border-left: 4px solid #3a82cc;       color: #1a3f6e; }

/* ── PROS / CONS ─────────────────────────────────────── */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.pros, .cons {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.pros { border-top: 4px solid var(--accent); }
.cons { border-top: 4px solid var(--red); }

.pros h4, .cons h4 {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pros h4 { color: #1a7a4a; }
.cons h4 { color: #b83232; }

.pros ul, .cons ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.pros li, .cons li {
  font-size: 14px;
  color: var(--text);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}

.pros li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.cons li::before { content: '✗'; color: var(--red);    font-weight: 700; flex-shrink: 0; }

/* ── COST TABLE ──────────────────────────────────────── */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.cost-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.cost-item .cost-icon { font-size: 24px; margin-bottom: 8px; }
.cost-item .cost-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.cost-item .cost-val { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--dark); }
.cost-item .cost-note { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── COUNTRY CARD (index) ────────────────────────────── */
.country-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow2);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.country-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(15,30,53,0.18);
}

.country-card-banner {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
  overflow: hidden;
}

.country-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.2));
}

.country-card-body { padding: 24px; }

.country-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.country-card-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.55;
}

.country-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-item { background: var(--sand); border-radius: 8px; padding: 10px 12px; }
.stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-val { font-size: 14px; font-weight: 700; color: var(--dark); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dark);
  color: var(--white);
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
  width: 100%;
  justify-content: center;
}

.btn:hover { background: var(--mid); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--dark); }
.btn-accent:hover { background: #25b87a; }

/* ── FAMILY BLOCK ────────────────────────────────────── */
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.family-member {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.family-avatar { font-size: 36px; margin-bottom: 8px; }
.family-role { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.family-name { font-size: 16px; font-weight: 700; color: var(--dark); margin: 4px 0; }
.family-note { font-size: 13px; color: var(--text); line-height: 1.5; }

/* ── TIMELINE (вертикальный) ─────────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-left: 8px;
}

.tl-item {
  position: relative;
  padding: 0 0 28px 36px;
  border-left: 2px solid var(--sand2);
}

.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }

.tl-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--sand);
  box-shadow: 0 0 0 1px var(--accent);
}

.tl-item.tl-danger::before { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.tl-item.tl-warn::before   { background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

.tl-phase {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}

.tl-item.tl-danger .tl-phase { color: var(--red); }
.tl-item.tl-warn .tl-phase   { color: #a0570e; }

.tl-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--dark);
  margin-bottom: 4px;
}

.tl-item ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.tl-item ul li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}

.tl-item ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* ── DIVIDER ─────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--sand2);
  margin: 8px 0;
}

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  background: var(--dark2);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 28px 24px;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 64px;
}

footer a { color: var(--accent); text-decoration: none; }
footer strong { color: rgba(255,255,255,0.8); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { gap: 12px; }
  nav a span:not(.flag) { display: none; }
  .badge-text { display: none; }
  .card-grid-2, .pros-cons { grid-template-columns: 1fr; }
  .cost-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .section { padding: 40px 16px; }
  .page-hero { padding: 48px 16px 40px; }
  .cost-grid { grid-template-columns: 1fr; }
}
