/* ==================================================================================================
   📄 styles.css — оформление сайта «Речные котики»
   🎯 Стиль: Apple liquid glass — матовые полупрозрачные панели поверх видео-фона воды.
   💡 Принципы:
      - CSS-переменные в :root для централизованного управления;
      - стекло = background + backdrop-filter(blur+saturate) + тонкая рамка + мягкая тень;
      - светлый текст на тёмном стекле поверх видео + затемняющий скрим для контраста;
      - системный шрифт (SF Pro/-apple-system), сдержанные тени, без 3D-наклона и неона.
   🧩 Важно: имена классов сохранены под существующий HTML и JS (.tabs/.tabs.hide,
      #imageOverlay, .products-table/.bought/.products-table__total, .day-card img, .tab-wrap).
================================================================================================== */

:root {
    /* 🎨 Цвета / текст */
    --color-bg-fallback: #0a2233;               /* фон под видео, пока оно грузится */
    --text: #f3f7fa;
    --text-muted: #c9d6df;

    /* 🧱 Стекло */
    --glass: rgba(255, 255, 255, 0.12);
    --glass-strong: rgba(255, 255, 255, 0.22);
    --glass-input: rgba(255, 255, 255, 0.10);
    --hairline: rgba(255, 255, 255, 0.24);
    --blur-surface: blur(22px) saturate(150%);
    --blur-tab: blur(18px) saturate(150%);

    /* 🌟 Акцент / состояния */
    --accent: linear-gradient(120deg, #7fe3ff, #67a9ff);
    --accent-solid: #7fe3ff;
    --bought-bg: rgba(95, 230, 150, 0.14);
    --bought-text: #c6f7d8;

    /* 🌑 Тени */
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.32);
    --shadow-card-hover: 0 16px 50px rgba(0, 0, 0, 0.40);
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.28);

    /* 📏 Радиусы / отступы / анимации */
    --radius-card: 22px;
    --radius-button: 14px;
    --transition-default: 0.25s ease;

    /* 🖋️ Шрифты */
    --font-base: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-text: 1.05rem;
    --font-size-heading: 2.4rem;
    --font-size-heading-reciept: 1.8rem;
    --font-size-table: 1rem;
    --font-size-button: 1rem;
    --font-size-tab: 1rem;

    /* 📐 Пространство */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
}

/* 🛠️ Сброс */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    font-family: var(--font-base);
    color: var(--text);
    background-color: var(--color-bg-fallback);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    overflow-x: hidden;
}

/* 🎬 ВИДЕО-ФОН + ЗАТЕМНЯЮЩИЙ СКРИМ
   Видео фиксировано на весь экран позади контента. Скрим гасит яркую воду,
   чтобы светлый текст читался. Играет на всех устройствах (muted + playsinline). */
.bg-video, .bg-scrim {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}
.bg-video { object-fit: cover; }
.bg-scrim {
    z-index: -1;
    background: linear-gradient(160deg, rgba(6, 22, 34, 0.55), rgba(6, 26, 40, 0.70));
}

/* 🔗 Ссылки */
a { outline: none; text-decoration: none; color: inherit; }

/* 🏷️ Заголовки */
h1 {
    font-size: var(--font-size-heading);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

#welcome-page { text-align: center; }

/* 📦 Контейнер контента */
.container {
    flex-grow: 1;
    max-width: 960px;
    width: 100%;
    padding: var(--space-lg);
    text-align: center;
}

/* ==================================================================================================
   🧱 СТЕКЛЯННЫЕ ПАНЕЛИ
================================================================================================== */
.day-card,
.meal-card,
.products-table,
.site-nav,
.auth-form-container,
footer.footer {
    background-color: var(--glass);
    -webkit-backdrop-filter: var(--blur-surface);
    backdrop-filter: var(--blur-surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* Лёгкий подъём при наведении (без 3D-наклона) */
.day-card,
.meal-card {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    cursor: pointer;
    text-align: center;
    transition: transform var(--transition-default), box-shadow var(--transition-default);
}
.day-card:hover,
.meal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* 🖼️ Изображения в карточках */
.day-card img,
.meal-card img,
.container > img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-button);
    margin-bottom: var(--space-xs);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.30);
    transition: transform var(--transition-default), box-shadow var(--transition-default);
}
.day-card img:hover,
.meal-card img:hover,
.container > img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
}

