/*
 Theme Name:   Root Lite Child
 Theme URI:    https://in-sanatorii.ru/
 Description:  Дочерняя тема для Root Lite
 Author:       in-sanatorii
 Template:     root-lite
 Version:      1.0.0
 Text Domain:  root-lite-child
*/

body {
  background-color: #fff;
}

.site-header, .site-footer {
  background-color: #fff;
}

/* Подборки */
.layout-nosidebar .content,
.layout-nosidebar .content-area,
.layout-nosidebar .site-content,
.layout-nosidebar .main-content { width:100% !important; max-width:100% !important; }

@media (max-width: 992px) {
    .layout-nosidebar .content,
    .layout-nosidebar .content-area,
    .layout-nosidebar .site-content,
    .layout-nosidebar .main-content { padding-left: 20px; padding-right: 20px; }
}

.collection-template .page-header{margin-bottom:10px}
.collection-template .page-title{margin:0 0 10px}

.page .updated-on{margin:6px 0 14px;color:#6b7280;font-size:14px}
.page .chips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 16px;}
.page .chips a{display:inline-block;padding:6px 10px;border:1px solid #e5e7eb;border-radius:999px;font-size:14px;color:#111827;text-decoration:none}
.page .chips a:hover{background:#f9fafb}

/* Видимый FAQ */
.faq-list details{
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px 14px;
  margin:10px 0;
  background:#fff;
}
.faq-list details[open]{box-shadow:0 2px 10px rgba(0,0,0,.04)}
.faq-list summary{
  cursor:pointer;
  font-weight:600;
  list-style:none; /* убираем маркер Firefox */
}
.faq-list summary::-webkit-details-marker{display:none} /* убираем маркер Chrome */
.faq-list summary::after{
  content:'+';
  float:right;
  font-weight:700;
  transform:translateY(-1px);
}
.faq-list details[open] summary::after{content:'–'}
.faq-list details p{margin:10px 0 0;color:#374151;line-height:1.55}

/* FAQ (Sochi) — scoped */
.faq{margin:28px 0;padding:16px;border:1px solid #ececec;border-radius:14px;background:#fff}
.faq h2{margin:0 0 12px;font-size:1.25rem;line-height:1.3}
.faq details{border:1px solid #eee;border-radius:12px;padding:10px 12px;background:#fafafa;margin:10px 0;transition:background .2s,border-color .2s}
.faq details[open]{background:#fff;border-color:#e3e3e3}
.faq details + details{margin-top:8px}

/* Тогглер */
.faq summary{cursor:pointer;font-weight:600;outline:none;display:flex;align-items:center;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::before{
  content:"";width:10px;height:10px;margin-right:8px;
  border-right:2px solid #888;border-bottom:2px solid #888;
  transform:rotate(-45deg);transition:transform .2s ease
}
.faq details[open] summary::before{transform:rotate(45deg)}

/* Контент ответа */
.faq details > div{margin-top:8px;color:#444;line-height:1.6}

/* Фокус/доступность */
.faq summary:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(0,128,255,.2);border-radius:8px}

/* Анимация появления текста (мягкая) */
@keyframes faq-fade{from{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:none}}
.faq details[open] > div{animation:faq-fade .18s ease}

/* Небольшая адаптивность шрифта на мобильных */
@media (max-width:480px){
  .faq h2{font-size:1.15rem}
  .faq details{padding:10px}
}

/* На всякий случай: обнулим неожиданные “вертикальные” стили темы внутри наших блоков */
.post-type-archive-sanatorium .cards-grid * ,
.tax-location .cards-grid *  { box-sizing: border-box; }

/* Контекст: архив санаториев и страницы локаций */
.post-type-archive-sanatorium .search-filtr .filters--widget .filters-grid,
.tax-location .search-filtr .filters--widget .filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* поля в ряд, с переносами */
  gap: 12px 16px;                     /* вертикальный / горизонтальный зазоры */
  align-items: end;                   /* выравнивание по нижнему краю */
  width: 100%;
  margin: 0 0 20px;
}

/* Единый вид для инпутов/селектов/кнопок в фильтре */
.post-type-archive-sanatorium .search-filtr select,
.post-type-archive-sanatorium .search-filtr input[type="number"],
.post-type-archive-sanatorium .search-filtr input[type="text"],
.tax-location .search-filtr select,
.tax-location .search-filtr input[type="number"],
.tax-location .search-filtr input[type="text"] {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  max-width: 100%;
}

/* Кнопки — на отдельной строке ниже полей */
.post-type-archive-sanatorium .search-filtr .filters-actions,
.tax-location .search-filtr .filters-actions {
  grid-column: 1 / -1;                /* занять всю ширину грида под полями */
  display: flex;
  gap: 10px;
  padding-top: 4px;
}

/* Чтобы на мобиле кнопки было удобно жать — растянуть их на ширину */
@media (max-width: 767.98px) {
  .post-type-archive-sanatorium .search-filtr .filters-actions .button,
  .post-type-archive-sanatorium .search-filtr .filters-actions button,
  .tax-location .search-filtr .filters-actions .button,
  .tax-location .search-filtr .filters-actions button {
    flex: 1 1 auto;
  }
}

/* Небольшая типографика подписей */
.post-type-archive-sanatorium .search-filtr .filters-title,
.tax-location .search-filtr .filters-title {
  margin: 0 0 12px;
}
.post-type-archive-sanatorium .search-filtr .filters-grid label > span,
.post-type-archive-sanatorium .search-filtr .filters-grid label > small,
.post-type-archive-sanatorium .search-filtr .filters-grid label > strong,
.post-type-archive-sanatorium .search-filtr .filters-grid label > em,
.tax-location .search-filtr .filters-grid label > span,
.tax-location .search-filtr .filters-grid label > small,
.tax-location .search-filtr .filters-grid label > strong,
.tax-location .search-filtr .filters-grid label > em {
  font-size: 12px;
  color: #5e6472;
  line-height: 1;
}

/* Кнопка-тоггл: скрыта на десктопе */
.post-type-archive-sanatorium .filters-toggle,
.tax-location .filters-toggle {
  display: none;
  width: 100%;
  height: 40px;
  border: 0px;
  text-decoration: underline;
  cursor: pointer;
  background: #fff;
  padding: 0 12px;
}

.page-header .lead{color:#374151;margin:6px 0 12px;}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 14px; font-size:14px;}
.chips a{padding:6px 10px;border:1px solid #e5e7eb;border-radius:999px;text-decoration:none;color:#111827;background:#fff}
.chips a:hover{background:#f9fafb; color:#111827;}
.chips span{padding:6px 10px;border:1px solid #e5e7eb;border-radius:999px;text-decoration:none;color:#111827;background:#fff}
.chip-ic{font-size:14px;line-height:1}
.chips .chip--cheap{ border-color:#dcfce7; background:#f0fdf4; }
.chips .chip--premium{ border-color:#fde68a; background:#fffbeb; }

.filter-toggle{margin:6px 0 10px;padding:8px 12px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;cursor:pointer}
.filters-wrap{margin-top:15px;}
.filters-wrap.is-collapsed{display:none}
.filter-toggle{display:block}

@media (min-width: 768px){
  .filters-wrap.is-collapsed{display:block} /* на десктопе фильтр сразу открыт */
  .filter-toggle{display:none}
}

.san-map-box{ position:relative }
.san-map-loader{
  position:absolute; inset:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:rgba(255,255,255,.85); backdrop-filter:blur(2px);
  transition:opacity .25s ease; z-index:2;
}
.san-map-loader.hidden{ opacity:0; pointer-events:none }
.san-map-loader .label{ margin-top:10px; color:#374151; font-size:14px }
.san-map-loader .map-progress{ color:#6b7280; margin-left:6px }

/* Спиннер */
.spinner{
  width:36px; height:36px; border-radius:50%;
  border:3px solid #93c5fd; border-top-color:#2563eb; border-right-color:#2563eb;
  animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg) } }

/* Переключение видимости секции карты */
.san-map-wrap.is-collapsed{ display:none }
.map-title{ margin:8px 0 10px; font-size:1.25rem; line-height:1.3 }
.map-toggle{
  margin:10px 0; padding:8px 12px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; cursor:pointer
}


/* Логотип */
/* контейнер шапки: одна линия, идеальное выравнивание */
.site-header .container,
.header .container,
.header-inner {
  display: flex;
  align-items: center;   /* вертикально центрит и логотип, и меню */
  gap: 24px;
  min-height: 64px;
  padding-block: 8px;    /* равные отступы сверху/снизу */
}

/* логотип: фиксированная высота, без «подпрыгиваний» из-за baseline */
.custom-logo-link img,
.site-branding img,
.header-logo img {
  height: 40px;          /* подгони 36–44px под свой вкус */
  width: auto;
  display: block;        /* убирает лишний нижний зазор */
}

/* прижать меню вправо */
.primary-nav,
.main-navigation,
.header-nav {
  margin-left: auto;
}

/* мелкая «ювелирка» для ссылок меню */
.primary-nav a,
.main-navigation a {
  line-height: 1;        /* чтобы не раздувало высоту хедера */
  padding: 10px 12px;
}
@media (max-width: 768px) {
  .site-header .container { gap: 12px; }
}

/* 1. Логотип делаем чуть крупнее */
.custom-logo-link img,
.site-branding img,
.header-logo img {
    height: 52px;   /* было 40 — можно играть 48–56px под вкус */
    width: auto;
}

/* 2. Заголовок сайта (in-sanatorii.ru) делаем компактнее */
.site-title,
.site-branding .site-title {
    font-size: 20px;      /* если всё равно крупно — попробуй 16px */
    font-weight: 600;
    line-height: 1.1;
    margin: 0;
}

/* 3. Подзаголовок "Лучшая подборка санаториев" чуть мельче и спокойнее */
.site-description,
.site-branding .site-description {
    font-size: 12px;
    line-height: 1.2;
    opacity: 0.8;         /* менее кричащий */
    margin: 0;
}

/* 4. Меню рядом тоже чуть подсжать по размеру, чтобы не спорило с логотипом */
.main-navigation a,
.primary-nav a,
.header-nav a {
    font-size: 15px;      /* можно 14–15px, сейчас, скорее всего, 16px+ */
    line-height: 1;
    padding: 10px 12px;
}