/*
Theme Name: Русский лес
Theme URI: https://russian-forest.org/
Author: Санаторий «Русский лес»
Description: Официальный сайт санатория «Русский лес» во Владимирской области.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: rf
*/

:root {
    --ink: #1c241c;
    --muted: #5c655c;
    --paper: #f4f1e8;
    --paper-2: #e7efe6;
    --white: #fffcf6;
    --line: rgba(28, 36, 28, 0.12);
    --pine: #1b3a2a;
    --pine-2: #245038;
    --gold: #b6894a;
    --gold-2: #e2c48a;
    --header: 74px;
    --wrap: 1180px;
    --serif: "Literata", Georgia, serif;
    --sans: Manrope, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }
h1, h2, h3, .logo-name {
    font-family: var(--serif);
    font-weight: 560;
    letter-spacing: -0.02em;
    line-height: 1.08;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.8rem); margin: 0 0 0.28em; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); margin: 0 0 0.4em; }
h3 { font-size: 1.45rem; margin: 0 0 0.35em; }
p { margin: 0 0 0.85em; }
.wrap { width: min(var(--wrap), calc(100% - 40px)); margin: 0 auto; }
.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    background: var(--white);
    padding: 8px 12px;
    z-index: 80;
}
.skip:focus { top: 12px; }

.topbar {
    background: #12261c;
    color: rgba(244, 241, 232, 0.88);
    font-size: 13px;
}
.topbar-inner {
    display: flex;
    gap: 18px;
    align-items: center;
    min-height: 38px;
    width: min(var(--wrap), calc(100% - 32px));
    margin: 0 auto;
}
.topbar a { text-decoration: none; white-space: nowrap; }
.topbar a strong { font-weight: 700; }
.topbar span { opacity: 0.78; }
.topbar .grow { margin-left: auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header);
    color: #f6f3ea;
    background: var(--pine);
}
.header-inner, .header-tools, .nav, .logo {
    display: flex;
    align-items: center;
}
.header-inner {
    height: 100%;
    width: min(var(--wrap), calc(100% - 32px));
    margin: 0 auto;
    gap: 18px;
}
.logo { gap: 10px; text-decoration: none; margin-right: auto; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo-name {
    display: block;
    font-size: 1.35rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
}
.logo-place {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
}
.nav { gap: 2px; flex: none; }
.nav-item { position: relative; flex: none; }
.nav a {
    text-decoration: none;
    font-size: 14.5px;
    padding: 8px 6px;
    border-radius: 8px;
    white-space: nowrap;
}
.nav a[aria-current="page"] { color: var(--gold-2); }
.nav-sub {
    display: none;
    position: absolute;
    top: calc(100% - 4px);
    left: 0;
    min-width: 250px;
    padding: 8px;
    background: #143024;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}
.nav-item:hover .nav-sub,
.nav-item:focus-within .nav-sub { display: grid; }
.nav-sub a { display: block; padding: 8px 10px; }
.header-tools { gap: 12px; }
.header-phone { display: none; }
.nav-toggle {
    display: none;
    border: 1px solid rgba(246, 243, 234, 0.35);
    background: transparent;
    color: inherit;
    border-radius: 999px;
    padding: 8px 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
}
.btn-solid { background: var(--gold); color: #1c241c; }
.btn-solid:hover { background: #c79655; }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-small { min-height: 38px; padding: 0 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid var(--gold-2);
    outline-offset: 3px;
}

.hero {
    position: relative;
    min-height: 78svh;
    display: flex;
    align-items: flex-end;
    color: #f6f3ea;
    background: var(--pine);
}
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
    background: linear-gradient(to top, rgba(12, 24, 18, 0.82) 0%, rgba(12, 24, 18, 0.18) 52%, rgba(12, 24, 18, 0.35) 100%);
}
.hero-copy { position: relative; z-index: 1; padding: 72px 0 36px; }
.hero h1 { max-width: 14ch; }
.lead { font-size: 1.08rem; max-width: 44rem; }
.hero .lead { color: rgba(246, 243, 234, 0.9); }
.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
}
.hero .eyebrow { color: var(--gold-2); }

.section { padding: 76px 0; }
.section-tint { background: var(--paper-2); }
.section-dark { background: var(--pine); color: #f6f3ea; }
.section-head { max-width: 740px; margin-bottom: 28px; }
.prose p:last-child, .card p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.section-dark .muted { color: rgba(246, 243, 234, 0.75); }

.facts, .cards, .split, .footer-grid, .contact-grid, .two {
    display: grid;
    gap: 18px;
}
.facts { grid-template-columns: repeat(6, 1fr); }
.facts div {
    background: var(--white);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
}
.facts strong {
    display: block;
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 560;
}
.facts span { color: var(--muted); font-size: 13px; }

.cards { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--ink);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    min-height: 100%;
}
.card-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 16px 18px; display: grid; gap: 6px; align-content: start; }
.card h3 { font-size: 1.35rem; }
.card .price { color: var(--pine-2); font-weight: 700; }