/* 📝 Текст карточек */
.day-card h1, .day-card h2,
.meal-card h1, .meal-card h2 {
    font-size: 1.2rem;
    line-height: 1.5;
    word-wrap: break-word;
}
.day-card strong,
.meal-card strong { font-weight: 600; }

/* 🔍 Полноэкранный просмотр изображений (#imageOverlay управляется main.js) */
#imageOverlay {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    touch-action: manipulation;
}
#imageOverlay.show { opacity: 1; visibility: visible; }
#imageOverlay img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#imageOverlay.show img { opacity: 1; transform: scale(1); }

/* 📄 Рецепт блюда (авто-форматирование из простого текста админки) */
.meal-hero { margin-bottom: var(--space-md); }
.meal-hero .plate-title { font-size: 2.1rem; }

.recipe { text-align: left; }
.recipe > h2 {
    font-size: var(--font-size-heading-reciept);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}
/* Подзаголовок раздела рецепта («Ингредиенты», «Приготовление») */
.recipe-heading {
    margin: 18px 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-solid);
}
.recipe-heading:first-child { margin-top: 0; }
.recipe-text {
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0 0 12px;
}
.recipe-steps, .recipe-list {
    margin: 0 0 12px;
    padding-left: 1.4em;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.recipe-steps li, .recipe-list li {
    font-size: 1.15rem;
    line-height: 1.55;
}
.recipe-steps li::marker { color: var(--accent-solid); font-weight: 700; }
.recipe-list li::marker { color: var(--accent-solid); }

/* ==================================================================================================
   🖼️ ИСТОРИЯ ПОХОДОВ: сетка карточек, карусель медиа, лайтбокс, прогресс загрузки
================================================================================================== */
/* Сетка карточек походов (история) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: var(--space-md);
}
.grid .day-card { margin-bottom: 0; }

/* Карусель: горизонтальный скролл со снапом; соседние элементы подглядывают по бокам */
.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 10px 10%;             /* поля по бокам -> крайние центрируются, соседние видно */
    margin-top: var(--space-md);
    scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-item {
    flex: 0 0 80%;
    scroll-snap-align: center;
    padding: 0 8px;
    opacity: 0.4;                  /* соседние полупрозрачные */
    transform: scale(0.92);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.carousel-item.is-active { opacity: 1; transform: scale(1); }

.media-frame {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-card);
    background: #000;
}
.media-frame img,
.media-frame video {
    width: 100%;
    height: 62vh;
    object-fit: contain;
    display: block;
    background: #000;
}
.media-missing { padding: 40px 16px; text-align: center; color: var(--text-muted); }

/* Круглые кнопки поверх медиа: раскрыть / удалить */
.media-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid var(--hairline);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.media-expand { position: absolute; top: 10px; right: 10px; }
.media-del { position: absolute; top: 10px; left: 10px; margin: 0; }
.media-move { position: absolute; bottom: 10px; margin: 0; }
.media-move-left { left: 10px; }
.media-move-right { right: 10px; }

/* Карточка похода с обложкой (первое медиа) */
.trip-card { padding: 0; overflow: hidden; display: block; text-decoration: none; }
.trip-cover { width: 100%; height: 170px; background: rgba(0, 0, 0, 0.3); }
.trip-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-cover-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.trip-card h2 { padding: 0 14px; margin-top: 12px; }
.trip-card .sub { padding: 0 14px 14px; }

/* Даты похода — крупнее обычного текста, но мельче названия */
.trip-dates { font-size: 1.4rem; font-weight: 600; color: var(--text); margin-bottom: 10px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); }
.trip-card .trip-dates { padding: 0 14px 14px; margin-bottom: 0; font-size: 1.15rem; }

/* Кнопка выбора файлов (label в стиле .btn) + статус под ней отдельной строкой */
.file-label { display: inline-block; margin: 4px auto; }
#fileChosen { display: block; margin-top: 8px; text-align: center; }

