    :root{ --radius:16px; --shadow: 0 10px 28px rgba(0,0,0,.18); --max:1240px; }
    :root[data-theme="light"]{
      --bg:#f6f7fb; --card:#ffffff; --text:#0c1220; --muted:#5f6b7a; --line:rgba(12,18,32,.12);
      --accent:#2563eb; --accent2:#0ea5e9; --shadow: 0 10px 28px rgba(12,18,32,.10);
    }
    :root[data-theme="dark"]{
      --bg:#0b0c10; --card:#12141a; --text:#e9edf5; --muted:#9aa3b2; --line:rgba(255,255,255,.12);
      --accent:#4f8cff; --accent2:#2dd4bf; --shadow: 0 10px 28px rgba(0,0,0,.35);
    }

    *{box-sizing:border-box}
    body{
      margin:0;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background:
        radial-gradient(1200px 600px at 50% -220px, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%),
        radial-gradient(900px 500px at 10% 40%, color-mix(in srgb, var(--accent2) 14%, transparent), transparent 60%),
        var(--bg);
      color:var(--text);
    }

    .container{max-width:var(--max); margin:0 auto; padding: 0 16px;}
    .section{padding: 148px 0px 100px 0px;}
    .sectionS{padding: 28px 0px 20px 0px;}
    .divider{height:1px; background:var(--line); border:0; margin: 18px 0;}
    .h2{margin:0; font-size: 18px; letter-spacing:.2px;}
    .hint{color: var(--muted); font-size: 13px;}

    .btn{
      appearance:none; border:1px solid var(--line);
      background: rgba(255,255,255,.10);
      color: var(--text);
      padding: 10px 12px;
      border-radius: 999px;
      cursor:pointer;
      text-decoration:none;
      font-weight:800;
      font-size: 13px;
      transition: transform .12s ease, background .12s ease, border-color .12s ease;
      white-space:nowrap;
      backdrop-filter: blur(6px);
    }
    :root[data-theme="dark"] .btn{color:#fff;}
    .btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.16)}
    .btn--accent{border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 18%, transparent);}

    /* HERO */
    .hero{padding: 18px 0 8px;}
    .hero__wrap{
      position:relative;
      border-radius: calc(var(--radius) + 8px);
      overflow:hidden;
      box-shadow: var(--shadow);
      background: var(--card);
      border:1px solid var(--line);
    }
    .hero__img{width:100%; height: min(44vw, 360px); display:block; object-fit: cover; filter: contrast(1.05) saturate(1.05);}
    .hero__overlay{position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.55));}
    :root[data-theme="light"] .hero__overlay{background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.35));}
    .hero__content{
      position:absolute; left:0; right:0; bottom:0;
      padding: 18px;
      display:flex; gap:14px; align-items:flex-end; justify-content:space-between;
    }
    .hero__title{margin:0; font-size: clamp(22px, 3.2vw, 34px); line-height: 1.15;}
    .hero__subtitle{margin:8px 0 0; color: rgba(255,255,255,.85); max-width: 62ch; font-size: 14px;}
    .hero__cta{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end;}
    @media (max-width: 760px){
      .hero__content{flex-direction:column; align-items:flex-start;}
      .hero__cta{justify-content:flex-start;}
    }

    /* CATEGORIES */
    .cats__header{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 10px;}
    .cats__row{display:flex; gap:14px; overflow:auto; padding:6px 2px 10px; scroll-snap-type:x mandatory;}
    .cats__row::-webkit-scrollbar{height:10px}
    .cats__row::-webkit-scrollbar-thumb{background: rgba(0,0,0,.12); border-radius:999px}
    :root[data-theme="dark"] .cats__row::-webkit-scrollbar-thumb{background: rgba(255,255,255,.10);}

    .catBtn{
      min-width: 170px;
      text-align:left;
      background: color-mix(in srgb, var(--card) 94%, transparent);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 12px;
      scroll-snap-align: start;
      box-shadow: 0 8px 20px rgba(0,0,0,.08);
      cursor:pointer;
      color: var(--text);
      transition: transform .14s ease, border-color .14s ease, background .14s ease;
    }
    :root[data-theme="dark"] .catBtn{box-shadow: 0 8px 20px rgba(0,0,0,.20);}
    .catBtn:hover{transform: translateY(-1px); border-color: color-mix(in srgb, var(--text) 20%, transparent);}
    .catBtn[aria-pressed="true"]{border-color: color-mix(in srgb, var(--accent) 65%, transparent); background: color-mix(in srgb, var(--accent) 10%, var(--card));}

    .cat__top{display:flex; align-items:center; gap:10px;}
    .cat__icon{
      width:48px; height:48px; border-radius:999px;
      display:grid; place-items:center;
      background: color-mix(in srgb, var(--accent) 18%, transparent);
      border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
      flex:0 0 auto; font-size:20px;
    }
    .cat__name{
      margin:0; font-weight:950; font-size:13px; line-height:1.2;
      display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    }
    .cat__meta{margin:6px 0 0; color:var(--muted); font-size:12px;}
    .cat__has{
      margin-top:10px; display:flex; align-items:center; justify-content:space-between;
      gap:10px; padding-top:10px; border-top:1px solid var(--line);
      font-weight:900; font-size:12px; color: color-mix(in srgb, var(--text) 85%, transparent);
    }

    /* SUBCATEGORY TABLE */
    .subPanel{
      border:1px solid var(--line);
      background: color-mix(in srgb, var(--card) 96%, transparent);
      border-radius: calc(var(--radius) + 6px);
      box-shadow: var(--shadow);
      overflow:hidden;
      display:none;
      margin-top: 10px;
    }
    .subPanel.isOpen{display:block;}
    .subPanel__top{
      display:flex; align-items:center; justify-content:space-between; gap:12px;
      padding:14px 14px;
      background: linear-gradient(90deg,
        color-mix(in srgb, var(--accent) 12%, transparent),
        color-mix(in srgb, var(--accent2) 10%, transparent)
      );
      border-bottom:1px solid var(--line);
    }
    .subPanel__left{display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-weight:950;}
    .subPanel__label{color:var(--muted); font-weight:800; font-size:13px;}
    .subPanel__close{
      border:1px solid var(--line);
      background: rgba(0,0,0,.06);
      color: var(--text);
      border-radius:999px;
      padding:8px 10px;
      cursor:pointer;
      font-weight:900;
    }
    .subPanel__body{padding:12px 14px 14px;}
    .subTable{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px 14px;}
    @media (max-width: 900px){ .subTable{grid-template-columns: repeat(2, minmax(0,1fr));} }
    @media (max-width: 520px){ .subTable{grid-template-columns: 1fr;} }

    .subLink{
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      padding:10px 12px;
      border-radius:14px;
      border:1px solid var(--line);
      background: color-mix(in srgb, var(--card) 92%, transparent);
      text-decoration:none;
      color: var(--text);
      font-weight:900;
      font-size:13px;
      transition: transform .12s ease, border-color .12s ease;
      min-width:0;
    }
    .subLink span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
    .subLink:hover{transform: translateY(-1px); border-color: color-mix(in srgb, var(--text) 20%, transparent);}

    /* CONTROLS */
    .controls{
      display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:space-between;
      margin: 10px 0 12px;
    }
    .controlLeft{display:flex; gap:10px; flex-wrap:wrap; align-items:center; min-width:0; flex:1;}
    .input, .select{
      border:1px solid var(--line);
      background: color-mix(in srgb, var(--card) 96%, transparent);
      color: var(--text);
      border-radius: 999px;
      padding: 10px 12px;
      font: inherit;
      min-width: 220px;
      max-width: 520px;
      width: 100%;
      outline:none;
    }
    .select{min-width:180px; width:auto;}
    .input:focus, .select:focus{border-color: color-mix(in srgb, var(--accent) 55%, transparent);}
    .mutedSmall{color:var(--muted); font-size:12px;}

    /* POSTS GRID (3 в ряд) */
    .postsGrid{display:grid; grid-template-columns: repeat(3, 1fr); gap: 14px;}
    @media (max-width: 900px){ .postsGrid{grid-template-columns: repeat(2, 1fr);} }
    @media (max-width: 520px){ .postsGrid{grid-template-columns: 1fr;} }

    .card{
      position:relative;
      background: color-mix(in srgb, var(--card) 96%, transparent);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow:hidden;
      box-shadow: var(--shadow);
      display:flex;
      flex-direction:column;
      min-height: 280px;
      transition: transform .14s ease, border-color .14s ease;
    }
    .card:hover{transform: translateY(-2px); border-color: color-mix(in srgb, var(--text) 20%, transparent);}

    .card__img{width:100%; height: 170px; object-fit: cover; display:block; background: color-mix(in srgb, var(--bg) 92%, transparent);}
    .card__body{padding: 12px; display:flex; flex-direction:column; gap: 8px; flex:1;}

    .badgeCircle{
      display:inline-flex; align-items:center; justify-content:center;
      padding: 6px 10px;
      border-radius: 999px;
      background: rgba(34,197,94,.16);
      border: 1px solid rgba(34,197,94,.35);
      font-weight:950;
      font-size: 11px;
      max-width: 160px;
      overflow:hidden;
      text-overflow:ellipsis;
      white-space:nowrap;
    }
    .meta{font-size: 12px; color: var(--muted); margin-left:auto;}
    .badgeRow{display:flex; gap:8px; flex-wrap:wrap; align-items:center; min-width:0;}

    .card__title{
      margin:0; font-size: 13px; line-height: 1.25; font-weight: 950;
      display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    }
    .card__text{
      margin:0; color: var(--muted); font-size: 12px; line-height: 1.35;
      display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
    }
    .card__link{
      margin-top:auto; padding-top: 6px;
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      color: var(--text);
      font-weight:950;
      font-size: 12px;
    }

    /* вся карточка ссылка */
    .cardLink{
      text-decoration:none;
      color: inherit;
      display:flex;
      flex-direction:column;
    }
    .cardLink:focus-visible{
      outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
      outline-offset: 3px;
      border-radius: var(--radius);
    }

    /* TAG (без круга, близко к борту, слева сверху) */
    .cornerTag{
      position:absolute;
      top:8px;
      left:8px;
      padding: 6px 10px;
      border-radius: 12px;
      font-weight: 950;
      font-size: 11px;
      letter-spacing: .3px;
      z-index: 2;
      border: 1px solid var(--line);
      background: color-mix(in srgb, var(--card) 88%, transparent);
      box-shadow: 0 10px 18px rgba(0,0,0,.10);
      backdrop-filter: blur(8px);
    }
    .cornerTag--new{
      border-color: color-mix(in srgb, #22c55e 45%, var(--line));
      background: color-mix(in srgb, #22c55e 18%, var(--card));
    }
    .cornerTag--hot{
      border-color: color-mix(in srgb, #f97316 45%, var(--line));
      background: color-mix(in srgb, #f97316 18%, var(--card));
    }

    .loadMoreRow{margin-top: 14px; display:flex; justify-content:center;}

    /* РУБРИКИ: мобильный скролл, ПК без скролла */
.cats__row{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.cats__row::-webkit-scrollbar{height:6px}
.cats__row .catBtn{scroll-snap-align:start; flex:0 0 auto;}

/* На компьютере показываем всё и убираем скролл */
@media (min-width: 992px){
  .cats__row{
    overflow-x: visible;
    flex-wrap: wrap;
    padding-bottom: 0;
  }
  .cats__row .catBtn{
    flex: 0 0 calc((100% - 36px) / 4); /* 4 в ряд, можно поменять */
  }
}

/* Если хочешь 5-6 в ряд на очень широких */
@media (min-width: 1200px){
  .cats__row .catBtn{
    flex: 0 0 calc((100% - 60px) / 6);
  }
}



.cats__header .hint{display:block}
@media (min-width: 992px){
  .cats__header .hint{display:none}
}

.searchBlock{
  margin: 14px 0 18px;
}

.searchBar{
  display:flex;
  align-items:stretch;
  gap:0;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  min-height: 62px;
}

.searchBar__left,
.searchBar__mid{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 0 14px;
}

.searchBar__left{
  flex: 1 1 auto;
  min-width: 220px;
}

.searchBar__mid{
  flex: 0 0 280px;
  border-left: 1px solid var(--line);
}

.searchBar__icon,
.searchBar__pin{
  opacity:.75;
  font-size: 18px;
}

.searchBar__input{
  width:100%;
  border:0;
  outline:0;
  font-size: 16px;
  background: transparent;
  color: var(--text);
}

.searchBar__input::placeholder{ color: var(--muted); }

.searchBar__select{
  width:100%;
  border:0;
  outline:0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.searchBar__btn{
  flex: 0 0 160px;
  border:0;
  cursor:pointer;
  background: color-mix(in srgb, var(--accent) 22%, #06373b); /* похож на твой стиль */
  color:#fff;
  font-weight: 950;
  font-size: 16px;
}

.searchBar__btn:hover{ filter: brightness(1.03); }

/* мобильная адаптация */
@media (max-width: 760px){
  .searchBar{
    flex-direction: column;
    border-radius: 14px;
  }
  .searchBar__mid{
    flex: 1 1 auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .searchBar__btn{
    width: 100%;
    flex: 0 0 auto;
    padding: 16px 14px;
  }
}
/* ===== SearchBar select fix (light + dark) ===== */

/* убираем стандартные обводки и делаем один стиль */
.searchBar__select{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;

  background: transparent !important;
  color: var(--text) !important;

  padding: 0 28px 0 0; /* место под стрелку */
  font-weight: 900;
}

/* стрелка для select */
.searchBar__mid{
  position: relative;
}
.searchBar__mid::after{
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .75;
  pointer-events: none;
}

/* Фокус: делаем красивый, но без “рамки вокруг текста” */
.searchBar:focus-within{
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

/* ВАЖНО: options в dropdown (иначе в dark не видно) */
.searchBar__select option{
  background: #ffffff;
  color: #111111;
}

/* dark-mode options */
html[data-theme="dark"] .searchBar__select option{
  background: #0f1116;
  color: #e9edf5;
}

/* чтобы и сам select был читаемым в dark */
html[data-theme="dark"] .searchBar{
  background: #0f1116;
  border-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] .searchBar__mid{
  border-left-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] .searchBar__btn{
  background: #06373b;
}

/* маленькая косметика: убираем синюю рамку у select в некоторых браузерах */
.searchBar__select:focus{
  outline: none !important;
  box-shadow: none !important;
}
/* ============================
   SEARCH BAR (responsive)
   ============================ */

.searchBlock{ margin: 14px 0 18px; }

.searchBar{
  display:flex;
  align-items:stretch;
  border-radius: 14px;
  overflow:hidden;

  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);

  min-height: 62px;
}

/* left (input) */
.searchBar__left{
  flex: 1 1 auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 0 14px;
  min-width: 220px;
}

/* middle (filter) */
.searchBar__mid{
  flex: 0 0 280px;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  position: relative;
}

/* button */
.searchBar__btn{
  flex: 0 0 170px;
  border:0;
  cursor:pointer;
  background: #06373b;
  color:#fff;
  font-weight: 950;
  font-size: 16px;
}
.searchBar__btn:hover{ filter: brightness(1.03); }

/* icon + input */
.searchBar__icon,
.searchBar__pin{
  opacity:.75;
  font-size: 18px;
}
.searchBar__input{
  width:100%;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 16px;
}
.searchBar__input::placeholder{ color: var(--muted); }

/* select fixes (no ugly border, dropdown readable) */
.searchBar__select{
  width:100%;
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;

  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;

  background: transparent !important;
  color: var(--text) !important;

  padding: 0 28px 0 0; /* room for arrow */
  font-weight: 900;
  font-size: 14px;
  cursor:pointer;
}
.searchBar__mid::after{
  content:"▾";
  position:absolute;
  right:14px;
  top:50%;
  transform: translateY(-50%);
  opacity:.75;
  pointer-events:none;
}
.searchBar__select option{
  background:#ffffff;
  color:#111111;
}
html[data-theme="dark"] .searchBar__select option{
  background:#0f1116;
  color:#e9edf5;
}

/* nice focus */
.searchBar:focus-within{
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

/* ============================
   TABLET (<= 992px)
   input wider, filter smaller, btn smaller
   ============================ */
@media (max-width: 992px){
  .searchBar__mid{ flex: 0 0 220px; }
  .searchBar__btn{ flex: 0 0 150px; }
}

/* ============================
   PHONE (<= 760px)
   stack vertically (input, filter, button)
   ============================ */
@media (max-width: 760px){

  .section {
    padding: 18px 0 26px;
  }
  .searchBar{
    flex-direction: column;
    border-radius: 16px;
    min-height: unset;
  }

  .searchBar__left{
    width:100%;
    padding: 14px 14px;
    min-width: 0;
  }

  .searchBar__mid{
    width:100%;
    flex: 0 0 auto;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 14px;
  }

  .searchBar__btn{
    width: 100%;
    flex: 0 0 auto;
    padding: 16px 14px;
  }
}

/* ============================
   DARK MODE (search block)
   ============================ */
html[data-theme="dark"] .searchBar{
  background:#0f1116;
  border-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] .searchBar__mid{
  border-left-color: rgba(255,255,255,.12);
  border-top-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] .searchBar__btn{
  background:#06373b;
}
/* FIX: фон не повторяется и покрывает всю страницу */
html, body{
  min-height: 100%;
}

body{
  background-repeat: no-repeat !important;
  background-size: cover !important;        /* или 100% 100% если хочешь строго */
  background-attachment: fixed;            /* чтобы не "ломался" при скролле */
  background-position: center top !important;
}

/* Если фон был задан на секциях/контейнерах — убираем оттуда */
.section,
.container{
  background: transparent !important;
}


/* HERO TEXT IMPROVE */

/* контейнер текста */
.heroText{
  position:absolute;
  left: 26px;
  bottom: 18px;
  z-index: 2;

  max-width: 560px;
  padding: 14px 16px;
  border-radius: 18px;

  /* стеклянная панель (очень аккуратно) */
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* маленький бейдж */
.heroBadge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}

/* заголовок */
.heroTitle{
  margin: 0 0 8px 0;
  color: #fff;
  font-weight: 950;
  line-height: 1.08;

  font-size: clamp(22px, 3vw, 40px);
  letter-spacing: -0.02em;

  text-shadow: 0 16px 40px rgba(0,0,0,.55);
}

/* подзаголовок */
.heroSub{
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  line-height: 1.45;
  text-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.heroSub b{
  color:#fff;
  font-weight: 950;
}

/* phone */
@media (max-width: 520px){
  .heroText{
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    padding: 12px 12px;
    border-radius: 16px;
  }
  .heroSub{ font-size: 13px; }
}
.cat__iconWrap{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--card) 75%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.cat__iconImg{
  width: 28px;
  height: 28px;
  object-fit: contain;
  display:block;
}


  .emptyState{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:14px;
  min-height:260px;
  padding:28px 12px;
}

.emptyState__img{
  width:min(360px, 80vw);
  height:auto;
  opacity:.95;
}

.emptyState__text{
  font-size:18px;
  font-weight:600;
  opacity:.85;
}
