/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', sans-serif;
    background: #faf8f4;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
}
a {
    text-decoration: none;
    color: inherit;
}
img {
    max-width: 100%;
    display: block;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: #1a5e2a;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: #c9a96e;
    margin: 10px auto 0;
    border-radius: 4px;
}
.section-sub {
    text-align: center;
    color: #5a5a5a;
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto 44px;
    font-weight: 300;
}

/* ===== COLOR VARIABLES ===== */
:root {
    --green-dark: #1a5e2a;
    --green-mid: #2e7d32;
    --green-light: #4caf50;
    --gold: #c9a96e;
    --gold-light: #e8d5a8;
    --gold-bright: #d4af37;
    --cream: #faf8f4;
    --cream-dark: #f0ede6;
    --text-dark: #1a1a1a;
    --text-muted: #5a5a5a;
    --white: #ffffff;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.14);
    --radius: 16px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(201, 169, 110, 0.25);
    transition: var(--transition);
    padding: 12px 0;
}
.header.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--green-dark);
    letter-spacing: -0.5px;
}
.logo span {
    color: var(--gold-bright);
}
.logo i {
    color: var(--gold-bright);
    margin-right: 6px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}
.nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    padding: 6px 0;
    position: relative;
    transition: var(--transition);
    letter-spacing: 0.2px;
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-bright);
    transition: var(--transition);
}
.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}
.nav a:hover {
    color: var(--green-dark);
}

.header-phone,
.header-delivery {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--green-dark);
    font-size: 1rem;
    padding: 8px 18px;
    border: 2px solid var(--gold);
    border-radius: 40px;
    transition: var(--transition);
    background: transparent;
    cursor: pointer;
}
.header-delivery {
    border-color: var(--green-dark);
    background: var(--green-dark);
    color: #fff;
}
.header-delivery:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}
.header-phone i,
.header-delivery i {
    font-size: 0.9rem;
}
.header-phone:hover {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}
.header-phone:hover i {
    color: var(--white);
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--green-dark);
    border-radius: 4px;
    transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== HERO ===== */
.hero {
    margin-top: 76px;
    height: 86vh;
    min-height: 520px;
    max-height: 720px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0 0 48px 48px;
    background: var(--green-dark);
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: url('/jpg/back.main.png') center/cover no-repeat;
    filter: brightness(0.5) saturate(0.9);
    transform: scale(1.05);
    transition: transform 8s ease;
}
.hero:hover .hero-bg {
    transform: scale(1);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 94, 42, 0.7) 0%, rgba(26, 94, 42, 0.3) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 720px;
    padding: 0 24px;
    animation: heroFade 1.2s ease forwards;
}
@keyframes heroFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.hero-content h1 span {
    color: var(--gold-bright);
}
.hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 28px;
    line-height: 1.7;
}
.hero-btn {
    display: inline-block;
    padding: 14px 44px;
    background: var(--gold-bright);
    color: var(--white);
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.35);
    letter-spacing: 0.5px;
}
.hero-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 40px rgba(212, 175, 55, 0.45);
    background: #dbb94a;
}

/* ===== MENU SECTION ===== */
.menu-section {
    padding: 72px 0 88px;
}
.menu-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 48px;
}
.menu-categories button {
    padding: 10px 28px;
    border: 2px solid var(--cream-dark);
    background: var(--white);
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}
.menu-categories button:hover {
    border-color: var(--gold);
    color: var(--green-dark);
}
.menu-categories button.active {
    background: var(--green-dark);
    color: var(--white);
    border-color: var(--green-dark);
    box-shadow: 0 4px 16px rgba(26, 94, 42, 0.25);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

/* ===== MENU CARD ===== */
.menu-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: default;
    opacity: 0;
    transform: translateY(30px);
    animation: cardFade 0.6s ease forwards;
    border: 1px solid rgba(201, 169, 110, 0.12);
}
.menu-card.visible {
    opacity: 1;
    transform: translateY(0);
}
@keyframes cardFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(201, 169, 110, 0.3);
}

/* ИЗМЕНЕНИЕ: контейнер изображения — высота увеличена, фон для пустых мест */
.menu-card-img {
    height: 240px;              /* было 190px */
    background: #f0ede6;        /* фон, если картинка не заполнит весь блок */
    overflow: hidden;
}
.menu-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;        /* ИЗМЕНЕНО: было cover, теперь картинка видна целиком */
    transition: var(--transition);
}
.menu-card:hover .menu-card-img img {
    transform: scale(1.04);     /* лёгкое увеличение при наведении */
}