/* ==================================================================================================
   🏠 ГЛАВНАЯ: бенто-плашки (CMS)
================================================================================================== */
.home { display: flex; flex-direction: column; gap: 16px; }
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.home-plate {
    position: relative; border-radius: 20px; overflow: hidden;
    min-height: 220px; display: flex;
    border: 1px solid var(--hairline); box-shadow: var(--shadow-card); background: #0a2233;
}
.plate-wide { grid-column: 1 / -1; min-height: 280px; }
.plate-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plate-overlay {
    position: relative; z-index: 1; width: 100%; align-self: flex-end; padding: 22px; color: #fff; text-align: left;
    background: linear-gradient(to top, rgba(3, 18, 28, 0.88), rgba(3, 18, 28, 0.2) 60%, transparent);
}
.plate-tag { display: inline-block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--accent-solid); margin-bottom: 6px; }
.plate-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 4px; }
.plate-dates { font-size: 1.2rem; font-weight: 600; margin: 0 0 8px; }
.plate-sub { color: #dde8ef; margin: 0; }
.plate-info { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; color: #dde8ef; }
/* Плашка-ссылка (списки дней/блюд/походов): тот же вид, что у новостей, + подъём при наведении. */
.plate-link { text-decoration: none; color: inherit; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.plate-link:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); }
.plate-link .plate-bg { transition: transform 0.4s ease; }
.plate-link:hover .plate-bg { transform: scale(1.05); }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .home-plate { min-height: 200px; } .plate-title { font-size: 1.4rem; } }

/* Honeypot-поле формы участия — скрыто от людей, ловит ботов */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Список участников ближайшего похода */
.participants-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.participants-list li { padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: rgba(255, 255, 255, 0.08); }

/* Управление фоном плашек */
.manage-preview { margin: 10px 0; }
.manage-preview img, .manage-preview video { max-width: 100%; max-height: 200px; border-radius: 12px; }

/* Навигация карусели */
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; }
.carousel-arrow {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--glass); border: 1px solid var(--hairline); color: var(--text);
    font-size: 1.6rem; line-height: 1; cursor: pointer;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.carousel-arrow:hover { background: var(--glass-strong); }
.carousel-counter { color: var(--text-muted); min-width: 70px; text-align: center; }

