/* Стили для индикатора прокрутки */
#scroll-indicator {
    height: 4px;
    background-color: #CE2B37; /* Красный цвет итальянского флага */
    width: 0%;
    position: absolute;
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
    z-index: 1002;
    box-shadow: 0 0 5px rgba(206, 43, 55, 0.7);
}

/* Стили для анимации загрузки */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 100px;
}

.loading-bar {
    width: 20px;
    height: 80px;
    border-radius: 10px;
    animation: loading-animation 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    will-change: transform, height, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    filter: blur(0);
    transition: height 0.01s linear;
}

.loading-bar.red {
    background-color: #ce2b37;
    animation-delay: 1.2s;
    box-shadow: 0 0 8px rgba(206, 43, 55, 0.5);
}

.loading-bar.white {
    background-color: #ffffff;
    border: 1px solid #ddd;
    animation-delay: 0.6s;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.loading-bar.green {
    background-color: #009246;
    animation-delay: 0s;
    box-shadow: 0 0 8px rgba(0, 146, 70, 0.5);
}

@keyframes loading-animation {
    0%, 100% {
        height: 80px;
        transform: scaleY(1);
    }
    25% {
        height: 100px;
        transform: scaleY(1.05);
    }
    50% {
        height: 120px;
        transform: scaleY(1.1);
    }
    75% {
        height: 100px;
        transform: scaleY(1.05);
    }
}

/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    padding-top: 0; /* Убираем отступ сверху */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.6s ease;
}

ul {
    list-style: none;
}

/* Фото в полный размер */
.photo-container {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    display: block;
    clear: both;
}

.full-width-image {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

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

/* Стили для иконок социальных сетей */
.social-icons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 50px 0 60px 0;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #4CAF50;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.social-icon i {
    width: 20px;
    height: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 27px;
    height: 27px;
}

.social-icon:hover {
    transform: scale(1.1);
}

/* Баннер героя */
.hero-banner {
    position: relative;
    height: 600px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0;
    padding-top: 0;
    overflow: hidden;
}

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

.hero-content {
    position: relative;
    color: #fff;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content h1 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 18px;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Категории меню - улучшенный современный стиль */
.menu-categories {
    position: relative;
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 15px;
    margin: 0;
    padding: 15px 5%;
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    flex-direction: column;
    align-items: center;
    border-radius: 15px;
    margin-bottom: 0;
}

.menu-title {
    position: relative;
    text-align: center;
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    letter-spacing: 2px;
    background-color: #f8f8f8;
}

.menu-title .green {
    color: #009246;
    font-weight: 900;
}

.menu-title .white {
    color: #333;
    font-weight: 900;
}

.menu-title .red {
    color: #CE2B37;
    font-weight: 900;
}

.menu-categories::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}



.category-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    padding: 5px 0;
}

.category-container::-webkit-scrollbar {
    display: none;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    /* Улучшенные стили для мобильного меню категорий */
    .menu-categories {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        z-index: 999;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        width: 100% !important;
        transition: all 0.8s ease-in-out;
        will-change: transform;
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .photo-container {
        margin-top: 80px; /* Добавляем отступ сверху для мобильных устройств */
    }
    
    .menu-title {
        display: block;
        width: 100%;
        margin-top: 5px !important;
        text-align: center;
        margin-bottom: 10px;
        font-size: 22px;
        font-weight: 800;
        letter-spacing: 2px;
    }
    
    .menu-title .green {
        color: #009246;
    }
    
    .menu-title .white {
        color: #ffffff;
        text-shadow: 0px 0px 1px #000;
    }
    
    .menu-title .red {
        color: #CE2B37;
    }
}
    
    .category-container {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding: 5px 0;
        display: flex;
        justify-content: flex-start;
        gap: 10px;
    }
    

    
    .category-btn {
        padding: 6px 16px;
        font-size: 14px;
        margin: 0 3px;
        scroll-snap-align: center;
        border-radius: 20px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .category-btn.active {
        box-shadow: 0 3px 10px rgba(206, 43, 55, 0.4);
        transform: translateY(-2px);
        background-color: #CE2B37;
        color: white;
    }
    
    .hero-banner {
        margin-top: 120px; /* Компенсация фиксированной шапки и меню категорий */
        height: 250px; /* Уменьшаем высоту баннера на мобильных */
    }
    
    .site-header {
        padding: 10px 5%;
    }


/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
    .category-btn {
        padding: 6px 12px;
        font-size: 13px;
        margin: 0 3px;
    }
    
    .site-header {
        padding: 8px 4%;
    }
    
    .logo a {
        font-size: 20px;
    }
}

/* Удалено: Фиксированная навигация по разделам */

.category-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f0f0f0;
    color: #CE2B37;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn.active {
    background-color: #CE2B37; /* Красный цвет итальянского флага */
    color: #fff;
    border-color: #CE2B37;
    box-shadow: 0 4px 10px rgba(206, 43, 55, 0.3);
    transform: scale(1.05);
}

