/* ============================================================
   rayon.css — список районов (rn-) и страница района (ray-)
   ============================================================ */

/* ============================================================
   rn- — список районов (rayony.html)
   ============================================================ */

/* --- Intro + filters --- */
.rn-intro {
    max-width: var(--container);
    margin: 0 auto;
    padding: 48px var(--pad-x) 32px;
}

.rn-intro__text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--muted);
    max-width: 680px;
    line-height: 1.75;
    margin: 0 0 32px;
}

.rn-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rn-filter {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 100px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-decoration: none;
}

.rn-filter:hover,
.rn-filter.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-deep);
}

/* --- Grid --- */
.rn-grid-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--pad-x) 80px;
}

.rn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* --- Card --- */
.rn-card {
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    text-decoration: none;
    display: block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.rn-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.rn-card__photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.rn-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.rn-card:hover .rn-card__photo img {
    transform: scale(1.06);
}

.rn-card__tags {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.rn-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(26, 31, 28, 0.82);
    backdrop-filter: blur(6px);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.rn-card__body {
    padding: 20px 22px 24px;
}

.rn-card__name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
}

.rn-card__pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rn-card__pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--muted);
}

.rn-card__pill-icon {
    font-size: 0.8rem;
}

/* --- Empty state --- */
.rn-empty {
    display: none;
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    grid-column: 1 / -1;
}

.rn-empty.is-visible {
    display: block;
}

/* ============================================================
   ray- — страница района (rayon.html)
   ============================================================ */

/* --- Facts sticky bar --- */
.ray-facts {
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 85;
}

.ray-facts__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--pad-x);
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.ray-facts__inner::-webkit-scrollbar { display: none; }

.ray-facts__item {
    flex: 1;
    min-width: 180px;
    padding: 18px 24px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ray-facts__item:last-child { border-right: none; }

.ray-facts__label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.ray-facts__value {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* --- Content 2-col layout --- */
.ray-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 64px var(--pad-x);
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 56px;
    align-items: start;
}

/* --- Body prose --- */
.ray-body {}

.ray-body h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.375rem, 2.5vw, 1.875rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px;
    line-height: 1.2;
}

.ray-body h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 40px 0 14px;
}

.ray-body p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.8;
    margin: 0 0 18px;
}

.ray-body strong {
    color: var(--text);
    font-weight: 600;
}

/* --- Sidebar --- */
.ray-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ray-sidebar__box {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px 24px;
}

.ray-sidebar__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
}

.ray-sidebar__text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 20px;
}

.ray-sidebar__btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 20px;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ray-sidebar__btn--primary {
    background: var(--accent);
    color: var(--bg-deep);
    border: 1px solid var(--accent);
}

.ray-sidebar__btn--primary:hover {
    background: #c9c2b4;
    border-color: #c9c2b4;
}

.ray-sidebar__btn--wa {
    background: #25D366;
    color: #fff;
    border: 1px solid #25D366;
    margin-top: 10px;
}

.ray-sidebar__btn--wa:hover {
    background: #1ebe5a;
    border-color: #1ebe5a;
}

/* --- Settlements grid --- */
.ray-settlements {
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
}

.ray-settlements__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px var(--pad-x);
}

.ray-settlements__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 40px;
}

.ray-settlements__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ray-settlement-card {
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--line);
    transition: transform 0.3s, box-shadow 0.3s;
}

.ray-settlement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}

.ray-settlement-card__photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.ray-settlement-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.ray-settlement-card:hover .ray-settlement-card__photo img {
    transform: scale(1.05);
}

.ray-settlement-card__body {
    padding: 18px 20px 22px;
}

.ray-settlement-card__name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}

.ray-settlement-card__desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
}

/* --- How-to-get list --- */
.ray-howto {
    background: var(--bg);
    border-top: 1px solid var(--line);
}

.ray-howto__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px var(--pad-x);
}

.ray-howto__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 40px;
}

.ray-howto__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ray-howto-card {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px 24px;
    transition: border-color 0.2s;
}

.ray-howto-card:hover {
    border-color: rgba(217, 210, 197, 0.4);
}

.ray-howto-card__icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.ray-howto-card__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
}

.ray-howto-card__desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

/* --- Gallery --- */
.ray-gallery {
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
}

.ray-gallery__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 80px var(--pad-x);
}

.ray-gallery__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 32px;
}

.ray-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ray-gallery__item {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--line);
}

.ray-gallery__item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

.ray-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ray-gallery__item:hover img {
    transform: scale(1.05);
}

/* --- Lightbox --- */
.ray-lb {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(17, 20, 15, 0.96);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.ray-lb.is-open {
    display: flex;
}

.ray-lb__img {
    max-width: min(1000px, 90vw);
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.ray-lb__close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ray-lb__close:hover { background: rgba(255,255,255,0.08); }

.ray-lb__prev,
.ray-lb__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26,31,28,0.7);
    border: 1px solid var(--line);
    color: var(--text);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ray-lb__prev { left: 24px; }
.ray-lb__next { right: 24px; }
.ray-lb__prev:hover, .ray-lb__next:hover { background: rgba(255,255,255,0.1); }

/* --- Bottom CTA --- */
.ray-cta {
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
    text-align: center;
}

.ray-cta__inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 96px var(--pad-x);
}

.ray-cta__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px;
    line-height: 1.2;
}

.ray-cta__text {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 36px;
}

.ray-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 40px;
    background: var(--accent);
    color: var(--bg-deep);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 100px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.ray-cta__btn:hover {
    background: #c9c2b4;
    transform: translateY(-2px);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .rn-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ray-content {
        grid-template-columns: 1fr;
    }

    .ray-sidebar {
        position: static;
    }

    .ray-settlements__grid,
    .ray-howto__list {
        grid-template-columns: repeat(2, 1fr);
    }

    .ray-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ray-gallery__item:nth-child(1) {
        grid-column: span 1;
        grid-row: span 1;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 640px) {
    .rn-intro { padding: 32px 20px 24px; }

    .rn-grid-wrap { padding: 0 20px 48px; }

    .rn-grid,
    .ray-settlements__grid,
    .ray-howto__list {
        grid-template-columns: 1fr;
    }

    .ray-facts__inner {
        padding: 0 20px;
    }

    .ray-facts__item {
        min-width: 150px;
        padding: 14px 16px;
    }

    .ray-content {
        padding: 40px 20px;
    }

    .ray-settlements__inner,
    .ray-howto__inner,
    .ray-gallery__inner {
        padding: 48px 20px;
    }

    .ray-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ray-gallery__item:nth-child(1) {
        grid-column: span 2;
        aspect-ratio: 16 / 9;
    }

    .ray-cta__inner { padding: 64px 20px; }
}
