
    :root {
      --bg: #FDF8F3;
      --fg: #2D2821;
      --muted: #8B7E74;
      --accent: #E85A4F;
      --accent-hover: #D14A3F;
      --card: #FFFFFF;
      --border: #E8E0D8;
    }
    
    * {
      box-sizing: border-box;
    }

    /* Скрытие скроллбара в горизонтальных лентах (мобильная галерея, ряд превью) */
    .scrollbar-hide {
      -ms-overflow-style: none;
      scrollbar-width: none;
    }

    .scrollbar-hide::-webkit-scrollbar {
      display: none;
    }

    /* overflow-x: hidden убран с html: ломало position: sticky
       у всех потомков (создавало scroll-container на корне). */
    body {
      font-family: 'Inter', sans-serif;
      background-color: var(--bg);
      color: var(--fg);
      overflow-x: clip; /* обрезает горизонтальный overflow без создания scroll container */
    }
    
    .font-display {
      font-family: 'Space Grotesk', sans-serif;
    }
    
    /* Custom scrollbar */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    
    ::-webkit-scrollbar-track {
      background: var(--border);
      border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb {
      background: var(--muted);
      border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
      background: var(--fg);
    }
    
    /* Background pattern */
    .hero-pattern {
      background-image: 
        radial-gradient(circle at 20% 80%, rgba(232, 90, 79, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 124, 89, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(232, 148, 90, 0.05) 0%, transparent 70%);
    }
    
    /* Smooth animations */
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .animate-fade-in-up {
      animation: fadeInUp 0.6s ease-out forwards;
    }
    
    .animate-fade-in {
      animation: fadeIn 0.4s ease-out forwards;
    }
    
    .animate-slide-down {
      animation: slideDown 0.3s ease-out forwards;
    }
    
    .stagger-1 { animation-delay: 0.1s; opacity: 0; }
    .stagger-2 { animation-delay: 0.2s; opacity: 0; }
    .stagger-3 { animation-delay: 0.3s; opacity: 0; }
    .stagger-4 { animation-delay: 0.4s; opacity: 0; }
    .stagger-5 { animation-delay: 0.5s; opacity: 0; }
    
    @media (prefers-reduced-motion: reduce) {
      .animate-fade-in-up,
      .animate-fade-in,
      .animate-slide-down {
        animation: none;
        opacity: 1;
      }
      .stagger-1, .stagger-2, .stagger-3, .stagger-4, .stagger-5 {
        animation: none;
        opacity: 1;
      }
    }
    
    /* Custom form elements */
    .custom-checkbox,
    .custom-radio {
      appearance: none;
      width: 20px;
      height: 20px;
      border: 2px solid var(--border);
      background: var(--card);
      cursor: pointer;
      transition: all 0.2s ease;
      flex-shrink: 0;
    }
    
    .custom-checkbox {
      border-radius: 6px;
    }
    
    .custom-radio {
      border-radius: 50%;
    }
    
    .custom-checkbox:hover,
    .custom-radio:hover {
      border-color: var(--accent);
    }
    
    .custom-checkbox:checked,
    .custom-radio:checked {
      background-color: var(--accent);
      border-color: var(--accent);
    }
    
    .custom-checkbox:checked::after {
      content: '';
      display: block;
      width: 6px;
      height: 10px;
      border: solid white;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg) translate(-1px, -1px);
      margin: 2px auto;
    }
    
    .custom-radio:checked::after {
      content: '';
      display: block;
      width: 10px;
      height: 10px;
      background: white;
      border-radius: 50%;
      margin: 3px;
    }
    
    .custom-checkbox:focus-visible,
    .custom-radio:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    
    /* Custom select */
    .custom-select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238B7E74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      padding-right: 40px;
    }
    
    /* Price range slider */
    .range-slider {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      background: var(--border);
      border-radius: 3px;
      outline: none;
    }
    
    .range-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 20px;
      height: 20px;
      background: var(--accent);
      border-radius: 50%;
      cursor: pointer;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .range-slider::-webkit-slider-thumb:hover {
      transform: scale(1.1);
      box-shadow: 0 2px 8px rgba(232, 90, 79, 0.4);
    }
    
    .range-slider::-moz-range-thumb {
      width: 20px;
      height: 20px;
      background: var(--accent);
      border-radius: 50%;
      cursor: pointer;
      border: none;
    }
    
    /* Star rating */
    .star-rating {
      display: flex;
      gap: 4px;
    }
    
    .star-rating input {
      display: none;
    }
    
    .star-rating label {
      cursor: pointer;
      transition: transform 0.15s ease;
    }
    
    .star-rating label:hover {
      transform: scale(1.2);
    }
    
    .star-rating svg {
      width: 24px;
      height: 24px;
      fill: var(--border);
      transition: fill 0.2s ease;
    }
    
    .star-rating input:checked ~ label svg,
    .star-rating label:hover svg,
    .star-rating label:hover ~ label svg {
      fill: #F5A623;
    }
    
    /* Focus styles */
    .focus-ring:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    
    /* Page transitions */
    .page {
      display: none;
    }
    
    .page.active {
      display: block;
    }
    
    /* Gallery slider */
    .gallery-main {
      position: relative;
      overflow: hidden;
      border-radius: 16px;
    }
    
    .gallery-main img {
      width: 100%;
      height: 300px;
      object-fit: cover;
    }
    
    @media (min-width: 768px) {
      .gallery-main img {
        height: 400px;
      }
    }
    
    .gallery-thumbs {
      display: flex;
      gap: 8px;
      margin-top: 8px;
      overflow-x: auto;
      padding-bottom: 8px;
    }
    
    .gallery-thumb {
      width: 80px;
      height: 60px;
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      border: 2px solid transparent;
      transition: border-color 0.2s ease, opacity 0.2s ease;
      flex-shrink: 0;
    }
    
    .gallery-thumb:hover {
      opacity: 0.8;
    }
    
    .gallery-thumb.active {
      border-color: var(--accent);
    }
    
    .gallery-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    /* Card hover effect */
    .card-hover {
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .card-hover:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 24px -8px rgba(45, 40, 33, 0.15);
    }
    
    /* Button styles */
    .btn {
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 24px;
      font-weight: 600;
      border-radius: 12px;
      transition: all 0.2s ease;
      cursor: pointer;
      border: none;
    }
    /* display вынесен в :where() с нулевой specificity — иначе .btn перебивает
       Tailwind-овские .hidden / .sm:hidden / .lg:hidden, и адаптивные кнопки
       (например, две submit'а в форме hero) показываются одновременно. */
    :where(.btn) {
      display: inline-flex;
    }
    
    .btn-primary {
      background-color: var(--accent);
      color: white;
    }
    
    .btn-primary:hover {
      background-color: var(--accent-hover);
      transform: translateY(-1px);
    }
    
    .btn-primary:active {
      transform: translateY(0);
    }
    
    .btn-outline {
      background-color: transparent;
      color: var(--fg);
      border: 2px solid var(--border);
    }
    
    .btn-outline:hover {
      border-color: var(--accent);
      color: var(--accent);
    }
    
    /* Mobile menu */
    .mobile-menu {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--bg);
      z-index: 100;
      transform: translateX(-100%);
      transition: transform 0.3s ease;
    }
    
    .mobile-menu.open {
      transform: translateX(0);
    }
    
    /* Autocomplete dropdown */
    .autocomplete-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: var(--card);
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(45, 40, 33, 0.15);
      margin-top: 8px;
      z-index: 50;
      display: none;
      overflow: hidden;
      max-height: 70vh;
      overflow-y: auto;
    }

    .autocomplete-dropdown.show {
      display: block;
    }

    .autocomplete-section + .autocomplete-section {
      border-top: 1px solid var(--border);
    }

    .autocomplete-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 16px 6px;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--muted);
    }

    .autocomplete-section-link {
      font-size: 12px;
      font-weight: 600;
      color: var(--accent);
      text-transform: none;
      letter-spacing: 0;
      text-decoration: none;
      transition: color 0.15s ease;
    }

    .autocomplete-section-link:hover {
      color: var(--accent-hover);
    }

    .autocomplete-item {
      padding: 8px 16px;
      cursor: pointer;
      transition: background-color 0.15s ease;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .autocomplete-item:hover,
    .autocomplete-item.active {
      background-color: rgba(232, 90, 79, 0.08);
    }

    .autocomplete-item-icon {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: 8px;
      background: rgba(232, 90, 79, 0.08);
    }

    .autocomplete-item-body {
      line-height: 1.25;
    }
    
    /* Map placeholder */
    .map-placeholder {
      background: linear-gradient(135deg, #E8E0D8 0%, #F5F0EA 100%);
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 300px;
    }
    
    /* Skeleton loading */
    .skeleton {
      background: linear-gradient(90deg, var(--border) 25%, rgba(232, 224, 216, 0.5) 50%, var(--border) 75%);
      background-size: 200% 100%;
      animation: skeleton-loading 1.5s infinite;
    }
    
    @keyframes skeleton-loading {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
	
/* Принудительно возвращаем дизайн полям формы ProcessWire */
#review-form input[type="text"],
#review-form input[type="email"],
#review-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.75rem;
  outline: none;
  margin-top: 0.5rem;
}

#review-form input[type="text"]:focus,
#review-form input[type="email"]:focus,
#review-form textarea:focus {
  border-color: var(--accent, #3b82f6);
}

#review-form label {
  font-weight: 500;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.25rem;
}

#review-form .CommentForm_cite,
#review-form .CommentForm_email,
#review-form .CommentForm_text {
  margin-bottom: 1rem;
}

