/* =========================
   1. VARIABLES
========================= */
:root {
  --primary: #2fbf71;
  --primary-dark: #26a862;
  --bg-main: #f4faf7;
  --bg-card: #ffffff;
  --text-main: #1a1a1a;
  --text-muted: #666;
  --border-soft: #e6ece9;
}

/* =========================
   2. RESET
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  color: var(--text-main);
  background: var(--bg-main);
}

img {
  max-width: 100%;
  display: block;
}

/* =========================
   3. LAYOUT
========================= */
.container {
  width: 92%;
  margin: 0 auto;
}

section {
  padding: 70px 0;
}

/* =========================
   4. HEADER (mobile-first)
========================= */
.hero {
  position: relative;
  z-index: 1;
}


.header-inner {
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
}

.header-contacts {
  display: none;
}

.lang-btn {
  border: 1px solid var(--border-soft);
  background: #fff;
  padding: 6px 12px;
  border-radius: 8px;
}

/* =========================
   5. HERO (medical abstract)
========================= */
.hero {
  position: relative;
  padding: 100px 0 120px;
  overflow: hidden;
  background: #f4faf7; /* запасной фон */
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,0.97) 0%,
      rgba(255,255,255,0.93) 30%,
      rgba(255,255,255,0.75) 45%,
      rgba(255,255,255,0.35) 65%,
      rgba(255,255,255,0.1) 80%,
      rgba(255,255,255,0.05) 100%
    ),
    url("https://images.unsplash.com/photo-1584515933487-779824d29309?q=80&w=2000&auto=format&fit=crop");

  background-size: cover;
  background-position: right center;
  z-index: 0;
}
.hero > .container {
  position: relative;
  z-index: 1;
}



.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-badge {
  display: inline-block;
  background: rgba(47,191,113,.15);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-text h1 {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-text p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-note {
  font-size: 14px;
  color: var(--text-muted);
}

.hero-image {
  display: none;
}

/* =========================
   6. BUTTON
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  width: 100%;
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.btn::after {
  content: "→";
  margin-left: 8px;
}

/* =========================
   7. NOSOLOGIES
========================= */
.nosologies {
  text-align: center;
}

.nosology-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.nosology-card {
  background: var(--bg-card);
  padding: 22px;
  border-radius: 18px;
  font-weight: 600;
  border: 1px solid var(--border-soft);
}

/* =========================
   8. WHY
========================= */
.why {
  background: var(--bg-card);
}

.why-grid {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.why-card {
  background: var(--bg-main);
  padding: 24px;
  border-radius: 20px;
}

/* =========================
   9. HOW
========================= */
.steps {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* =========================
   10. FORM
========================= */
form {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 20px;
  display: grid;
  gap: 16px;
}

input, textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}

button.loading {
  opacity: .6;
}

/* =========================
   11. FOOTER
========================= */
footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* =========================
   12. MOBILE CTA
========================= */
.mobile-cta {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 999;
}

/* =========================
   13. DESKTOP
========================= */
@media (min-width: 768px) {
  .container {
    max-width: 1100px;
  }

  .header-contacts {
    display: flex;
    gap: 8px;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
  }

  .hero-text h1 {
    font-size: 44px;
  }

  .hero-image {
    display: block;
  }

  .btn {
    width: auto;
    padding: 14px 34px;
  }

  .nosology-grid {
    grid-template-columns: repeat(3,1fr);
  }

  .why-grid {
    grid-template-columns: repeat(4,1fr);
  }

  .mobile-cta {
    display: none;
  }
}




/* =========================
   HEADER FIX (MOBILE)
========================= */

/* правый блок: язык + иконки */
.right-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* показываем иконки на мобилке */
.header-contacts {
  display: flex !important;
  gap: 6px;
}

/* уменьшаем кнопки иконок */
.contact-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* язык */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 6px 10px;
  background: #fff;
  border-radius: 8px;
}

/* dropdown — вертикальный, компактный */
.lang-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  min-width: 130px;
  display: none;
  z-index: 2000;
}

.lang-dropdown.active {
  display: flex;
  flex-direction: column;
}

.lang-dropdown button {
  padding: 10px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
}

/* =========================
   DESKTOP ADJUST
========================= */
@media (min-width: 768px) {
  .contact-btn {
    width: 38px;
    height: 38px;
  }

  .lang-btn {
    font-size: 14px;
  }
}




/* =========================
   NOSOLOGY PAGES (MOBILE)
========================= */

/* hero на страницах нозологий */
body[data-page]:not([data-page="home"]) .hero {
  padding: 80px 0 70px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.88) 0%,
      rgba(244,250,247,0.92) 70%,
      rgba(244,250,247,1) 100%
    ),
    url("https://images.unsplash.com/photo-1579684385127-1ef15d508118?q=80&w=1800&auto=format&fit=crop");

  background-size: cover;
  background-position: center;
}

