/* =========================================================
   Главная: карусели рубрик + плитка остальных рубрик
   (reboot-child / inc/home-rubrics.php)
   ========================================================= */

.hr-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 0 20px;
}

/* ---------- секция-карусель ---------- */
.hr-sec {
    --rb: #2d81e0;
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    padding: 18px 0 20px;
    overflow: hidden;
}
.hr-sec::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rb), color-mix(in srgb, var(--rb) 25%, transparent));
    opacity: .9;
}

.hr-sec__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 14px;
}
.hr-sec__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    min-width: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.01em;
}
.hr-sec__title a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #111;
    text-decoration: none;
    min-width: 0;
    transition: color .2s ease;
}
.hr-sec__title a:hover { color: var(--rb); }
.hr-sec__icon {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 18px;
    background: color-mix(in srgb, var(--rb) 14%, #fff);
    transition: transform .25s ease;
}
.hr-sec__title a:hover .hr-sec__icon { transform: scale(1.08) rotate(-4deg); }
.hr-sec__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hr-sec__count {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: color-mix(in srgb, var(--rb) 80%, #000);
    background: color-mix(in srgb, var(--rb) 10%, #fff);
}

.hr-sec__nav {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.hr-nav {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #e8eaed;
    border-radius: 50%;
    background: #fff;
    color: #222;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease, transform .15s ease;
}
.hr-nav:hover:not(:disabled) {
    background: var(--rb);
    border-color: var(--rb);
    color: #fff;
}
.hr-nav:active:not(:disabled) { transform: scale(.92); }
.hr-nav:disabled { opacity: .35; cursor: default; }
.hr-nav:focus-visible { outline: 2px solid var(--rb); outline-offset: 2px; }

.hr-sec__all {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rb);
    text-decoration: none;
    background: color-mix(in srgb, var(--rb) 9%, #fff);
    transition: background .2s ease, color .2s ease;
}
.hr-sec__all:hover {
    color: #fff;
    background: var(--rb);
}

/* ---------- лента карточек ---------- */
.hr-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 220px;
    gap: 14px;
    padding: 2px 20px 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.hr-track::-webkit-scrollbar { display: none; }

.hr-card {
    scroll-snap-align: start;
    min-width: 0;
}
.hr-card__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    color: #111;
    text-decoration: none;
}
.hr-card__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    border-radius: 10px;
    overflow: hidden;
    background: #f2f4f7;
    isolation: isolate;
}
.hr-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.hr-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
    pointer-events: none;
}
.hr-card__link:hover .hr-card__media img { transform: scale(1.06); }

.hr-card__ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 38px;
    background:
        radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--rb) 30%, #fff) 0, transparent 60%),
        linear-gradient(135deg, color-mix(in srgb, var(--rb) 18%, #fff), color-mix(in srgb, var(--rb) 42%, #fff));
    transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.hr-card__link:hover .hr-card__ph { transform: scale(1.06); }

.hr-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
    transition: color .2s ease;
}
.hr-card__link:hover .hr-card__title { color: var(--rb); }
.hr-card__sub {
    margin-top: -3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #707780;
}
.hr-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -2px;
    font-size: 12px;
    line-height: 1;
    color: #9e9fa3;
    font-variant-numeric: tabular-nums;
}
.hr-meta { display: inline-flex; align-items: center; gap: 4px; }
.hr-meta svg { flex-shrink: 0; display: block; }
.hr-meta--rate { font-weight: 700; }
.hr-meta--rate.is-pos { color: #1a9e52; }
.hr-meta--rate.is-neg { color: #e0475a; }

/* последняя карточка «Смотреть все» */
.hr-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--rb), color-mix(in srgb, var(--rb) 60%, #000));
}
.hr-more__arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 22px;
    background: rgba(255, 255, 255, .2);
    transition: transform .25s ease, background .25s ease;
}
.hr-card--more .hr-card__link:hover .hr-more__arrow {
    transform: translateX(4px);
    background: rgba(255, 255, 255, .3);
}
.hr-more__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}
.hr-more__text b {
    font-size: 12px;
    font-weight: 500;
    opacity: .85;
}