/* Стили для интерактивных звезд */
.d-star-rating { 
  display: flex; 
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 8px; 
  margin-top: 8px; 
  margin-bottom: 24px;
}

.d-star-rating input { 
  display: none; 
}

.d-star-rating label { 
  cursor: pointer; 
  transition: transform 0.15s ease; 
  display: inline-block !important; 
}

.d-star-rating label:hover { 
  transform: scale(1.15); 
}

/* ВОТ ОН, СПАСИТЕЛЬ ОТ ГИГАНТСКИХ ЗВЕЗД */
.d-star-rating svg { 
  width: 32px; 
  height: 32px; 
  fill: var(--border, #e5e7eb); 
  transition: fill 0.2s ease; 
}

/* Магия подсветки желтым цветом */
.d-star-rating input:checked ~ label svg,
.d-star-rating label:hover svg,
.d-star-rating label:hover ~ label svg { 
  fill: #fbbf24 !important; 
}

/* ==========================================================================
   Оформление текстового контента (О детском саде)
   ========================================================================== */

/* Настройка цвета основного текста в блоке */
.prose {
  color: var(--fg);
}

/* Стили для заголовков H5 (название, главные подзаголовки) */
.prose h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.prose h5:first-child {
  margin-top: 0;
}

/* Стили для заголовков H6 (второстепенные разделы) */
.prose h6 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Отступы для обычных абзацев */
.prose p {
  margin-bottom: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Базовые стили для списков */
.prose ul {
  padding-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  list-style: none;
}

.prose ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Список с классом "check" 
  Добавляет зеленую галочку (цвет взят из вашего hero-pattern) 
*/
.prose ul.check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234A7C59'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Список с классом "star"
  Добавляет красную звездочку (использует ваш акцентный цвет #E85A4F)
*/
.prose ul.star li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23E85A4F'%3E%3Cpath d='M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ═══════════════════════════════════════════
   ТИПОГРАФИКА СТАТЕЙ (.article-content)
   ═══════════════════════════════════════════ */

.article-content {
    color: #2D2821;
    font-family: 'Inter', sans-serif;
    font-size: 1.0625rem;    /* 17px */
    line-height: 1.8;
}

/* Заголовки */
.article-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #2D2821;
    scroll-margin-top: 100px; /* для якорных ссылок под sticky header */
}

.article-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #2D2821;
    scroll-margin-top: 100px;
}

.article-content h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2D2821;
}

