/* Шерегеш: типографика главной N-INFO и единые карточки жилья. */
@media (min-width: 981px) {
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .content-box {
        width: calc(100% + 40px) !important;
        max-width: none !important;
        margin-left: -20px;
        flex-shrink: 0;
    }
}

body:has(.sg-hub) .content-box > h1,
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .content-box > h1,
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-hub__main .weather-news__title,
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-trails__main h2,
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-map__seo > h2,
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .weather-page > h2,
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .news-detail h2 {
    margin-top: 0;
    font-family: Arial, sans-serif !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    letter-spacing: normal !important;
}

body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-trails__main h3,
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-map__seo h3,
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .news-detail h3 {
    font-family: Arial, sans-serif !important;
    font-size: 21px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
}

/* На десктопе меню заканчивается по границе основной 3/4-колонки, не заходя под рейтинг. */
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .section-subnav {
    width: calc(100% - 328px);
}

/* Основной контент 3/4 + постоянная правая колонка рейтинга. */
.sg-hub__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 304px;
    gap: 24px;
    align-items: start;
}

.sg-hub__main {
    min-width: 0;
}

.sg-hotel-rating {
    display: block;
    min-width: 0;
    margin-top: 48px;
    overflow: hidden;
    border: 1px solid #ded5bd;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(74, 58, 25, .07);
}

