:root{
  --bg:#ffffff;
  --panel:#f6f7fb;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --brand:#2563eb;
  --brand2:#0ea5e9;
  --ok:#16a34a;
  --shadow:0 12px 30px rgba(17,24,39,.08);
  --radius:18px;
  --max:1120px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:var(--bg);
  line-height:1.55;
}
a{color:inherit}
.container{max-width:var(--max); margin:0 auto; padding:0 20px}
.header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.header__inner{display:flex; align-items:center; justify-content:space-between; padding:14px 0; gap:14px}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none}
.brand__mark{
  width:34px; height:34px; border-radius:12px;
  background: linear-gradient(135deg,var(--brand),var(--brand2));
  box-shadow: var(--shadow);
}
.brand__text{display:flex; flex-direction:column; line-height:1.15}
.brand__name{font-weight:700; letter-spacing:-.2px}
.brand__tag{font-size:12px; color:var(--muted)}
.nav{display:flex; gap:14px; align-items:center}
.nav a{
  text-decoration:none; font-weight:600; color:var(--text);
  padding:10px 10px; border-radius:12px;
}
.nav a:hover{background:var(--panel)}
.actions{display:flex; gap:10px; align-items:center}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:14px; padding:12px 14px;
  border:1px solid var(--line);
  text-decoration:none; font-weight:700; white-space:nowrap;
}
.btn--primary{
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  border-color:transparent; color:#fff;
}
.btn--ghost{background:#fff}
.btn--small{padding:10px 12px; font-size:14px}
.badge{display:inline-flex; gap:8px; align-items:center; padding:8px 10px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--muted); font-weight:600; font-size:13px}
.dot{width:8px; height:8px; border-radius:999px; background:var(--ok)}
.hero{
  padding:44px 0 22px;
}
.hero__grid{display:grid; grid-template-columns:1.2fr .8fr; gap:20px; align-items:stretch}
.card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  box-shadow: var(--shadow);
}
.hero__card{padding:26px}
.kicker{color:var(--muted); font-weight:700; letter-spacing:.2px}
.h1{font-size:42px; line-height:1.08; margin:10px 0 12px; letter-spacing:-.9px}
.lead{font-size:18px; color:#374151; margin:0 0 18px}
.pills{display:flex; flex-wrap:wrap; gap:10px; margin:18px 0}
.pill{background:var(--panel); border:1px solid var(--line); padding:10px 12px; border-radius:999px; font-weight:700; color:#111827; font-size:14px}
.hero__aside{padding:22px; display:flex; flex-direction:column; gap:12px}
.aside__title{font-weight:800; letter-spacing:-.2px}
.small{color:var(--muted); font-size:14px}
.form{
  display:grid; gap:10px;
}
.input, textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 12px;
  font:inherit;
  background:#fff;
}
textarea{min-height:104px; resize:vertical}
.grid{
  padding:22px 0 44px;
}
.section{padding:28px 0}
.section__title{font-size:26px; letter-spacing:-.4px; margin:0 0 10px}
.section__sub{color:var(--muted); margin:0 0 18px}
.cards{display:grid; grid-template-columns:repeat(3,1fr); gap:14px}
.card__inner{padding:18px}
.card__title{font-weight:800; letter-spacing:-.2px; margin:0 0 6px}
.card__text{margin:0; color:#374151}
.card__link{display:inline-flex; margin-top:12px; font-weight:800; text-decoration:none; color:var(--brand)}
.split{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.steps{display:grid; gap:10px}
.step{display:flex; gap:12px; align-items:flex-start; padding:16px; border:1px solid var(--line); border-radius:16px; background:#fff}
.step__num{width:34px; height:34px; border-radius:12px; background:var(--panel); display:flex; align-items:center; justify-content:center; font-weight:900}
.step__body b{display:block; margin-bottom:4px}
.note{padding:14px 16px; border-radius:16px; background:var(--panel); border:1px solid var(--line); color:#111827}
.footer{
  border-top:1px solid var(--line);
  background:#fff;
  padding:26px 0 36px;
}
.footer__grid{display:grid; grid-template-columns:1.2fr .8fr; gap:16px}
.footer a{color:var(--brand); text-decoration:none; font-weight:700}
.meta{display:flex; flex-wrap:wrap; gap:12px; margin-top:10px; color:var(--muted); font-size:14px}
.breadcrumbs{color:var(--muted); font-size:14px; margin:14px 0 0}
.breadcrumbs a{color:var(--muted); text-decoration:none}
.breadcrumbs a:hover{color:var(--text)}
.article{padding:22px}
.article h1{font-size:34px; letter-spacing:-.6px; line-height:1.15; margin:10px 0 10px}
.article h2{font-size:22px; margin:22px 0 10px}
.article p{margin:0 0 10px; color:#374151}
.article ul{margin:10px 0 10px 18px; color:#374151}
.faq{display:grid; gap:10px}
.faq details{border:1px solid var(--line); border-radius:16px; padding:14px 16px; background:#fff}
.faq summary{cursor:pointer; font-weight:800}
.faq p{margin:10px 0 0}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:16px;
  border:1px solid var(--line);
}
.table th,.table td{padding:12px 12px; border-bottom:1px solid var(--line); vertical-align:top; text-align:left}
.table th{background:var(--panel)}
.table tr:last-child td{border-bottom:none}
.mobile{display:none}
@media (max-width: 920px){
  .hero__grid{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr}
  .split{grid-template-columns:1fr}
  .h1{font-size:36px}
  .nav{display:none}
  .mobile{display:inline-flex}
}
/* Убрать WhatsApp-ссылки по всему сайту */
html body a[href*="wa.me"],
html body a[href*="api.whatsapp.com"],
html body a[href*="chat.whatsapp.com"],
html body a[href*="whatsapp"],
html body a[href^="whatsapp:"]{
  display: none !important;
}
/* === Mobile header improvements === */
@media (max-width: 920px){

  /* 1) Скрываем подпись под названием */
  .brand__tag{
    display: none;
  }

  /* 2) Шапка и блок действий могут переноситься */
  .header__inner{
    flex-wrap: wrap; /* разрешаем перенос, иначе будет "выпирание" */
  }

  .actions{
    width: 100%;
    display: flex;
    flex-wrap: wrap;           /* перенос элементов внутри actions */
    gap: 10px;
    justify-content: space-between;
  }

  /* 3) Телефон и "Меню" остаются в первой строке */
  .actions a[href^="tel:"]{
    order: 1;
  }
  .actions button.mobile{
    order: 2;
  }

  /* 4) Кнопка CTA — отдельной строкой на всю ширину */
  .actions a.btn--primary{
    order: 3;
    flex: 0 0 100%;            /* занимает всю строку */
    width: 100%;
    justify-content: center;
  }

  /* На мобилке снимаем запрет на перенос, чтобы не было горизонтального скролла */
  .btn{
    white-space: normal;
  }
}
/* === Mobile: таблицы не сжимаем, а даем скролл внутри === */
@media (max-width: 920px){
  .table{
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;                 /* скролл только у таблицы */
    -webkit-overflow-scrolling: touch; /* приятный скролл на мобилках */
    border-radius: 16px;
  }

  /* чтобы таблица не ужималась до нечитаемости */
  .table table,               /* на случай если появится обертка */
  table.table{
    min-width: 720px;         /* можно 640–900 подобрать под вкус */
  }

  .table th, .table td{
    white-space: normal;      /* переносим текст нормально */
  }
}
/* === Hero portrait === */
.portrait{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.portrait img{
  display:block;
  width:100%;
  aspect-ratio: 4 / 5;     /* ровная “карточка” */
  object-fit: cover;
  object-position: 50% 18%; /* фокус ближе к лицу */
  filter: saturate(.95) contrast(1.03);
}

/* на мобилке чуть компактнее */
@media (max-width: 920px){
  .portrait img{ aspect-ratio: 16 / 10; object-position: 50% 22%; }
}
/* 1) Любые изображения никогда не вылезают за контейнер */
img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2) Портрет: фиксируем “разумную” высоту вместо гигантского блока */
.portrait{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

/* ВАЖНО: именно height ограничивает размер на широких экранах */
.portrait img{
  width: 100%;
  height: 260px;         /* desktop/tablet */
  object-fit: cover;
  object-position: 50% 18%;
}

/* 3) На планшете делаем чуть ниже, чтобы не “перекрывать” смысл */
@media (max-width: 1024px){
  .portrait img{ height: 220px; }
}

/* 4) На телефоне ещё компактнее */
@media (max-width: 920px){
  .portrait img{ height: 180px; }
}
/* === Fix: таблицы не ломают страницу на мобилке === */
@media (max-width: 920px){

  /* Запираем горизонтальный скролл внутри контента (не у всей страницы) */
  .article{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Возвращаем таблицу в нормальный режим (если ранее ставили display:block) */
  table.table{
    display: table !important;
    width: 100%;
    min-width: 720px; /* подберите 640–820 по вкусу */
  }
}

/* На всякий случай: чтобы страница точно не “уезжала” из-за одного элемента */
html, body{
  overflow-x: hidden;
}
/* === Mobile: таблицу "Форматы работы" превращаем в карточки === */
@media (max-width: 920px){

  /* На всякий случай: убираем любой min-width у таблиц, который мог остаться */
  table.table{ min-width: 0 !important; }

  /* Скрываем шапку таблицы */
  table.table thead{ display: none; }

  /* Делаем таблицу блочной (каждая строка — карточка) */
  table.table,
  table.table tbody,
  table.table tr,
  table.table td{
    display: block;
    width: 100%;
  }

  table.table tr{
    margin: 0 0 12px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
  }

  table.table td{
    border: none !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 12px 14px;
  }

  table.table td:last-child{
    border-bottom: none !important;
  }

  /* Подписи колонок (без data-label, хардкодим 3 колонки) */
  table.table td::before{
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 6px;
  }

  table.table td:nth-child(1)::before{ content: "Формат"; }
  table.table td:nth-child(2)::before{ content: "Когда подходит"; }
  table.table td:nth-child(3)::before{ content: "Что вы получаете"; }
}


