/* ===== Custom Properties ===== */
:root {
    --color-primary: #8B6F47;
    --color-primary-dark: #6B5535;
    --color-primary-light: #D4A574;
    --color-cream: #FAF6F1;
    --color-beige: #F0E8DD;
    --color-dark: #2C2420;
    --color-text: #4A4039;
    --color-text-light: #8A7D74;
    --color-white: #FFFFFF;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    --header-height: 72px;
    --container-width: 1140px;
    --transition: 0.3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }

/* ===== Container ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition);
}
.header--scrolled {
    background: rgba(255,255,255,0.97);
    box-shadow: 0 1px 12px rgba(0,0,0,0.08);
}
.header--scrolled .header__link,
.header--scrolled .header__logo,
.header--scrolled .header__phone {
    color: var(--color-dark);
}
.header--scrolled .header__burger span {
    background: var(--color-dark);
}
.header__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.04em;
}
.header__nav {
    display: flex;
    gap: 18px;
}
.header__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: opacity var(--transition);
    position: relative;
}
.header__link:hover,
.header__link--active {
    opacity: 0.75;
}
.header__link--active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: currentColor;
}
.header__phone {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-white);
    letter-spacing: 0.02em;
}
.header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
}
.header__burger span {
    display: block;
    height: 2px;
    background: var(--color-white);
    border-radius: 1px;
    transition: transform var(--transition), opacity var(--transition);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: url('/static/img/hero_summer.jpg') center/cover no-repeat;
    color: var(--color-white);
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.4) 100%);
}
.hero__content {
    position: relative;
    text-align: center;
    padding: 0 20px;
}
.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}
.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    margin-bottom: 32px;
    opacity: 0.9;
    letter-spacing: 0.04em;
}
.hero__cta {
    display: inline-block;
    padding: 14px 40px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 2px;
    transition: background var(--transition);
}
.hero__cta:hover { background: var(--color-primary-dark); }

.hero .btn--outline {
    border-color: var(--color-white);
    color: var(--color-white);
}
.hero .btn--outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

/* ===== Booking Bar ===== */
.hero__booking-bar {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
}
.booking-bar {
    display: flex;
    gap: 1px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    border-radius: 4px;
    overflow: hidden;
}
.booking-bar__field {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255,255,255,0.12);
}
.booking-bar__field label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
    margin-bottom: 4px;
    color: var(--color-white);
}
.booking-bar__field input,
.booking-bar__field select {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 1rem;
    outline: none;
}
.booking-bar__field input::-webkit-calendar-picker-indicator { filter: invert(1); }
.booking-bar__field select option { color: var(--color-dark); }
.booking-bar__submit {
    padding: 14px 28px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    transition: background var(--transition);
}
.booking-bar__submit:hover { background: var(--color-primary-dark); }

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}
.section--beige {
    background: var(--color-beige);
}
.section__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 20px;
}
.section__text {
    max-width: 640px;
    margin: 0 auto 32px;
    text-align: center;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* ===== Page Header (sub-pages) ===== */
.page-header {
    padding: calc(var(--header-height) + 40px) 0 40px;
    text-align: center;
    background: var(--color-cream);
}
.page-header__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-dark);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 2px;
    transition: all var(--transition);
}
.btn--outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}
.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ===== Buttons (extensions) ===== */
.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
}
.btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}
.btn--sm {
    padding: 8px 20px;
    font-size: 0.8rem;
}

/* ===== About Teaser ===== */
.about-teaser {
    text-align: center;
}

/* ===== Telegram ===== */
.telegram-embed {
    max-width: 540px;
    margin: 0 auto;
}

/* ===== Room Cards ===== */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 40px;
}
.room-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: transform var(--transition), box-shadow var(--transition);
}
.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.room-card__image {
    height: 240px;
    overflow: hidden;
    background: var(--color-beige);
    position: relative;
}
.room-card__image--gallery {
    cursor: pointer;
}
.room-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.room-card__photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 3px;
    pointer-events: none;
}
.room-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px;
}
.room-card__name {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    color: var(--color-dark);
    margin-bottom: 10px;
}
.room-card__description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}
.room-card__meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.room-card__detail {
    font-size: 0.8rem;
    color: var(--color-text-light);
    padding: 4px 10px;
    background: var(--color-cream);
    border-radius: 2px;
}
.room-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-beige);
}
.room-card__price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 600;
}
.room-card__price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-light);
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.gallery-grid__item {
    border-radius: 4px;
    overflow: hidden;
    background: var(--color-beige);
    aspect-ratio: 4/3;
}
.gallery-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.gallery-grid__item:hover img {
    transform: scale(1.05);
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.lightbox.lightbox--open {
    opacity: 1;
    visibility: visible;
}
.lightbox__content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}
.lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    z-index: 1001;
}
.lightbox__close:hover {
    opacity: 1;
}
.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    padding: 8px 16px;
    line-height: 1;
    border-radius: 4px;
    opacity: 0.8;
    z-index: 1001;
}
.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}
.lightbox__nav--prev {
    left: 16px;
}
.lightbox__nav--next {
    right: 16px;
}
.lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* ===== Booking Form ===== */
.booking-page {
    max-width: 860px;
    margin: 0 auto;
}
.booking-page__heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--color-dark);
    margin-bottom: 12px;
    text-align: center;
}
.booking-page__text {
    color: var(--color-text-light);
    margin-bottom: 32px;
    line-height: 1.7;
    text-align: center;
}
.booking-page__text a {
    color: var(--color-primary);
    font-weight: 500;
}