/* Полоса прогресса загрузки */
.progress { height: 12px; background: rgba(255, 255, 255, 0.18); border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s ease; }
.upload-warn { color: #ffd479; font-weight: 600; }

/* Лайтбокс / просмотр на весь экран */
.lightbox {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0, 0, 0, 0.96);
    display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-content { max-width: 100vw; max-height: 100vh; display: flex; align-items: center; justify-content: center; }
.lightbox-content img,
.lightbox-content video { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox-close {
    position: fixed; top: 16px; right: 16px; z-index: 10001;
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.6); border: 1px solid var(--hairline); color: #fff;
    font-size: 1.3rem; cursor: pointer;
}
.lightbox-arrow {
    position: fixed; top: 50%; transform: translateY(-50%); z-index: 10001;
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.5); border: 1px solid var(--hairline); color: #fff;
    font-size: 2rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* Комментарии под медиа */
.comments { padding: 12px 6px 4px; text-align: left; }
.comments-list { max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.comments-loading { text-align: center; }
.comment { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--hairline); border-radius: 12px; padding: 8px 12px; }
.comment-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 3px; }
.comment-author { font-weight: 600; color: var(--text); }
.comment-text { white-space: pre-wrap; word-break: break-word; }
.comment-system { background: rgba(127, 227, 255, 0.12); border-color: rgba(127, 227, 255, 0.4); text-align: center; font-style: italic; color: var(--text-muted); }
.comment-actions { display: flex; gap: 12px; margin-top: 6px; }
.comment-actions button { background: none; border: none; color: var(--accent-solid); font-size: 0.8rem; cursor: pointer; padding: 0; }
.emoji-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.emoji-btn { background: none; border: none; font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 2px; }
.comment-row { display: flex; gap: 8px; align-items: flex-end; }
.comment-input { flex: 1; resize: none; padding: 10px 12px; border-radius: 12px; background: var(--glass-input); border: 1px solid var(--hairline); color: var(--text); font-size: 0.95rem; font-family: inherit; }
.comment-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.comment-send { flex: 0 0 auto; width: 44px; height: 44px; }
.comment-reply-item { margin-left: 22px; border-left: 2px solid var(--hairline); }
.reply-indicator { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.reply-indicator .reply-cancel { background: none; border: none; color: var(--accent-solid); cursor: pointer; padding: 0 4px; }

@media (max-width: 480px) {
    .carousel { padding: 10px 7%; }
    .carousel-item { flex: 0 0 86%; }
    .media-frame img, .media-frame video { height: 50vh; }
}

/* ==================================================================================================
   📊 ТАБЛИЦА ПРОДУКТОВ
================================================================================================== */
.products-table {
    width: 100%;
    margin-top: var(--space-lg);
    border-collapse: collapse;
}
.products-table th,
.products-table td {
    padding: 12px 14px;
    text-align: left;
    font-size: var(--font-size-table);
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.products-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}
.products-table th:first-child,
.products-table td:first-child {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}
.products-table td img {
    height: 46px;
    width: 46px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    vertical-align: middle;
    display: inline-block;
}
.products-table__total td {
    background-color: rgba(255, 255, 255, 0.06);
    font-weight: 700;
    border-top: 2px solid var(--hairline);
}
.products-table tbody tr {
    transition: background-color 0.4s ease, transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backface-visibility: hidden;
}
.products-table tbody tr:hover:not(.products-table__total) { transform: translateY(-2px); }

/* ✅ Купленные продукты */
.bought { background-color: var(--bought-bg); }

/* Статус для участника (read-only): пилюля без кнопки */
.status-readonly {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}
.bought .status-readonly { background-color: var(--bought-bg); color: var(--bought-text); }

/* ==================================================================================================
   🎯 КНОПКИ
================================================================================================== */
.btn,
.products-table button,
.auth-form button[type="submit"],
.oauth-btn {
    display: inline-block;
    padding: 12px 22px;
    background-color: var(--glass);
    color: var(--text);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-button);
    font-size: var(--font-size-button);
    font-weight: 600;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background-color var(--transition-default), transform 0.1s ease, box-shadow 0.2s ease;
}
.btn:hover,
.products-table button:hover,
.auth-form button[type="submit"]:hover,
.oauth-btn:hover {
    background-color: var(--glass-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}
.btn:active,
.products-table button:active,
.auth-form button[type="submit"]:active,
.oauth-btn:active { transform: translateY(0); }

/* Акцентная кнопка (основное действие) */
.btn-accent,
.auth-form button[type="submit"] {
    background: var(--accent);
    color: #06283b;
    border: none;
}
.btn-accent:hover,
.auth-form button[type="submit"]:hover { filter: brightness(1.05); }

.btn { margin: var(--space-sm); }
.products-table button { font-weight: 600; }

/* ==================================================================================================
   🔐 ФОРМА АВТОРИЗАЦИИ + OAuth
================================================================================================== */
.auth-form-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 400px;
    margin: var(--space-lg) auto;
    padding: var(--space-lg);
}
.auth-form-title {
    font-size: var(--font-size-heading);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    text-align: center;
}
.auth-form { display: flex; flex-direction: column; gap: var(--space-sm); }
.auth-form input {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-button);
    background-color: var(--glass-input);
    color: var(--text);
    border: 1px solid var(--hairline);
    font-size: var(--font-size-text);
    transition: background-color var(--transition-default), border-color 0.2s ease;
}
.auth-form input::placeholder { color: rgba(255, 255, 255, 0.65); }
.auth-form input:focus {
    background-color: var(--glass-strong);
    border-color: rgba(127, 227, 255, 0.85);
    outline: none;
}
.auth-form .flash-message,
.flash-message {
    color: #ff9b9b;
    font-size: var(--font-size-text);
    margin-bottom: var(--space-xs);
    text-align: center;
}
.flash-message.success { color: #8ee6a0; }

/* Личный кабинет */
.account-section { text-align: left; margin-bottom: var(--space-md); }
.account-section h2 { margin-bottom: 10px; }
.account-section .auth-form { max-width: 420px; }

/* Бейдж непрочитанных уведомлений */
.nav-badge {
    display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 6px;
    border-radius: 9px; background: #ff5b5b; color: #fff;
    font-size: 0.75rem; font-weight: 700; text-align: center; vertical-align: middle;
}

/* Список уведомлений в кабинете */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 10px 14px; border: 1px solid var(--hairline); border-radius: 12px;
    background: rgba(127, 227, 255, 0.10); color: var(--text);
}
.notif-item:hover { background: rgba(127, 227, 255, 0.18); }
.notif-go { color: var(--accent-solid); white-space: nowrap; font-size: 0.85rem; }

.oauth-section { margin-top: var(--space-md); text-align: center; color: var(--text-muted); }
.oauth-buttons { display: flex; justify-content: center; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-xs); }
.oauth-btn { display: inline-flex; align-items: center; }
.oauth-logo { width: 20px; height: 20px; margin-right: var(--space-xs); object-fit: contain; }