.sg-hotel-rating__head {
    padding: 18px 17px 16px;
    background: linear-gradient(135deg, #f5ecd5 0%, #ead9ad 55%, #dfc586 100%);
    color: #4b3a18;
}

.sg-hotel-rating__head span,
.sg-hotel-rating__head h2,
.sg-hotel-rating__head p {
    color: #4b3a18;
}

.sg-hotel-rating__head span {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sg-hotel-rating__head h2 {
    margin: 0 0 6px;
    font-size: 21px;
    line-height: 1.12;
}

.sg-hotel-rating__head p {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    opacity: .76;
    white-space: nowrap;
}

.sg-hotel-rating__all {
    display: block;
    margin: 6px 12px 12px;
    padding: 8px 10px;
    border: 1px solid;
    border-radius: 11px;
    text-align: center;
    text-decoration: none;
}

html[data-theme="dark"] .sg-hotel-rating {
    border-color: #554b37;
    background: #202429;
}

html[data-theme="dark"] .sg-hotel-rating__head {
    background: linear-gradient(135deg, #d8c38f 0%, #bfa568 100%);
}

.sg-hotel-rating__head h2 {
    font-family: Arial, sans-serif;
    font-weight: 400;
    letter-spacing: normal;
}

/* Воздушный рейтинг отелей: заливка только у шапки, места — в медалях. */
.sg-hotel-rating ol.sg-hotel-rating__list { margin: 0 !important; padding: 5px 7px 3px 9px; list-style: none !important; counter-reset: none !important; }
.sg-hotel-rating__item { list-style: none !important; }
.sg-hotel-rating__item::marker { content: ""; font-size: 0; }
.sg-hotel-rating__item a,
.sg-hotel-rating__item--leader a {
    position: relative;
    z-index: 0;
    display: grid;
    grid-template-columns: 28px 80px minmax(0, 1fr);
    gap: 0;
    align-items: center;
    margin: 0;
    padding: 6px 2px 6px 0;
    border-radius: 10px;
    background: transparent;
    transition: transform .18s ease, background-color .18s ease;
}
.sg-hotel-rating__item a::before {
    position: absolute;
    z-index: -1;
    top: 0;
    right: -8px;
    bottom: 0;
    left: -10px;
    background: transparent;
    content: "";
    transition: background-color .18s ease;
}
.sg-hotel-rating__item a:hover { transform: none; background: transparent; }
.sg-hotel-rating__item a:hover::before { background: rgba(170,133,53,.09); }
.sg-hotel-rating__thumb {
    display: grid;
    width: 70px;
    height: 70px;
    margin-left: 10px;
    overflow: hidden;
    place-items: center;
    border-radius: 11px;
    background: #f0f2f3;
    color: #f58220;
    font-weight: 700;
}
.sg-hotel-rating__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sg-hotel-rating__place {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #dfe2e5;
    border-radius: 50%;
    background: #fff;
    color: #606870;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.sg-hotel-rating__item--1 .sg-hotel-rating__place {
    border-color: #c69a2a;
    background: linear-gradient(145deg, #ffe97f, #dcae35);
    color: #67480a;
    box-shadow: 0 2px 7px rgba(190,139,22,.28), inset 0 1px 1px rgba(255,255,255,.7);
}
.sg-hotel-rating__item--2 .sg-hotel-rating__place {
    border-color: #aab1b8;
    background: linear-gradient(145deg, #f2f4f5, #b8c0c7);
    color: #525b63;
    box-shadow: 0 2px 7px rgba(95,105,115,.2), inset 0 1px 1px rgba(255,255,255,.8);
}
.sg-hotel-rating__item--3 .sg-hotel-rating__place {
    border-color: #a96c39;
    background: linear-gradient(145deg, #e4ad78, #a86432);
    color: #4c260d;
    box-shadow: 0 2px 7px rgba(126,70,27,.22), inset 0 1px 1px rgba(255,255,255,.45);
}
.sg-hotel-rating__copy { min-width: 0; margin-left: 8px; }
.sg-hotel-rating__copy small { margin-bottom: 2px; color: #9a7532; font-size: 10px; letter-spacing: .045em; text-transform: uppercase; }
.sg-hotel-rating__copy strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.22; }
.sg-hotel-rating__copy em { display: block; margin-top: 3px; color: #767b80; font-size: 10px; font-style: normal; line-height: 1.3; }
html[data-theme="dark"] .sg-hotel-rating__item--leader a { background: transparent; }
html[data-theme="dark"] .sg-hotel-rating__thumb { background: #30363d; }
html[data-theme="dark"] .sg-hotel-rating__item:not(.sg-hotel-rating__item--leader) .sg-hotel-rating__place {
    border-color: #fff;
    background: #fff;
    color: #4f565d;
}
html[data-theme="dark"] .sg-hotel-rating__copy strong { color: #f0ede5; }
html[data-theme="dark"] .sg-hotel-rating__copy em { color: #aeb3b8; }
html[data-theme="dark"] .sg-hotel-rating__item a:hover::before { background: rgba(255,255,255,.055); }

/* Match the primary action in the portal header. */
.sg-hotel-rating__all,
.sg-hotel-rating__all:visited {
  border-color: #d9c28d !important;
  background: #f3ead5 !important;
  color: #654d1c !important;
  font-size: 12px;
  font-weight: 600;
}
html[data-theme="dark"] .content-box a.sg-hotel-rating__all,
html[data-theme="dark"] .content-box a.sg-hotel-rating__all:visited {
  border-color: #796b4a !important;
  background: #312d24 !important;
  color: #e5d4a9 !important;
}
.sg-hotel-rating__all:hover,
.sg-hotel-rating__all:focus-visible {
  border-color: #c8aa66 !important;
  background: #eadab5 !important;
  color: #513a10 !important;
}

.sg-lodging-section .section-news__title-box,
.sg-lodging-catalog .section-news__title-box {
    flex: 0 0 auto;
    min-height: 0;
    margin: 0 0 5px;
}

.sg-lodging-section .section-news__date-box,
.sg-lodging-catalog .section-news__date-box {
    margin-top: 0;
}

.sg-lodging-catalog {
    width: calc(75% - 7px);
    max-width: 1110px;
}

.sg-lodging-page .sg-lodging-catalog {
    width: 100%;
    max-width: none;
}

.sg-lodging-page .sg-hotel-rating {
    margin-top: 0;
}

.sg-lodging-catalog .section-news__item {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e7e5e2;
    border-radius: 16px;
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.sg-lodging-catalog .section-news__item:hover {
    transform: translateY(-3px);
    border-color: #f58220;
    box-shadow: 0 10px 24px rgba(31, 34, 37, .08);
}

.sg-lodging-catalog .section-news__img-box,
.sg-lodging-catalog .section-news__img-link,
.sg-lodging-catalog .section-news__img-img {
    border-radius: 15px 15px 0 0;
}

.sg-lodging-catalog .section-news__img-box {
    overflow: hidden;
}

.sg-lodging-catalog .section-news__img-img {
    transition: transform .25s ease;
}

.sg-lodging-catalog .section-news__item:hover .section-news__img-img {
    transform: scale(1.025);
}

.sg-lodging-catalog .section-news__text-box {
    padding: 14px 15px 16px !important;
    background: transparent;
}

html[data-theme="dark"] .sg-lodging-catalog .section-news__item {
    border-color: #3a4047;
    background: #202429;
}

/* Главная Шерегеша: единое скругление карточек жилья и гидов. */
.sg-home-lodging .section-news__item,
.sg-home-guides .section-news__item {
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.sg-home-lodging .section-news__img-box,
.sg-home-lodging .section-news__img-link,
.sg-home-lodging .section-news__img-img,
.sg-home-guides .section-news__img-box,
.sg-home-guides .section-news__img-link,
.sg-home-guides .section-news__img-img {
    border-radius: 15px 15px 0 0;
}

.sg-home-lodging .section-news__img-box,
.sg-home-guides .section-news__img-box {
    overflow: hidden;
}

/* Гиды: та же воздушная плитка, что и в новостной ленте. */
.sg-guides-section .section-news__item {
    height: 100%;
    overflow: visible;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    transition: none;
}

.sg-guides-section .section-news__item:hover,
.sg-guides-section .section-news__item:focus-within {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none;
}

.sg-guides-section .section-news__img-box,
.sg-guides-section .section-news__img-link {
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #eef0f2;
}

.sg-guides-section .section-news__img-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform .28s ease;
}

.sg-guides-section .section-news__item:hover .section-news__img-img {
    transform: scale(1.035);
}

.sg-guides-section .section-news__text-box {
    display: grid;
    gap: 8px;
    padding: 12px 0 0 !important;
    background: transparent !important;
}

.sg-guides-section .section-news__section-name-text {
    justify-self: start;
    width: auto;
    margin: 0;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(245, 130, 32, .13);
    color: #e66f0b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.sg-guides-section .section-news__title-box {
    min-height: 0;
    margin: 0;
}

.sg-guides-section .section-news__title-link {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text, #202124);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.32;
    letter-spacing: -.012em;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    transition: color .18s ease;
}

.sg-guides-section .section-news__item:hover .section-news__title-link {
    color: #e66f0b;
}

.sg-guides-section .section-news__date-box {
    margin: 0;
}

.sg-guides-section .section-news__date {
    color: var(--text-muted, #757b82);
    font-size: 12px;
    line-height: 1.3;
}

.sg-guides-section .section-news__item:not(:has(.section-news__img-box)) {
    min-height: 178px;
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-2, #f4f5f6) !important;
    box-shadow: inset 0 0 0 1px var(--border, #e5e7e9) !important;
}

.sg-guides-section .section-news__item:not(:has(.section-news__img-box)):hover,
.sg-guides-section .section-news__item:not(:has(.section-news__img-box)):focus-within {
    background: var(--surface-2, #f4f5f6) !important;
    box-shadow: inset 0 0 0 1px var(--border-strong, #d5d8db) !important;
}

.sg-guides-section .section-news__item:not(:has(.section-news__img-box)) .section-news__text-box {
    padding: 0 !important;
}

html[data-theme="dark"] .sg-guides-section .section-news__img-box,
html[data-theme="dark"] .sg-guides-section .section-news__img-link {
    background: #2b3036;
}

html[data-theme="dark"] .sg-guides-section .section-news__title-link {
    color: #f1f3f5;
}

html[data-theme="dark"] .sg-guides-section .section-news__item:hover .section-news__title-link,
html[data-theme="dark"] .sg-guides-section .section-news__section-name-text {
    color: #ff963c;
}

html[data-theme="dark"] .sg-guides-section .section-news__section-name-text {
    background: rgba(245, 130, 32, .18);
}

html[data-theme="dark"] .sg-guides-section .section-news__item:not(:has(.section-news__img-box)) {
    background: #252a30 !important;
    box-shadow: inset 0 0 0 1px #3a4047 !important;
}

html[data-theme="dark"] .sg-guides-section .section-news__item:not(:has(.section-news__img-box)):hover,
html[data-theme="dark"] .sg-guides-section .section-news__item:not(:has(.section-news__img-box)):focus-within {
    background: #252a30 !important;
    box-shadow: inset 0 0 0 1px #4a525a !important;
}

.sg-trails-weather {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}

.sg-trails-weather > .weather-news {
    display: grid;
    grid-template-rows: 38px 205px;
    row-gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.sg-trails-weather .weather-news__head {
    height: 38px;
    min-height: 38px;
    margin: 0;
    align-items: baseline;
}

.sg-trails-weather .weather-news__title {
    margin-bottom: 0;
}

.sg-trails-promo__map {
    position: relative;
    display: block;
    height: 205px;
    min-height: 205px;
    overflow: hidden;
    border-radius: 16px;
    background: #e8eef3;
    color: #fff;
}

.sg-trails-promo__map img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.sg-trails-promo__map::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(transparent, rgba(12, 22, 31, .82));
}

.sg-trails-promo__map:hover img { transform: scale(1.035); }

.sg-trails-promo__map span {
    position: absolute;
    z-index: 1;
    right: 18px;
    bottom: 16px;
    left: 18px;
}

.sg-trails-promo__map strong,
.sg-trails-promo__map small { display: block; }
.sg-trails-promo__map strong { font-size: 19px; }
.sg-trails-promo__map small { margin-top: 3px; color: rgba(255,255,255,.88); }

.sg-slope-weather .weather-now {
    position: relative;
    height: 205px;
    min-height: 205px;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-bottom: 0;
    padding: 24px;
    display: block;
    border: 0;
    border-radius: 16px;
    background-image:
        linear-gradient(180deg, rgba(7, 19, 27, .04) 0%, rgba(7, 19, 27, .18) 48%, rgba(7, 19, 27, .68) 100%),
        url('/upload/sheregesh/sheregesh-weather-summer-v2.png') !important;
    background-position: center, center 58% !important;
    background-size: cover, cover !important;
    background-repeat: no-repeat !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
    color: #fff;
}

.sg-slope-weather__link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.sg-slope-weather__link .weather-now {
    transition: transform .25s ease, box-shadow .25s ease;
}
.sg-slope-weather__link:hover .weather-now {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(22, 35, 46, .18), inset 0 0 0 1px rgba(255,255,255,.2);
}

.sg-slope-weather .weather-now__main {
    position: absolute;
    top: 50%;
    left: 50%;
    gap: 13px;
    transform: translate(-50%, -62%);
}
.sg-slope-weather .weather-now__icon { width: 54px; height: 54px; color: #ff851b; }
.sg-slope-weather .weather-now__temp { font-size: 42px; line-height: .95; }
.sg-slope-weather .weather-now__label { margin-top: 6px; font-size: 16px; line-height: 1.15; white-space: nowrap; }
.sg-slope-weather .weather-now__temp,
.sg-slope-weather .weather-now__label { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.sg-slope-weather .weather-now__details {
    position: absolute;
    right: auto !important;
    bottom: 12px !important;
    left: 14px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    justify-content: flex-start;
    gap: 5px;
}
.sg-slope-weather .weather-now__details li {
    background: rgba(10,20,29,.48);
    border-color: rgba(255,255,255,.2);
    backdrop-filter: blur(5px);
}
.sg-slope-weather .weather-now__details span { color: rgba(255,255,255,.72); }
.sg-slope-weather .weather-now__details strong { color: #fff; }

@media (max-width: 980px) {
    .sg-hub__layout {
        grid-template-columns: 1fr;
    }

    .sg-hotel-rating {
        width: 100%;
        margin-top: 0;
    }

    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .section-subnav {
        width: 100%;
    }

    .sg-lodging-catalog {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 700px) {
    .sg-trails-weather { grid-template-columns: 1fr; gap: 22px; }
    .sg-trails-weather > .weather-news { grid-template-rows: 38px 190px; row-gap: 8px; }
    .sg-trails-promo__map { height: 190px; min-height: 190px; }
    .sg-slope-weather .weather-now { height: 190px; min-height: 190px; padding: 18px; }
    .sg-slope-weather .weather-now__main { transform: translate(-50%, -68%); }
    .sg-slope-weather .weather-now__icon { width: 46px; height: 46px; }
    .sg-slope-weather .weather-now__temp { font-size: 36px; }
    .sg-slope-weather .weather-now__label { font-size: 14px; }
    .sg-slope-weather .weather-now__details { right: auto !important; bottom: 10px !important; left: 10px !important; width: calc(100% - 20px) !important; flex-wrap: nowrap; }
    .sg-slope-weather .weather-now__details li { flex: 0 1 auto; justify-content: flex-start; padding: 4px 5px; }
    .sg-slope-weather .weather-now__details span { font-size: 10px; }
    .sg-slope-weather .weather-now__details strong { font-size: 11px; }
    body:has(.sg-hub) .content-box > h1,
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .content-box > h1,
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-hub__main .weather-news__title,
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-trails__main h2,
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-map__seo > h2,
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .weather-page > h2,
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .news-detail h2 {
        font-size: 24px !important;
    }
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-trails__main h3,
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .sg-map__seo h3,
    body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) .news-detail h3 {
        font-size: 19px !important;
    }
}

/* Основной текст Шерегеша: типографика обычных новостей. */
body:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) :is(
    .news-detail,
    .news-detail > p, .news-detail > ul, .news-detail > ol,
    .sg-photo-guide p, .sg-photo-guide li,
    .sg-stay-description, .sg-stay-description p, .sg-stay-description li,
    .sg-hub__lead,
    .sg-trails__main p, .sg-trails__main li,
    .sg-map__intro p, .sg-map__seo p,
    .weather-page__seo
) {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 15px !important;
    line-height: 1.5 !important;
    letter-spacing: -0.165px;
}

/* В новостной сетке боковая колонка уже учтена шириной content-box. */
body.ninfo-geo-shell:not(:has(.sg-hub)):is(:has(.nnews__grid), :has(.news-detail))
.section-subnav:has(.section-subnav__chips[aria-label="Раздел Шерегеш"]) {
    width: 100%;
}
@media (min-width: 768px) {
    body.ninfo-geo-shell .section-subnav__chips[aria-label="Раздел Шерегеш"] {
        flex-wrap: wrap;
        overflow: visible;
        cursor: default;
        touch-action: auto;
    }
}