.category-btn:hover:not(.active) {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* Стили для мобильного меню удалены, так как блок mobile-menu-toggle больше не используется */

/* Секция меню */
.menu-section {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 1s ease-in-out;
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #009246; /* Зеленый цвет итальянского флага */
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #CE2B37; /* Красный цвет итальянского флага */
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.menu-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    opacity: 0;
    transform: translateY(5px);
    transition: transform 0.5s ease, box-shadow 0.5s ease, opacity 0.05s ease;
}

.menu-item.animate {
    opacity: 1;
    transform: translateY(0);
}

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

@media (hover: none) {
    .menu-item:hover {
        transform: none;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    }
}

.item-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.item-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.item-price {
    font-size: 18px;
    font-weight: 700;
    color: #CE2B37; /* Красный цвет итальянского флага */
    align-self: flex-end;
    margin-top: 10px;
}

/* Подвал */
.site-footer {
    background-color: #222;
    color: #fff;
    padding: 50px 5% 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo h3 {
    color: #009246; /* Зеленый цвет итальянского флага */
    font-size: 24px;
    margin-bottom: 5px;
}

.footer-logo p {
    font-size: 14px;
    color: #ccc;
}

.social-links a {
    color: #fff;
    font-size: 20px;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #CE2B37; /* Красный цвет итальянского флага */
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #ccc;
}

/* Анимация для плавного появления секций */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav ul li {
        margin: 5px 10px;
    }
    
    .hero-banner {
        height: 250px;
        margin-top: 120px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .menu-items {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .social-links {
        margin-top: 20px;
    }
    
    .social-links a {
        margin: 0 10px;
    }
    
    .menu-categories {
        display: flex;
        overflow-x: auto;
        justify-content: center;
        padding: 12px 10px;
        margin: 15px auto;
        -webkit-overflow-scrolling: touch;
        max-width: 95%;
        border-radius: 6px;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .mobile-menu-toggle {
        display: block;
        margin: 10px auto;
        width: 90%;
    }
    
    .menu-categories.active {
        display: flex;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 15px 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .menu-categories::-webkit-scrollbar {
        height: 4px;
    }
    
    .menu-categories::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
    
    .category-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 14px;
        padding: 8px 16px;
        flex-shrink: 0;
        margin: 0 4px;
        border-radius: 20px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        text-align: center;
    }
    
    .menu-section {
        padding: 30px 15px;
    }
    
    .menu-item {
        flex-direction: column;
        margin-bottom: 25px;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .item-details h3 {
        font-size: 16px;
    }
    
    .item-details p {
        font-size: 14px;
    }
    
    .item-price {
        margin-top: 8px;
        align-self: flex-start;
        font-weight: 600;
        color: #CE2B37;
        font-size: 16px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 10px;
    }
    
    .logo img {
        max-width: 120px;
    }
    
    .hero-banner {
        height: 200px;
        margin-top: 100px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .menu-item {
        padding: 15px;
    }
    
    .mobile-category-select {
        font-size: 14px;
        padding: 8px 30px 8px 10px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .category-btn {
        font-size: 13px;
        padding: 8px 16px;
        margin: 0 3px;
    }
    
    .menu-categories {
        padding: 10px 5px;
        justify-content: flex-start;
        overflow-x: scroll;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .menu-categories::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .menu-item {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .item-details h3 {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .item-description {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .item-price {
        font-size: 16px;
    }
    
    .site-header {
        padding: 10px;
    }
    
    .logo a {
        font-size: 20px;
    }
    
    .main-nav ul li a {
        font-size: 13px;
    }
}

/* Дополнительные стили для мобильных устройств */
@media (max-width: 360px) {
    .hero-banner {
        height: 200px;
        margin-top: 100px;
    }
    
    .hero-content h1 {
        font-size: 20px;
    }
    
    .hero-content p {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .item-details h3 {
        font-size: 15px;
    }
    
    .item-description {
        font-size: 12px;
    }
    
    .menu-categories {
        max-width: 100%;
        padding: 8px 5px;
        margin: 10px auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
    }
    
    .category-btn {
        font-size: 12px;
        padding: 6px 12px;
        margin: 0 2px;
        scroll-snap-align: center;
    }
    
    .item-price {
        font-size: 15px;
    }
    
    .menu-section {
        padding: 20px 10px;
    }
}