/* Параграфы */
.article-content p {
    margin-bottom: 1.25rem;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* Ссылки */
.article-content a {
    color: #E85A4F;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #E85A4F40;
    transition: text-decoration-color 0.2s;
}

.article-content a:hover {
    text-decoration-color: #E85A4F;
}

/* Списки */
.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.article-content li::marker {
    color: #E85A4F;
}

/* Вложенные списки */
.article-content li ul,
.article-content li ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Цитаты */
.article-content blockquote {
    border-left: 4px solid #E85A4F;
    background-color: #E85A4F08;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
    color: #8B7E74;
}

.article-content blockquote p {
    margin-bottom: 0;
}

/* Изображения внутри статьи */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 1.5rem 0;
}

.article-content figure {
    margin: 1.5rem 0;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #8B7E74;
    margin-top: 0.5rem;
}

/* Таблицы */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.article-content th,
.article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #E8E0D8;
    text-align: left;
}

.article-content th {
    background-color: #FDF8F3;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
}

.article-content tr:hover td {
    background-color: #FDF8F3;
}

/* Код */
.article-content code {
    background-color: #FDF8F3;
    border: 1px solid #E8E0D8;
    padding: 0.125rem 0.375rem;
    border-radius: 0.375rem;
    font-size: 0.875em;
}