body[data-page]:not([data-page="home"]) .hero h1 {
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 14px;
}

body[data-page]:not([data-page="home"]) .hero p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

/* кнопка в hero */
body[data-page]:not([data-page="home"]) .hero .btn {
  width: 100%;
}
body[data-page]:not([data-page="home"]) .hero {
  background: none;
}

body[data-page]:not([data-page="home"]) .hero::before {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.94) 0%,
      rgba(244,250,247,0.9) 100%
    ),
    url("https://images.unsplash.com/photo-1579684385127-1ef15d508118?q=80&w=1800&auto=format&fit=crop");

  background-size: cover;
  background-position: center;
}

/* =========================
   WHY LIST → CARDS
========================= */

.why-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.why-list li {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 18px;
  font-size: 15px;
  line-height: 1.5;
  position: relative;
  padding-left: 44px;
}

/* галочка слева */
.why-list li::before {
  content: "✔";
  position: absolute;
  left: 16px;
  top: 18px;
  color: var(--primary);
  font-weight: 700;
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 768px) {
  body[data-page]:not([data-page="home"]) .hero {
    padding: 90px 0;
  }

  body[data-page]:not([data-page="home"]) .hero h1 {
    font-size: 40px;
  }

  .why-list {
    grid-template-columns: repeat(2, 1fr);
  }

  body[data-page]:not([data-page="home"]) .hero .btn {
    width: auto;
  }
}


/* =========================
   REMOVE LINK UNDERLINES
========================= */
a {
  text-decoration: none;
  color: inherit;
}



.form-status { display: none; }
.form-status.loading { display:block; background:#eef6ff; color:#2563eb; }
.form-status.success { display:block; background:#ecfdf5; color:#047857; }
.form-status.error   { display:block; background:#fef2f2; color:#b91c1c; }


.hero-text {
  max-width: 520px;
}

.hero-text h1 {
  font-size: 34px;
  font-weight: 800;
}

.hero-text p {
  font-size: 17px;
}

/* МОБИЛКА */
@media (max-width: 768px) {

  .hero::before {
    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,0.97) 0%,
        rgba(255,255,255,0.94) 55%,
        rgba(255,255,255,0.85) 100%
      ),
      url("https://images.unsplash.com/photo-1584515933487-779824d29309?q=80&w=1200&auto=format&fit=crop");

    background-position: center top;
  }
}

/* ===== DOUBLE HEADER ===== */
.top-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}

.top-inner {
  height: 40px;
  display: flex;
  align-items: center;
}

.main-bar {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
}

.burger {
  background: none;
  border: none;
  font-size: 22px;
  display: none;
}

/* ===== MOBILE MENU FINAL ===== */

/* ===== MOBILE MENU (UNDER HERO) ===== */
.mobile-menu {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  background: #fff;
  z-index: 2500;

  transform: translateY(-100%);
  transition: transform 0.35s ease;

  border-bottom: 1px solid var(--border-soft);
}

.mobile-menu.active {
  transform: translateY(0);
}

/* header меню */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* навигация */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 30px 0;
  font-size: 18px;
  font-weight: 600;
}

/* контакты */
.mobile-contacts {
  margin-bottom: 24px;
  font-size: 16px;
}

/* соцсети */
.mobile-socials {
  display: flex;
  gap: 14px;
}

/* показываем только на мобилке */
@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }
}


/* ===== HEADER LAYERS FIX ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 3000;
  margin: 0;
}


/* верхняя полоса с номером */
.top-bar {
  position: relative;
  z-index: 3001;
  background: #fff;
}

/* основной хэдер */
.main-bar {
  position: sticky;
  top: 0;
  z-index: 3002;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}


/* ===== BURGER VISIBILITY ===== */
@media (max-width: 768px) {
  .burger {
    display: block;
  }
}
.mobile-menu {
  padding-top: 80px; /* безопасная зона под хэдер */
}


.countries-section {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 80px 0;
  flex-wrap: wrap;
}