/* ===== Booking Channels ===== */
.booking-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}
.booking-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    border: 1px solid var(--color-beige);
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.booking-channel:hover {
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.booking-channel__icon {
    font-size: 2rem;
    margin-bottom: 12px;
}
.booking-channel__name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 8px;
}
.booking-channel__desc {
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
}

.booking-form__row {
    margin-bottom: 20px;
}
.booking-form__row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.booking-form__row--thirds {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}
.booking-form__group {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}
.booking-form__label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.booking-form__input {
    padding: 12px 14px;
    border: 1px solid #d9d0c7;
    border-radius: 2px;
    background: var(--color-white);
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color var(--transition);
}
.booking-form__input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.booking-form__textarea {
    resize: vertical;
    min-height: 90px;
}
.booking-form__error {
    font-size: 0.8rem;
    color: #c0392b;
    margin-top: 4px;
}

/* ===== Flash Messages ===== */
.flash {
    padding: 14px 18px;
    border-radius: 2px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}
.flash--success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}
.flash--error {
    background: #fdedec;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

/* ===== Login ===== */
.login-wrap {
    max-width: 400px;
    margin: 0 auto;
}
.login-form .booking-form__group {
    margin-bottom: 16px;
}

/* ===== About Content ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-content__heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--color-dark);
    margin-bottom: 20px;
}
.about-content__text p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}
.about-content__image {
    border-radius: 4px;
    overflow: hidden;
    background: var(--color-beige);
    aspect-ratio: 4/3;
}
.about-content__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Features Grid ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 40px;
}
.feature {
    text-align: center;
}
.feature__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}
.feature__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--color-dark);
    margin-bottom: 8px;
}
.feature__text {
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.6;
}
.feature__gallery-btn {
    margin-top: 12px;
}

/* ===== Contacts ===== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}
.contacts-info__heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-dark);
    margin-bottom: 24px;
}
.contacts-info__item {
    margin-bottom: 16px;
}
.contacts-info__item strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
    margin-bottom: 4px;
}
.contacts-info__item p {
    font-size: 1rem;
    color: var(--color-dark);
}
.contacts-info__item a {
    color: var(--color-primary);
}
.contacts-info__socials {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.contacts-info__social {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--color-primary);
    border-radius: 2px;
    color: var(--color-primary);
    transition: all var(--transition);
}
.contacts-info__social:hover {
    background: var(--color-primary);
    color: var(--color-white);
}
.contacts-map {
    border-radius: 4px;
    overflow: hidden;
}
.contacts-map iframe {
    display: block;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}
.footer__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}
.footer__heading {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--color-white);
    margin-bottom: 16px;
}
.footer__text {
    font-size: 0.875rem;
    line-height: 1.6;
}
.footer__link {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 8px;
    transition: color var(--transition);
}
.footer__link:hover { color: var(--color-primary-light); }
.footer__bottom {
    margin-top: 48px;
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 0; right: -100%;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        background: var(--color-dark);
        padding: 80px 32px 32px;
        gap: 20px;
        transition: right var(--transition);
    }
    .header__nav--open {
        right: 0;
    }
    .header__nav .header__link {
        color: var(--color-white);
        font-size: 1rem;
    }
    .header__phone { display: none; }
    .header__burger { display: flex; }
    .header__burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .header__burger--open span:nth-child(2) { opacity: 0; }
    .header__burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .booking-bar {
        flex-direction: column;
    }
    .hero__booking-bar {
        bottom: 20px;
        width: 92%;
    }

    .footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .rooms-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .booking-form__row--half,
    .booking-form__row--thirds {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ===== Error Pages ===== */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.error-page__inner {
    max-width: 480px;
}

.error-page__code {
    font-family: var(--font-heading);
    font-size: 120px;
    line-height: 1;
    color: var(--color-primary-light);
    margin-bottom: 16px;
}

.error-page__title {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--color-dark);
    margin-bottom: 12px;
}

.error-page__text {
    color: var(--color-text-light);
    margin-bottom: 32px;
}
