body {
    margin: 0;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #f8f6f2;
    color: #2d4c3b;
    overflow-x: hidden;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.main-header {
    background: #fff;
    border-bottom: 2px solid #e5e5e5;
    box-shadow: 0 2px 8px #f0e9d6;
}
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}
.logo {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #2d4c3b;
    text-decoration: none;
    gap: 12px;
}
.logo img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}
.main-nav {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav a {
    color: #2d4c3b;
    text-decoration: none;
    font-size: 1.1em;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
}
.main-nav a.active, .main-nav a:hover {
    background: #e6a04e;
    color: #fff;
}
.header-actions button {
    background: #e6a04e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.header-actions button:hover {
    background: #d2691e;
}
.banner {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
    margin-bottom: 32px;
}
.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}
.banner-text {
    position: absolute;
    left: 40px;
    bottom: 40px;
    color: #fff;
    z-index: 2;
}
.banner-text h1 {
    font-size: 2.5em;
    margin: 0 0 10px 0;
}
.banner-text p {
    font-size: 1.2em;
    margin: 0;
}
.categories, .recipes {
    margin-bottom: 40px;
}
.category-list, .recipe-list {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.category-card, .recipe-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px #e0d8c0;
    overflow: hidden;
    width: 220px;
    text-align: center;
    transition: transform 0.2s;
    cursor: pointer;
}
.category-card:hover, .recipe-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 6px 24px #e0d8c0;
}
.category-card img, .recipe-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.category-card span, .category-card {
    color: #222 !important;
}
.recipe-card h3 {
    margin: 12px 0 4px 0;
    font-size: 1.15em;
}
.recipe-card p {
    margin: 0 0 12px 0;
    color: #888;
    font-size: 0.98em;
}
.recipe-card a {
    color: #222 !important;
    text-decoration: underline;
}
footer {
    background: #2d4c3b;
    color: #fff;
    padding: 32px 0;
    margin-top: 40px;
}
.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}
footer a {
    color: #e6a04e;
    text-decoration: underline;
}
footer a:hover {
    color: #fff;
}
@media (max-width: 900px) {
    .category-list, .recipe-list { flex-direction: column; align-items: center; }
    .banner-text { left: 10px; bottom: 10px; }
    .footer-flex { flex-direction: column; gap: 16px; }
}
@media (max-width: 600px) {
    .category-list {
        gap: 15px;
    }
    
    .category-card {
        width: 160px;
    }
    
    .category-card img {
        height: 120px;
    }
    
    .category-card span {
        font-size: 1.1em;
        padding: 12px;
    }
    .sidebar { display: none; }
}

/* --- Выпадающее меню контактов --- */
.contacts-menu {
    display: none;
    position: absolute;
    bottom: 40px;
    right: 0;
    background: #fffbe9;
    color: #2d4c3b;
    border: 1.5px solid #d2691e;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(210,105,30,0.12);
    padding: 18px 28px 14px 18px;
    min-width: 220px;
    z-index: 100;
    font-size: 1em;
    animation: fadeIn 0.2s;
}
.contacts-menu a {
    color: #d2691e;
    text-decoration: underline;
    margin: 0 4px;
}
.contacts-menu a:hover {
    color: #2d4c3b;
}
.footer-right { position: relative; }
.contacts-menu.show { display: block; }

/* --- Горизонтальный сайдбар под баннером --- */
.horizontal-sidebar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: #fff;
    border-bottom: 2px solid #e5e5e5;
    box-shadow: 0 2px 8px #f0e9d6;
    margin-bottom: 24px;
    margin-top: 0;
    padding: 0;
}
.horizontal-sidebar .sidebar-section {
    flex: 1;
    text-align: center;
    border-left: none;
    border-bottom: 5px solid transparent;
    border-radius: 0;
    padding: 18px 0;
    font-size: 1.15em;
    color: #2d4c3b;
    background: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    cursor: pointer;
}
.horizontal-sidebar .sidebar-section.active, .horizontal-sidebar .sidebar-section:hover {
    background: #e6a04e;
    color: #fff;
    border-bottom: 5px solid #d2691e;
}
/* Скрыть вертикальный сайдбар */
.sidebar:not(.horizontal-sidebar) {
    display: block;
}