/* ==================================================================================================
   🦶 ФУТЕР
================================================================================================== */
footer.footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    margin-top: var(--space-lg);
    gap: var(--space-md);
}
.logo img { max-width: 56px; height: auto; border-radius: 10px; }
.contact-info { text-align: center; }
.contact-info h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.2rem; }
.contact-info h4 { font-size: 0.8rem; margin-top: 0.4rem; color: var(--text-muted); }
.email-link {
    color: var(--text);
    font-size: 1.05rem;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}
.email-link:hover { opacity: 0.8; }
.gradient-text {
    font-size: 1.1rem;
    background: var(--accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==================================================================================================
   🧩 НАВИГАЦИЯ
   Десктоп: горизонтальная строка вкладок (.site-nav — стеклянная панель).
   Мобильные: кнопка-гамбургер (.nav-toggle) разворачивает выпадающее меню (.tabs.open).
   (.site-nav.hide — скрытие при скролле, управляется main.js)
================================================================================================== */
.site-nav {
    position: sticky;
    top: 14px;
    z-index: 1000;
    margin: 0 0 var(--space-md);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
    /* overflow:visible — чтобы выпадающее меню (ниже панели) не обрезалось. */
    overflow: visible;
}
.site-nav.hide { transform: translateY(-120%); }

/* Гамбургер — на ВСЕХ устройствах */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex: 0 0 auto;
    background: transparent;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Бегущая строка новостей (неоновый белый шрифт с окантовкой) */
.marquee { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.marquee-track {
    display: inline-block;
    white-space: nowrap;
    /* Лента продублирована в разметке -> сдвиг на -50% даёт бесшовную прокрутку справа налево. */
    animation: marquee 32s linear infinite;
}
.site-nav:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 0 4px #fff, 0 0 9px rgba(127, 227, 255, 0.85), 0 0 16px rgba(127, 227, 255, 0.6);
    -webkit-text-stroke: 0.4px rgba(255, 255, 255, 0.9);
}
.marquee-item::before {
    content: "•"; margin: 0 22px; color: var(--accent-solid);
    -webkit-text-stroke: 0; text-shadow: none;
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Меню — всегда выпадающий список (по тапу на гамбургер), пункты как акцентные кнопки */
.tabs {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    margin: 0;
    list-style: none;
    background-color: rgba(8, 30, 45, 0.94);
    -webkit-backdrop-filter: var(--blur-surface);
    backdrop-filter: var(--blur-surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    z-index: 1001;
}
.tabs.open { display: flex; }
.tabs li { list-style: none; }
.tabs a,
.tabs .logout-form button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-button);
    background: var(--accent);
    color: #06283b;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    cursor: pointer;
    transition: filter 0.2s ease;
}
.tabs a:hover,
.tabs .logout-form button:hover { filter: brightness(1.05); }
.tabs a.active { box-shadow: inset 0 0 0 2px rgba(6, 40, 59, 0.5); }
.tabs .logout-form { margin: 0; }
.tab-wrap { white-space: normal; }

/* ==================================================================================================
   ♿ Уменьшенное движение: вместо видео — статичный постер (его подставляет шаблон)
================================================================================================== */
@media (prefers-reduced-motion: reduce) {
    .bg-video { display: none; }
    .marquee-track { animation: none; }
}

/* ==================================================================================================
   📱 АДАПТИВНОСТЬ
================================================================================================== */
@media only screen and (max-width: 768px) {
    h1 { font-size: 2rem; }
    .container { padding: var(--space-md); }

    /* Таблица компактнее, кнопка уже не вылезает за экран */
    .products-table th, .products-table td { font-size: 0.9rem; padding: 0.5rem 0.4rem; }
    .products-table td img { height: 42px; width: 42px; }
    .products-table button { padding: 8px 12px; font-size: 0.85rem; }
    .logo img { max-width: 44px; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .container { padding: var(--space-sm); }
    .day-card, .meal-card { padding: var(--space-sm); }
    .products-table th, .products-table td { font-size: 0.82rem; padding: 0.4rem 0.3rem; }
    .products-table td img { height: 36px; width: 36px; }
    .products-table button { padding: 7px 10px; font-size: 0.8rem; }
    .recipe-text, .recipe-steps li, .recipe-list li { font-size: 1.05rem; }
    .meal-hero .plate-title { font-size: 1.7rem; }
    .auth-form-container { padding: var(--space-md); }
}