.article-content pre {
    background-color: #2D2821;
    color: #FDF8F3;
    padding: 1.25rem;
    border-radius: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* Горизонтальная линия */
.article-content hr {
    border: none;
    border-top: 2px solid #E8E0D8;
    margin: 2rem 0;
}

/* Первый параграф — чуть крупнее (лид) */
.article-content > p:first-child {
    font-size: 1.125rem;
    color: #8B7E74;
    line-height: 1.75;
}

/* ═══════════════════════════════════════════
   ОГЛАВЛЕНИЕ — активный пункт анимация
   ═══════════════════════════════════════════ */

#toc-list a {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: block;
    transition: all 0.2s ease;
}

#toc-list a:hover {
    background-color: #E85A4F08;
}

#toc-list a.font-medium {
    background-color: #E85A4F10;
}

/* ═══════════════════════════════════════════
   ОТЗЫВЫ / КОММЕНТАРИИ (вынесено из partials/_reviews.php)
   ═══════════════════════════════════════════ */

/* Бейдж «В ответ ...» */
.comment-reply-to {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-soft-blue, #3b82f6);
    background: rgba(59, 130, 246, 0.08);
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    margin-bottom: 0.375rem;
}

/* Пагинация */
.comments-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
}
.comments-pagination a,
.comments-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}
.comments-pagination a {
    color: var(--color-fg, #374151);
    border: 1px solid var(--color-border, #e5e7eb);
    background: var(--color-card, #fff);
}
.comments-pagination a:hover {
    background: var(--color-accent, #ef4444);
    color: #fff;
    border-color: var(--color-accent, #ef4444);
}
.comments-pagination .current-page {
    background: var(--color-accent, #ef4444);
    color: #fff;
    border: 1px solid var(--color-accent, #ef4444);
}
.comments-pagination .dots {
    border: none;
    color: var(--color-muted, #9ca3af);
}

/* Sticky-сайдбар каталога (десктоп ≥1024px).
   Эталон — kindergarten.php: <div class="sticky top-24 space-y-6">.
   ID-селектор перебивает Tailwind-классы по специфичности.
   height:auto — перебивает h-full, который растягивал блок на всю
   высоту grid-строки и ломал sticky (элемент выше вьюпорта → прилипать некуда). */
@media (min-width: 1024px) {
    #filter-sidebar {
        overflow: visible;
    }
    #filter-sidebar > div {
        position: -webkit-sticky;
        position: sticky;
        top: 6rem;     /* = lg:top-24 (96px) */
        height: auto;  /* перебивает h-full → не растягивается на 5014px */
    }
}