/* ---------- плитка остальных рубрик ---------- */
.hr-tiles-sec {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    padding: 18px 20px 20px;
}
.hr-tiles__title {
    margin: 0 0 14px;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #111;
}
.hr-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.hr-tile {
    --rb: #2d81e0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 104px;
    padding: 14px;
    border-radius: 10px;
    overflow: hidden;
    color: #111;
    text-decoration: none;
    background: linear-gradient(145deg, color-mix(in srgb, var(--rb) 7%, #fff), color-mix(in srgb, var(--rb) 16%, #fff));
    border: 1px solid color-mix(in srgb, var(--rb) 14%, #fff);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hr-tile::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -26px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--rb) 18%, transparent);
    transition: transform .35s ease;
}
.hr-tile:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--rb) 40%, #fff);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--rb) 18%, transparent);
}
.hr-tile:hover::after { transform: scale(1.35); }
.hr-tile__icon {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
    border-radius: 9px;
    font-size: 19px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.hr-tile__name {
    position: relative;
    z-index: 1;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 600;
}
.hr-tile__count {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: #6b7280;
}

/* ---------- адаптив ---------- */
@media (max-width: 768px) {
    .hr-wrap { gap: 10px; margin-bottom: 10px; }
    .hr-sec,
    .hr-tiles-sec {
        border-radius: 0;
        box-shadow: none;
    }
    .hr-sec { padding: 16px 0 18px; }
    .hr-sec__head { padding: 0 16px; margin-bottom: 12px; gap: 8px; }
    .hr-sec__title { font-size: 18px; }
    .hr-sec__icon { width: 30px; height: 30px; font-size: 16px; }
    .hr-track {
        grid-auto-columns: 200px;
        gap: 10px;
        padding: 2px 16px 4px;
        scroll-padding: 0 16px;
    }
    .hr-tiles-sec { padding: 16px; }
    .hr-tiles__title { font-size: 18px; }
}

@media (max-width: 599px) {
    .hr-sec__nav { display: none; }
    .hr-sec__all { margin-left: auto; padding: 6px 10px; font-size: 13px; }
    .hr-sec__title { gap: 8px; }
    .hr-sec__title a { gap: 8px; min-width: 0; }
    .hr-sec__count { padding: 2px 7px; font-size: 11.5px; line-height: 1.3; }
    .hr-track { grid-auto-columns: min(62vw, 200px); }
    .hr-card__title { font-size: 14px; }
    .hr-tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
    .hr-tile { min-height: 96px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .hr-track { scroll-behavior: auto; }
    .hr-card__media img,
    .hr-card__ph,
    .hr-tile,
    .hr-tile::after { transition: none; }
}

/* =========================================================
   Главная: SEO-текст «Куда сходить в Москве» (inc/home-seo.php)
   ========================================================= */
.hseo {
    position: relative;
    margin: 4px 0 24px;
    padding: 32px 32px 30px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    color: #2b2f36;
    font-size: 15.5px;
    line-height: 1.68;
    overflow: hidden;
    isolation: isolate;
}
.hseo::before {
    content: "";
    position: absolute;
    inset: -120px -80px auto auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 57, 53, .10), transparent 65%);
    z-index: -1;
    pointer-events: none;
}
.hseo p { margin: 0 0 12px; }
.hseo p:last-child { margin-bottom: 0; }
.hseo a {
    color: #1f5fbf;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: color .2s ease, background-size .25s ease;
}
.hseo a:hover { color: #e53935; background-size: 0 1px; }

.hseo__intro { max-width: 860px; }
.hseo__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 4px 11px;
    border-radius: 999px;
    background: #fff1f0;
    color: #d32f2f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.hseo__eyebrow::before { content: "★"; font-size: 11px; }
.hseo__h2 {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #111;
}
.hseo__h3 {
    margin: 0 0 12px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #111;
}

/* три карточки с H3 */
.hseo__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0 30px;
}
.hseo-card {
    --c: #2563eb;
    position: relative;
    padding: 20px 20px 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, #fff), #fff 70%);
    border: 1px solid color-mix(in srgb, var(--c) 16%, #eef0f3);
    font-size: 14.5px;
    line-height: 1.62;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.hseo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--c) 45%, transparent);
    border-color: color-mix(in srgb, var(--c) 35%, #fff);
}
.hseo-card__ico {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: 12px;
    font-size: 21px;
    background: color-mix(in srgb, var(--c) 14%, #fff);
    transition: transform .3s ease;
}
.hseo-card:hover .hseo-card__ico { transform: rotate(-6deg) scale(1.06); }
.hseo-card__h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: #111;
}
.hseo-card p { margin-bottom: 9px; }
.hseo-card a { color: color-mix(in srgb, var(--c) 80%, #000); }

/* «Афиша Москвы» + «Культурная афиша Москвы» */
.hseo__afisha {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 30px;
    padding-top: 26px;
    border-top: 1px solid #eef0f3;
}
.hseo__afisha .hseo__col + .hseo__col {
    padding-left: 30px;
    border-left: 1px solid #eef0f3;
}
.hseo__afisha .hseo__h3 { margin-top: 6px; }

.hseo { container: hseo / inline-size; }
@container hseo (max-width: 900px) {
    .hseo__grid { grid-template-columns: 1fr; }
    .hseo-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 14px; }
    .hseo-card__ico { grid-row: 1 / span 3; }
}
@container hseo (max-width: 720px) {
    .hseo__afisha { grid-template-columns: 1fr; gap: 22px; }
    .hseo__afisha .hseo__col + .hseo__col { padding-left: 0; border-left: 0; padding-top: 22px; border-top: 1px solid #eef0f3; }
}
@container hseo (max-width: 440px) {
    .hseo-card { display: block; padding: 16px; }
    .hseo-card__ico { width: 38px; height: 38px; font-size: 19px; margin-bottom: 10px; }
}
@media (max-width: 768px) {
    .hseo { border-radius: 0; box-shadow: none; padding: 24px 16px; font-size: 15px; margin-bottom: 10px; }
    .hseo__h2 { font-size: 23px; }
    .hseo__h3 { font-size: 19px; }
    .hseo__grid { margin: 20px 0 24px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .hseo-card, .hseo-card__ico, .hseo a { transition: none; }
    .hseo-card:hover { transform: none; }
}