/* --- Кнопки и иконка пользователя --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
#userIcon {
    font-size: 2em;
    vertical-align: middle;
    margin-left: 10px;
    cursor: pointer;
    color: #2d4c3b;
}

/* --- Модальное окно регистрации --- */
#modal-bg {
    animation: fadeIn 0.2s;
}
#modal-bg form input {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 10px;
    font-size: 1em;
    background: #fafafa;
}
#modal-bg form button {
    background: #e6a04e;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 0;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 5px;
}
#modal-bg form button:hover {
    background: #d2691e;
}
#closeModal {
    background: transparent !important;
    border: none !important;
    font-size: 1.2em;
    color: #888;
    cursor: pointer;
    padding: 0;
}
#closeModal:hover {
    color: #e6a04e;
}

/* --- Левый сайдбар --- */
.page-flex {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: flex-start;
}
.sidebar {
    flex: 0 0 250px;
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    height: fit-content;
    display: block;
    z-index: 10;
}
.sidebar-section {
    margin-bottom: 25px;
}
.sidebar-section h3 {
    color: #e6a04e;
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0e9d6;
    padding-bottom: 10px;
}
.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-section li {
    margin-bottom: 10px;
}
.sidebar-section a {
    color: #2d4c3b;
    text-decoration: none;
    font-size: 1.1em;
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}
.sidebar-section a.active,
.sidebar-section a:hover {
    background: #f0e9d6;
    color: #e6a04e;
    transform: translateX(5px);
}
.main-content-flex {
    flex: 1;
    min-width: 0;
}
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    margin-bottom: 20px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
.comments-section {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.comment-form textarea, .comment-form input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1em;
}
.comment-form button {
    background: #e6a04e;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background 0.2s;
}
.comment-form button:hover {
    background: #d2691e;
}
.comments-list {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
.comment-item {
    background: #f8f6f2;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}
.comment-item p {
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.5;
}
.comment-item span {
    font-size: 0.85em;
    color: #888;
    display: block;
    text-align: right;
}
@media (max-width: 900px) {
    .page-flex {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .sidebar {
        width: 90%;
        flex: none;
    }
    .main-content-flex {
        width: 90%;
    }
}
@media (max-width: 600px) {
    .sidebar {
        /* На очень маленьких экранах можем сделать сайдбар горизонтальным или полностью скрыть */
        /* display: none; */ /* Если хотите полностью скрыть на мобильных, раскомментируйте */
        width: 100%;
        padding: 15px;
    }
    .page-flex {
        gap: 15px;
    }
    .sidebar, .main-content-flex {
        width: 100%;
        padding: 15px;
    }
}

/* --- Модальное окно 404 --- */
#modal-404 {
    animation: fadeIn 0.2s;
}
.modal-404-content {
    background: #fffbe9;
    border: 2px solid #c0392b;
    border-radius: 16px;
    box-shadow: 0 6px 32px rgba(192,57,43,0.15);
    padding: 40px 32px 32px 32px;
    min-width: 320px;
    max-width: 90vw;
    text-align: center;
    position: relative;
    animation: fadeIn 0.2s;
}
.modal-404-content h1 {
    color: #c0392b;
    font-size: 2.2em;
    margin-bottom: 18px;
}
.modal-404-content p {
    color: #2d4c3b;
    font-size: 1.15em;
    margin-bottom: 24px;
}
.modal-404-content button {
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-404-content button:hover {
    background: #e74c3c;
}
@media (max-width: 600px) {
    .modal-404-content { padding: 20px 5vw; min-width: unset; }
    .modal-404-content h1 { font-size: 1.3em; }
}

.category-card a, .category-card span, .category-list a, .recipe-card a, .recipe-list a {
    color: #2d4c3b !important;
    text-decoration: none !important;
}

.categories ul a, ul a {
    color: #2d4c3b !important;
    text-decoration: none !important;
}

.recipe-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
    justify-content: center;
}

.recipe-category-item {
    background: #fff;
    border: 2px solid #e6a04e;
    color: #2d4c3b;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(230, 160, 78, 0.2);
}

.recipe-category-item:hover {
    background: #e6a04e;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(230, 160, 78, 0.4);
}

@media (max-width: 600px) {
    .recipe-category-item {
        padding: 10px 20px;
        font-size: 1em;
    }
    .recipe-categories-list {
        gap: 10px;
    }
}

/* --- Стилизация ссылки на карту сайта в футере --- */
footer a.sitemap-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fffbe9;
    color: #d2691e;
    border-radius: 18px;
    padding: 6px 18px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px #e6a04e33;
    border: 1.5px solid #e6a04e;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.18s;
    margin-top: 8px;
}
footer a.sitemap-link:hover {
    background: #e6a04e;
    color: #fff;
    box-shadow: 0 0 16px #e6a04e99, 0 2px 8px #e6a04e33;
    transform: translateY(-2px) scale(1.04);
    text-decoration: none;
}
footer a.sitemap-link .sitemap-icon {
    font-size: 1.2em;
    margin-right: 2px;
    transition: color 0.25s;
}
footer a.sitemap-link:hover .sitemap-icon {
    color: #fffbe9;
}

/* --- Стилизация ссылки на политику конфиденциальности в футере --- */
footer a.privacy-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fffbe9;
    color: #2d4c3b;
    border-radius: 18px;
    padding: 6px 18px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px #e6a04e33;
    border: 1.5px solid #e6a04e;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.18s;
    margin-top: 8px;
}
footer a.privacy-link:hover {
    background: #2d4c3b;
    color: #fffbe9;
    box-shadow: 0 0 16px #2d4c3b99, 0 2px 8px #e6a04e33;
    transform: translateY(-2px) scale(1.04);
    text-decoration: none;
}
footer a.privacy-link .privacy-icon {
    font-size: 1.2em;
    margin-right: 2px;
    transition: color 0.25s;
}
footer a.privacy-link:hover .privacy-icon {
    color: #e6a04e;
}