.menu-card-body {
    padding: 20px 22px 24px;
}
.menu-card-body .card-cat {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gold-bright);
    font-weight: 600;
    margin-bottom: 4px;
}
.menu-card-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 6px;
}
.menu-card-body .desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
    min-height: 42px;
}
.menu-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.menu-card .price {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.10);
    padding: 2px 16px 2px 14px;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}
.menu-card .price::before {
    content: '₽';
    font-size: 1rem;
    font-weight: 400;
    color: var(--gold);
    margin-right: 2px;
}

/* ===== КНОПКА «ЗАКАЗАТЬ» ===== */
.order-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--green-dark);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid transparent;
}
.order-btn i {
    font-size: 0.85rem;
}
.order-btn:hover {
    background: var(--gold-bright);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    border-color: var(--gold-bright);
}
.order-btn:active {
    transform: scale(0.96);
}

/* ===== ABOUT ===== */
.about-section {
    padding: 72px 0 80px;
    background: var(--cream);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 340px;
    background: url('/jpg/opisanierest.png') center/cover no-repeat;
    transition: var(--transition);
}
.about-image:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-hover);
}
.about-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--green-dark);
    margin-bottom: 16px;
}
.about-text h2 span {
    color: var(--gold-bright);
}
.about-text p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 12px;
}
.about-text .highlight {
    color: var(--green-dark);
    font-weight: 500;
}

/* ===== CONTACTS ===== */
.contacts-section {
    padding: 72px 0 80px;
    background: var(--white);
}
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}
.contact-item {
    text-align: center;
    padding: 28px 16px;
    border-radius: var(--radius);
    background: var(--cream);
    transition: var(--transition);
    border: 1px solid transparent;
}
.contact-item:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: var(--shadow);
}
.contact-item i {
    font-size: 2rem;
    color: var(--gold-bright);
    margin-bottom: 12px;
    display: block;
}
.contact-item h4 {
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 4px;
}
.contact-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.contact-item a {
    color: var(--text-muted);
    transition: var(--transition);
}
.contact-item a:hover {
    color: var(--green-dark);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--green-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 48px 0 0;
}
.footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
}
.footer-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--gold-bright);
    margin-bottom: 8px;
}
.footer-info p {
    font-weight: 300;
    font-size: 0.95rem;
    opacity: 0.8;
    max-width: 360px;
}
.footer-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    height: 220px;
    background: #2d4a2d;
    border: 2px solid rgba(201, 169, 110, 0.2);
}
.footer-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
    font-weight: 300;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open {
    display: flex;
}
.modal {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    background: none;
    border: none;
}
.modal-close:hover {
    color: #000;
}
.modal h3 {
    font-family: 'Playfair Display', serif;
    color: var(--green-dark);
    margin-bottom: 16px;
    font-size: 1.6rem;
}
.modal p {
    margin-bottom: 12px;
    color: #444;
    line-height: 1.7;
}
.modal .phone-link {
    display: inline-block;
    background: var(--green-dark);
    color: #fff;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    margin-top: 8px;
}
.modal .phone-link:hover {
    background: var(--gold-bright);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .about-image {
        height: 260px;
    }
    .footer .container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-map {
        height: 200px;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(250, 248, 244, 0.98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        flex-direction: column;
        padding: 28px 24px 32px;
        gap: 18px;
        border-bottom: 2px solid rgba(201, 169, 110, 0.15);
        transform: translateY(-120%);
        transition: var(--transition);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
        border-radius: 0 0 24px 24px;
    }
    .nav.open {
        transform: translateY(0);
    }
    .nav-toggle {
        display: flex;
    }
    .header-phone,
    .header-delivery {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    .contacts-grid {
        grid-template-columns: 1fr 1fr;
    }
    .menu-card-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }
    .order-btn {
        width: 100%;
        justify-content: center;
    }
    /* Адаптивная высота изображения для планшетов и мобильных */
    .menu-card-img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 420px;
        border-radius: 0 0 24px 24px;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    .hero-btn {
        padding: 12px 32px;
        font-size: 0.95rem;
    }
    .menu-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 1.7rem;
    }
    .menu-categories button {
        padding: 8px 18px;
        font-size: 0.8rem;
    }
    /* Ещё ниже на очень маленьких экранах */
    .menu-card-img {
        height: 180px;
    }
}