.country-btn {
  width: 320px;
  height: 140px;
  border-radius: 18px;

  background: #ffffff;
  border: 1px solid var(--border-soft);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: 700;
  color: #111;

  transition: transform .25s ease, box-shadow .25s ease;
}

.country-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.country-btn.disabled {
  pointer-events: none;
  opacity: .5;
}

.country-btn .soon {
  position: absolute;
  bottom: 14px;
  font-size: 14px;
  color: #777;
}


/*china cities*/
.china {
  padding: 40px 0 80px;
}

.china-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}

.china-subtitle {
  color: #666;
  margin-bottom: 30px;
}

.cities-grid {
  display: grid;
  gap: 20px;
}

.city-card {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 120px;
  border-radius: 18px;

  background: #ffffff;
  border: 1px solid #e6ece9;

  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: #111;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.city-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* DESKTOP */
@media (min-width: 768px) {
  .cities-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .city-card {
    height: 160px;
    font-size: 24px;
  }
}
.city-card {
  position: relative;
  height: 160px;
  border-radius: 18px;
  overflow: hidden;

  background-image: var(--bg);
  background-size: cover;
  background-position: center;

  display: flex;
  align-items: flex-end;
  padding: 20px;

  text-decoration: none;
}

/* затемнение */
.city-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.6),
    rgba(0,0,0,0.1)
  );
}

.city-name {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

/* hover */
.city-card:hover {
  transform: translateY(-6px);
}

@media (min-width: 768px) {
  .city-card {
    height: 220px;
  }
}
.city-section {
  padding: 60px 8%;
}

.city-header {
  margin-bottom: 30px;
}

.city-header h2 {
  font-size: 36px;
}

.city-subtitle {
  color: #777;
}

.clinics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.clinic-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.clinic-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.clinic-card h3 {
  padding: 15px 15px 5px;
}

.clinic-card p {
  padding: 0 15px 15px;
  color: #555;
}

.btn {
  display: block;
  margin: 0 15px 20px;
  padding: 10px;
  text-align: center;
  background: #1e88e5;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
/* =========================
   CITIES & CLINICS (SAFE)
========================= */

/* секция города */
.city-section {
  padding: 60px 0;
}

/* заголовок города */
.city-header {
  margin-bottom: 30px;
}

.city-header h2 {
  font-size: 32px;
  font-weight: 800;
}

.city-subtitle {
  color: #666;
}

/* сетка клиник */
.clinics-grid {
  display: grid;
  gap: 24px;
}

/* карточка клиники */
.clinic-card {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.clinic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.clinic-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.clinic-card h3 {
  padding: 16px 16px 6px;
  font-size: 18px;
}

.clinic-card p {
  padding: 0 16px 16px;
  color: #555;
}

/* кнопка внутри карточки */
.clinic-card .btn {
  margin: 0 16px 20px;
  width: calc(100% - 32px);
}

/* desktop */
@media (min-width: 768px) {
  .clinics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* =========================
   MODAL FORM (SAFE)
========================= */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 5000;
}

.modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.modal-box {
  position: relative;
  max-width: 420px;
  margin: 10vh auto;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  z-index: 1;
}

.modal-box form {
  background: none;
  padding: 0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}
/* ===== MODAL FORM VISUAL FIX ===== */

.modal-box input,
.modal-box textarea {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  color: #111;
}

.modal-box input::placeholder,
.modal-box textarea::placeholder {
  color: #6b7280;
}

.modal-box input:focus,
.modal-box textarea:focus {
  outline: none;
  border-color: #2fbf71;
  background: #ffffff;
}

/* расстояния */
.modal-box form {
  display: grid;
  gap: 14px;
}
.city-card-simple {
  height: 120px;
  border-radius: 16px;

  background: #fff;
  border: 1px solid var(--border-soft);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: 700;
  color: #111;

  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.city-card-simple:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

@media (min-width: 768px) {
  .cities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.countries-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 30px;
}
/* ===== CITY CARDS ===== */

.city {
  max-width: 1100px;
  margin: 80px auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.city:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

/* Заголовок города */
.city h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Текст описания */
.city p {
  font-size: 17px;
  line-height: 1.7;
  color: #444;
  max-width: 900px;
}

/* RTL (арабский) */
body.rtl .city {
  text-align: right;
}

body.rtl .city h2 {
  justify-content: flex-end;
}

/* Мобилка */
@media (max-width: 768px) {
  .city {
    margin: 40px 16px;
    padding: 24px;
  }

  .city h2 {
    font-size: 24px;
  }

  .city p {
    font-size: 15px;
  }
}
