/* Header Styles */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header--scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

/* Логотип */
.header__logo {
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.header__logo:hover {
    opacity: 0.8;
}

.header__logo img {
    max-width: 140px;
    height: auto;
    display: block;
}

/* Навигация */
.header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2.5rem;
    align-items: center;
}

.header__menu-item {
    margin: 0;
}

.header__menu-link {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
    padding: 0.5rem 0;
    display: block;
}

.header__menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #1a1a1a;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.header__menu-link--active::after,
.header__menu-link:hover::after {
    transform: scaleX(1);
}

.header__menu-link:hover {
    color: #666;
}

/* Действия */
.header__actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #0f1620;
    background: var(--accent, #f0c36a);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 0.65rem 1.35rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-accent);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.header__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(240, 195, 106, 0.36);
}

.header__cta:focus-visible {
    outline: 2px solid rgba(126, 174, 255, 0.9);
    outline-offset: 2px;
}

/* Кнопка мобильного меню */
.header__menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 6px;
    overflow: visible;
    border-radius: var(--radius-md);
}

.header__menu-toggle-line {
    width: 24px;
    height: 2px;
    background: #1a1a1a;
    border-radius: 2px;
    transform-origin: center;
    transition: all 0.3s ease;
}

.header__menu-toggle--active .header__menu-toggle-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.header__menu-toggle--active .header__menu-toggle-line:nth-child(2) {
    opacity: 0;
}

.header__menu-toggle--active .header__menu-toggle-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Отступ для контента под фиксированным header */
body {
    padding-top: 80px;
}

/* Адаптивность */

/* Планшеты */
@media (max-width: 1024px) {
    .header__menu {
        gap: 1.5rem;
    }

    body {
        padding-top: 72px;
    }
}

/* Мобильные */
@media (max-width: 768px) {
    .header__inner {
        padding: 0.875rem 0;
    }

    .header__logo img {
        max-width: 120px;
    }

    .header__nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 2rem 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .header__nav--open {
        transform: translateX(0);
        height: 50vh;
    }

    .header__menu {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .header__menu-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .header__menu-link {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }

    .header__menu-link::after {
        display: none;
    }

    .header__cta {
        padding: 0.6rem 1rem;
        box-shadow: none;
    }

    .header__menu-toggle {
        display: flex;
    }

    body {
        padding-top: 72px;
    }
}

/* Модалка бронирования */
.reservation-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.reservation-modal[aria-hidden="false"] {
    display: flex;
}

.reservation-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 22, 32, 0.55);
    backdrop-filter: blur(6px);
}

.reservation-modal__dialog {
    position: relative;
    max-width: 520px;
    width: 100%;
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-card);
    z-index: 1;
    display: grid;
    gap: 18px;
}

.reservation-modal__header {
    display: grid;
    gap: 6px;
}

.reservation-modal__title {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.2;
    color: var(--text-primary, #111);
}

.reservation-modal__subtitle {
    margin: 0;
    color: var(--text-secondary, #5a6477);
}

.reservation-modal__form {
    display: grid;
    gap: 14px;
}

.reservation-modal__field {
    display: grid;
    gap: 8px;
}

.reservation-modal__label {
    font-weight: 600;
    color: var(--text-primary, #111);
}

.reservation-modal__field input,
.reservation-modal__field select {
    width: 100%;
    height: 46px;
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border, rgba(15, 22, 32, 0.12));
    padding: 0 12px;
    font-size: 1rem;
    color: var(--text-primary, #111);
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    appearance: none;
    -webkit-appearance: none;
}

.reservation-modal__field input:focus,
.reservation-modal__field select:focus {
    border-color: rgba(126, 174, 255, 0.8);
    box-shadow: var(--shadow-focus);
    outline: none;
}

.reservation-modal__field select {
    background: #fff url("data:image/svg+xml,%3Csvg width='20' height='12' viewBox='0 0 24 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4l8 8 8-8' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.reservation-modal__field input[type="date"] {
    background: #fff url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' ry='2' stroke='%23111' stroke-width='2'/%3E%3Cpath d='M3 9h18' stroke='%23111' stroke-width='2'/%3E%3Cpath d='M8 3v4M16 3v4' stroke='%23111' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.reservation-modal__counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--panel-border, rgba(15, 22, 32, 0.12));
    border-radius: var(--radius-md);
    padding: 6px 10px;
}

.reservation-modal__counter-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--muted-strong, rgba(15, 22, 32, 0.16));
    background: #f6f7fb;
    font-weight: 700;
    cursor: pointer;
}

.reservation-modal__counter-btn:focus-visible,
.reservation-modal__close:focus-visible {
    outline: 2px solid rgba(126, 174, 255, 0.9);
    outline-offset: 2px;
}

.reservation-modal__counter input {
    width: 56px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1rem;
    outline: none;
}

.reservation-modal__consent {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary, #4b5564);
    font-size: 0.95rem;
}

.reservation-modal__submit {
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent, #f0c36a);
    border: none;
    color: #0f1620;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-accent);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.reservation-modal__submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

.reservation-modal__status {
    margin: 0;
    min-height: 20px;
    color: var(--text-secondary, #4b5564);
    font-weight: 600;
}

.reservation-modal__status--success {
    color: #1a9b55;
}

.reservation-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border, rgba(15, 22, 32, 0.12));
    background: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.reservation-modal__close:hover {
    transform: rotate(90deg);
    background: #f6f7fb;
    box-shadow: var(--shadow-soft);
}

@media (max-width: 600px) {
    .reservation-modal__dialog {
        padding: 22px;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
    }

    .reservation-modal__counter input {
        width: 48px;
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .header__logo img {
        max-width: 100px;
    }

    .header__inner {
        padding: 0.75rem 0;
    }

    body {
        padding-top: 64px;
    }

    .header__nav {
        top: 64px;
    }
}

/* Анимация появления header */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header {
    animation: slideDown 0.4s ease-out;
}

/* Скрыть header при скролле вниз (опционально) */
.header--hidden {
    transform: translateY(-100%);
}

/* Overlay для мобильного меню */
.header__overlay {
    display: none;
}

@media (max-width: 768px) {
    .header__overlay {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 999;
    }

    .header__overlay--visible {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 480px) {
    .header__overlay {
        top: 64px;
    }
}