.split { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
.split img, .frame img { width: 100%; height: 100%; object-fit: cover; }
.frame { margin: 0; border-radius: 20px; overflow: hidden; min-height: 280px; }
.frame img { min-height: 280px; }

.page-hero {
    position: relative;
    min-height: 380px;
    display: grid;
    align-items: end;
    color: #f6f3ea;
    background: var(--pine);
    overflow: hidden;
}
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 24, 18, 0.82), rgba(12, 24, 18, 0.15));
}
.page-hero .wrap { position: relative; z-index: 1; padding: 90px 0 36px; }
.crumbs { font-size: 14px; margin-bottom: 8px; opacity: 0.85; }
.crumbs a { text-decoration: none; }

.page { padding: 42px 0 72px; }
.page-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.side {
    position: sticky;
    top: 90px;
    background: var(--white);
    border-radius: 18px;
    padding: 18px;
    display: grid;
    gap: 10px;
}
.side a { font-weight: 700; }
.list { margin: 0 0 1em; padding-left: 1.15em; }
.list li { margin: 0.25em 0; }

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 8px 0 22px;
}
.gallery-item {
    padding: 0;
    border: 0;
    background: var(--paper-2);
    border-radius: 14px;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.table-wrap { overflow-x: auto; border-radius: 16px; background: var(--white); }
.sheet { width: 100%; border-collapse: collapse; min-width: 980px; font-size: 14px; }
.sheet th, .sheet td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sheet th { background: var(--pine); color: #f6f3ea; font-weight: 650; position: sticky; top: 0; }
.sheet tr.group td { background: var(--paper-2); font-weight: 750; }
.note { color: var(--muted); font-size: 14px; }

.hours { display: grid; gap: 8px; margin: 12px 0; }
.hours div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.hours dt { color: var(--muted); }
.hours dd { margin: 0; text-align: right; }

.faq { display: grid; gap: 8px; }
.faq details { background: var(--white); border-radius: 14px; padding: 14px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; }

.map-frame { width: 100%; min-height: 420px; border: 0; border-radius: 18px; background: var(--paper-2); }
.contact-grid { grid-template-columns: 0.85fr 1.15fr; }

.booking-page { padding: 28px 0 64px; }
.booking-page h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.search-band { padding: 8px 0 18px; }

.site-footer { background: #12261c; color: rgba(246, 243, 234, 0.84); padding: 46px 0 20px; }
.footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.1fr; margin-bottom: 26px; }
.footer-grid a, .footer-base a { display: block; color: inherit; text-decoration: none; margin: 0 0 6px; }
.footer-label { margin: 0 0 8px; letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; color: var(--gold-2); }
.footer-base {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(246, 243, 234, 0.12);
    padding-top: 16px;
    font-size: 14px;
}
.footer-base nav { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-base a { margin: 0; }

.cookie {
    position: fixed;
    z-index: 70;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(760px, calc(100% - 24px));
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--pine);
    color: #f6f3ea;
    border-radius: 16px;
    padding: 14px 16px;
}
.cookie p { margin: 0; font-size: 14px; }
.cookie a { color: var(--gold-2); }
.cookie button {
    border: 0;
    background: var(--gold);
    color: #1c241c;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    white-space: nowrap;
}
.cookie-ok .cookie { display: none; }

.lightbox { border: 0; padding: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(8, 14, 10, 0.86); }
.lightbox img { display: block; max-width: min(1100px, 92vw); max-height: 86vh; object-fit: contain; }
.lightbox-nav, .lightbox-close {
    border: 0;
    border-radius: 999px;
    background: #f6f3ea;
    color: var(--ink);
    cursor: pointer;
}
.lightbox-frame { position: relative; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    font-size: 28px;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-nav[hidden] { display: none; }
.lightbox-close { position: absolute; top: 8px; right: 8px; min-height: 36px; padding: 0 12px; }

#block-search, #block-search * { box-sizing: border-box; }
#block-search {
    position: relative;
    z-index: 2;
    background: rgba(18, 32, 24, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px;
    max-width: 980px;
    margin-top: 22px;
}
#block-search .tl-container { padding: 14px 18px 16px; }
#tl-booking-form { width: 100%; max-width: 1180px; margin: 8px auto 0; }
.x-tl-booking-widget-container,
.tl-widgets-container { display: none !important; }

.nav-ny > a {
    background: #8d1e28;
    color: #fff8ee;
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(243, 212, 138, 0.55);
}
.nav-ny > a[aria-current="page"] { color: #fff8ee; background: #a52832; }

.ny { padding: 22px 0 72px; }
.ny-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.ny-poster {
    width: min(1040px, calc(100% - 32px));
    margin: 8px auto 0;
    border-radius: 22px;
    box-shadow: 0 22px 50px rgba(90, 18, 22, 0.18);
}
.ny-body { width: min(820px, calc(100% - 40px)); margin: 36px auto 0; }
.ny-lead {
    font-family: var(--serif);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    line-height: 1.2;
    margin-bottom: 0.6em;
}
.ny-dates, .ny-split { display: grid; gap: 14px; }
.ny-dates { grid-template-columns: 1fr 1fr; margin: 28px 0; }
.ny-dates div, .ny-split section {
    background: var(--white);
    border-radius: 18px;
    padding: 18px 20px;
}
.ny-dates span {
    display: block;
    color: #8d1e28;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.ny-dates strong {
    display: block;
    margin: 6px 0 4px;
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 560;
}
.ny-dates p { margin: 0; color: var(--muted); }
.ny-split { grid-template-columns: 1.35fr 0.75fr; align-items: start; }
.ny-split h2 { font-size: 1.45rem; }
.ny-split ul { margin: 0; padding-left: 1.15em; }
.ny-split li { margin: 0.35em 0; }
.ny-phone { margin-top: 26px; text-align: center; }
.ny-phone a { font-weight: 700; }
.ny-book {
    display: block;
    width: min(560px, 100%);
    margin: 18px auto 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(90, 18, 22, 0.2);
    transition: transform 0.2s ease;
}
.ny-book:hover { transform: translateY(-2px); }
.ny-book img { width: 100%; height: auto; }

@media (max-width: 1100px) {
    .facts { grid-template-columns: repeat(3, 1fr); }
    .cards.four, .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1200px) {
    .nav-toggle { display: inline-flex; }
    .nav {
        display: none;
        position: absolute;
        top: var(--header);
        left: 0;
        right: 0;
        max-height: calc(100svh - var(--header));
        overflow: auto;
        background: var(--pine);
        padding: 8px 16px 18px;
        flex-direction: column;
        align-items: stretch;
    }
    body.nav-open .nav { display: flex; }
    .nav-sub { position: static; display: grid; box-shadow: none; background: transparent; padding: 0 0 8px 12px; min-width: 0; }
}
@media (max-width: 860px) {
    .topbar-inner { flex-wrap: wrap; padding: 6px 0; }
    .topbar .grow { margin-left: 0; }
    .facts, .cards, .cards.four, .split, .page-grid, .contact-grid, .footer-grid, .gallery, .two, .ny-dates, .ny-split {
        grid-template-columns: 1fr;
    }
    .side { position: static; }
    .footer-base { flex-direction: column; }
    .hero { min-height: auto; }
    .section { padding: 52px 0; }
}
@media (max-width: 520px) {
    .logo-name { font-size: 1.05rem; letter-spacing: 0.08em; }
    .logo-place { font-size: 9px; }
    .header-tools .btn-small { padding: 0 10px; }
    .cookie { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