.sitemap-special-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fffbe9;
    color: #2d4c3b;
    border-radius: 18px;
    padding: 8px 22px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px #e6a04e33;
    border: 2px solid #e6a04e;
    font-size: 1.1em;
    margin: 10px 0 0 0;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.18s;
}
.sitemap-special-link:hover {
    background: #e6a04e;
    color: #fff;
    box-shadow: 0 0 16px #e6a04e99, 0 2px 8px #e6a04e33;
    transform: translateY(-2px) scale(1.06);
    text-decoration: none;
}
.sitemap-special-link .privacy-icon,
.sitemap-special-link .sitemap-icon {
    font-size: 1.2em;
    margin-right: 2px;
    transition: color 0.25s;
}
.sitemap-special-link:hover .privacy-icon,
.sitemap-special-link:hover .sitemap-icon {
    color: #fffbe9;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin: 32px 0 48px 0;
    justify-items: center;
}
.gallery-grid img {
    width: 100%;
    max-width: 320px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 2px 12px #e0d8c0;
    transition: transform 0.22s, box-shadow 0.22s;
    cursor: pointer;
}
.gallery-grid img:hover {
    transform: scale(1.06) translateY(-4px);
    box-shadow: 0 8px 32px #e6a04e55;
}

.slider-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 32px 0 48px 0;
}
.slider-gallery img {
    width: 340px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 2px 12px #e0d8c0;
    transition: box-shadow 0.22s, transform 0.22s;
}
.slider-btn {
    background: #e6a04e;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.6em;
    cursor: pointer;
    transition: background 0.2s, transform 0.18s;
    box-shadow: 0 2px 8px #e6a04e33;
}
.slider-btn:hover {
    background: #d2691e;
    transform: scale(1.12);
}

footer a.download-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #2d4c3b;
    border-radius: 18px;
    padding: 6px 18px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1.5px solid #e6a04e;
    transition: all 0.25s ease;
    margin-top: 12px;
}
footer a.download-link:hover {
    background: #fffbe9;
    color: #2d4c3b;
    box-shadow: 0 4px 12px rgba(230,160,78,0.4);
    transform: translateY(-2px);
}
footer a.download-link .download-icon {
    font-size: 1.2em;
    margin-right: 2px;
}

footer a.qr-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fffbe9;
    color: #2d4c3b;
    border-radius: 18px;
    padding: 6px 18px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px #e6a04e33;
    border: 1.5px solid #e6a04e;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.18s;
    margin-top: 8px;
}

footer a.qr-link:hover {
    background: #2d4c3b;
    color: #fffbe9;
    box-shadow: 0 0 16px #2d4c3b99, 0 2px 8px #e6a04e33;
    transform: translateY(-2px) scale(1.04);
    text-decoration: none;
}

footer a.qr-link .qr-icon {
    font-size: 1.2em;
    margin-right: 2px;
    transition: color 0.25s;
}

footer a.qr-link:hover .qr-icon {
    color: #e6a04e;
}

html {
    scroll-behavior: smooth;
}
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}
