/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #A0522D;
    --primary-dark: #654321;
    --primary-light: #CD853F;
    --text-color: #333;
    --bg-color: #fff;
    --light-bg: #FAF5F0;
    --border-color: #D2B48C;
    --accent-color: #D2691E;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    color: white;
    padding: 4rem 0;
    text-align: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.9) 0%, rgba(160, 82, 45, 0.9) 100%);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: 500;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Кнопка поминального меню для светлого фона */
.menu-section .btn-secondary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.menu-section .btn-secondary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* Sections */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: var(--light-bg);
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Menu Section */
.menu-section {
    min-height: 400px;
}

.menu-placeholder {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.menu-preview {
    text-align: center;
    padding: 2rem;
}

.menu-preview p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #666;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.about-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-section p {
    margin: 0;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Gallery Section */
.gallery-section {
    margin-top: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Reviews Section */
.reviews-section {
    background-color: var(--light-bg);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.review-stars {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.review-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.review-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.review-author strong {
    color: var(--primary-color);
    font-size: 1rem;
}

.review-date {
    color: #999;
    font-size: 0.85rem;
}

/* Contacts Section */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer nav {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

footer a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

footer a:hover {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 300px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .review-card {
        padding: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text {
        text-align: center;
    }

    .about-section p {
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item img {
        height: 200px;
    }
}

/* Accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Performance */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Menu Page Styles */
.menu-page {
    padding: 2rem 0 4rem;
}

.menu-content {
    max-width: 900px;
    margin: 0 auto;
}

.menu-category {
    margin-bottom: 3rem;
}

.category-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.category-description {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    text-align: center;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.menu-item-content {
    flex: 1;
}

.menu-item-name {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.menu-item-description {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.menu-item-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-left: 1rem;
    white-space: nowrap;
}

/* Subcategories */
.menu-subcategory {
    margin-bottom: 2rem;
    margin-top: 1.5rem;
}

.subcategory-title {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.menu-subcategory .menu-item-name {
    font-size: 1.1rem;
}

/* Legal Pages */
.legal-page {
    padding: 2rem 0 4rem;
}

.legal-page h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.legal-content h2 {
    text-align: left;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.legal-content p {
    text-align: left;
    margin-bottom: 1rem;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Поминальное меню */
.pominalnoe-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.pominalnoe-intro p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.pominalnoe-intro a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.pominalnoe-intro a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .menu-item {
        flex-direction: column;
    }
    
    .menu-item-price {
        margin-left: 0;
        margin-top: 0.5rem;
        align-self: flex-end;
    }
    
    .legal-content {
        padding: 1rem;
    }
}
