/*
Template Name: FoodEque / ENasledie
File Name: style.css
*/

/* ==========================================================================
   1. ГЛОБАЛЬНЫЕ НАСТРОЙКИ И ТИПОГРАФИКА
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap');

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
}

body {
    font-size: 20px;
    color: #173844;
    background: #FFF;
}

/* Принудительно задаем Roboto для всех элементов */
body, h1, h2, h3, h4, h5, h6, p, a, div, span, button, input, textarea {
    font-family: 'Roboto', sans-serif;
}

/* Глобальные стили для ссылок */
a {
    transition: 0.2s all;
    text-decoration: none;
}
a:hover, a:focus {
    text-decoration: none;
    color: #a22701;
}

/* Заголовки: Все в верхнем регистре и жирные */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 20px 0;
    padding: 0;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.3;
}

h1 { font-size: 50px; }
h2 { font-size: 35px; }
h3 { font-size: 28px; }
h4 { font-size: 24px; }
h5 { font-size: 22px; }
h6 { font-size: 18px; }

p {
    margin: 0 0 14px;
    font-weight: 300;
    font-size: 20px;
}

ul, label {
    margin: 0;
    padding: 0;
}


/* ==========================================================================
   2. ШАПКА И НАВИГАЦИЯ (NAVBAR)
   ========================================================================== */
.header-top { margin: 10px 0; }
.header-top p {
    color: #2b2b2b;
    font-size: 1em;
    font-weight: 400;
    letter-spacing: 2px;
}

.logo {
    display: inline-block;
    text-align: center;
    background-color: #f9f9e7;
    padding: 10px 20px;
}
.logo-responsive { max-width: 100%; height: auto; }

/* Фон меню */
.navbar.navbar-default {
    background-color: #173844;
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('/assets/templates/dm/images/navbg.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border: none;
    margin-bottom: 0;
}

/* Ссылки меню (Десктоп) */
.navbar-default .navbar-nav > li > a {
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 100; /* Немного усилили с 100 для читаемости в ВЕРХНЕМ РЕГИСТРЕ */
    padding: 20px 15px !important; /* Убрали ломающий верстку line-height 330px */
    letter-spacing: 0px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ховер и активный пункт меню (Красная плашка) */
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > li.active > a,
.navbar-default .navbar-nav > li.active > a:hover,
.navbar-default .navbar-nav > li.active > a:focus {
    background-color: #a22701 !important;
    color: #ffffff !important;
}

/* Выравнивание меню */
#myNavbar .navbar-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
}
#myNavbar .navbar-nav > li { flex: 0 1 auto; }

/* Адаптация меню для мобильных */
@media (max-width: 767px) {
    #myNavbar .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        margin: 0 !important;
    }
    #myNavbar .navbar-nav > li { width: 100%; }
    
    /* Фикс длинных пунктов (Исторический календарь) */
    .navbar-default .navbar-nav > li > a {
        padding: 12px 20px !important;
        white-space: normal !important;
        word-wrap: break-word;
        text-align: left !important;
        display: block !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Отступы блоков меню, чтобы не слипались */
    #myNavbar .row > div:first-child .navbar-nav { padding-top: 20px; margin-top: 0; }
    #myNavbar .row > div:last-child .navbar-nav { padding-bottom: 25px; margin-bottom: 0; }
}
@media (min-width: 768px) {
    .navbar-right { float: left !important; margin-left: 0; }
}


/* ==========================================================================
   3. ГЛАВНЫЙ БАННЕР (HERO SWIPER)
   ========================================================================== */
.main-hero-swiper {
    width: 100%;
    aspect-ratio: 1920 / 800;
    position: relative;
    background-color: #173844;
    overflow: hidden;
}

.hero-slide-item { position: relative; width: 100%; height: 100%; }
.hero-bg-img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; z-index: 1;
}

.hero-overlay-wrap {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    display: flex; align-items: center;
    padding: 0 10%;
    box-sizing: border-box;
}

.hero-text-box {
    background: rgba(23, 56, 68, 0.85);
    padding: 3%;
    max-width: 50%;
    border-left: 5px solid #a22701;
}

.hero-title {
    color: #fff;
    font-size: 2vw;
    line-height: 1.4;
    margin: 0;
    /* Убрали Oswald, наследуется глобальный Roboto */
}

/* Навигация баннера */
.hero-nav-next, .hero-nav-prev { color: #fff !important; transition: opacity 0.3s; }
.hero-nav-next:hover, .hero-nav-prev:hover { opacity: 0.7; }

/* Точки баннера вынесены вниз */
.main-hero-wrapper {
    position: relative;
    padding-bottom: 40px;
    margin-bottom: 30px;
}
.main-hero-wrapper .swiper-pagination.hero-dots { bottom: 0; }
.main-hero-wrapper .swiper-pagination-bullet { background: #173844; opacity: 0.3; }
.main-hero-wrapper .swiper-pagination-bullet-active { background: #a22701; opacity: 1; }

@media (max-width: 767px) {
    .main-hero-wrapper { padding-bottom: 30px; }
    .hero-overlay-wrap { padding: 0 15px; align-items: flex-end; padding-bottom: 20px; }
    .hero-text-box { max-width: 90%; padding: 15px; border-left-width: 3px; }
    .hero-title { font-size: 4vw; }
    .hero-nav-next, .hero-nav-prev { display: none !important; }
}


/* ==========================================================================
   4. ИСТОРИЧЕСКИЙ КАЛЕНДАРЬ
   ========================================================================== */
.calendar-card-wrapper { margin-bottom: 30px; }

.calendar-item-card {
    display: block; text-decoration: none; color: inherit; height: 100%;
}
.calendar-item-card:hover, .calendar-item-card:focus { text-decoration: none; color: inherit; }

.calendar-item-inner {
    display: flex; flex-wrap: wrap;
    background: #fff; border: 1px solid #e0e0e0;
    height: 100%; transition: box-shadow 0.3s ease;
}
.calendar-item-card:hover .calendar-item-inner { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

.calendar-date-square {
    width: 25%; aspect-ratio: 1 / 1;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; color: #fff; padding: 10px;
    background-color: #a22701;
}

.date-day { font-size: 48px; font-weight: 100; line-height: 1; margin-bottom: 2px; }
.date-month { font-size: 13px; font-weight: 400; letter-spacing: 1px; line-height: 1.2; }

.calendar-img-square { width: 25%; aspect-ratio: 1 / 1; padding: 0; }
.calendar-img-square img { width: 100%; height: 100%; object-fit: cover; display: block; }

.calendar-text-box {
    width: 50%; padding: 20px;
    display: flex; flex-direction: column; justify-content: center;
}
.calendar-card-title {
    font-size: 16px; color: #173844; margin-bottom: 10px; transition: color 0.2s;
}
.calendar-item-card:hover .calendar-card-title { color: #a22701; }
.calendar-card-intro { font-size: 14px; color: #666; line-height: 1.4; margin: 0; text-transform: none; font-weight: 300;}

@media (max-width: 767px) {
    .calendar-date-square, .calendar-img-square { width: 50%; }
    .calendar-text-box { width: 100%; padding: 15px; }
}


/* ==========================================================================
   5. НОВОСТИ (СЛАЙДЕР И СТАТИКА)
   ========================================================================== */
/* Слайдер новостей */
.news-swiper { padding-bottom: 50px !important; }
.news-swiper .swiper-wrapper { align-items: stretch; }
.news-swiper .swiper-slide { height: auto; }

/* Точки пагинации */
.news-swiper .news-pagination { bottom: 0 !important; }
.news-swiper .swiper-pagination-bullet { background: #173844 !important; opacity: 0.3; }
.news-swiper .swiper-pagination-bullet-active { background: #a22701 !important; opacity: 1; }

/* Общие стили карточки новости (Слайдер) */
.card-item {
    display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid #eee;
    transition: all 0.3s ease; text-decoration: none; color: inherit;
}
.card-item:hover, .card-item:focus {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-color: #a22701;
    text-decoration: none; color: inherit; transform: translateY(-3px);
}
.card-item img { width: 100%; height: 220px; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 16px; line-height: 1.4; color: #173844; margin-bottom: 15px; transition: color 0.2s; }
.card-item:hover .card-title { color: #a22701; }
.card-date {
    font-size: 13px; color: #777; margin-top: auto;
    border-top: 1px solid #eee; padding-top: 10px; text-transform: none; font-weight: 300;
}

/* Статичная карточка новости (Внутренние страницы) */
.news-static-card {
    display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid #eee;
    text-decoration: none !important; color: inherit; transition: all 0.3s ease; overflow: hidden;
}
.news-static-card:hover, .news-static-card:focus {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-color: #a22701;
    transform: translateY(-4px); color: inherit;
}
.news-static-img { position: relative; width: 100%; height: 220px; overflow: hidden; }
.news-static-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-static-card:hover .news-static-img img { transform: scale(1.05); }
.news-static-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.news-static-title { font-size: 16px; line-height: 1.4; color: #173844; margin-bottom: 15px; transition: color 0.2s; }
.news-static-card:hover .news-static-title { color: #a22701; }
.news-static-date {
    font-size: 13px; color: #777; margin-top: auto;
    border-top: 1px solid #eee; padding-top: 10px; text-transform: none; font-weight: 300;
}


/* ==========================================================================
   6. О ПРОЕКТЕ (ПЛИТКА "МУЗЕЙ")
   ========================================================================== */
.museum-style-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-top: 20px;
}
.museum-card-item {
    position: relative; display: block; height: 350px; overflow: hidden;
    text-decoration: none !important; color: #fff !important; background: #173844;
}
.museum-card-item:hover, .museum-card-item:focus { text-decoration: none !important; color: #fff !important; }

.museum-card-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1; transition: transform 0.6s ease;
}
.museum-card-item:hover .museum-card-img { transform: scale(1.08); }

.museum-card-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%); z-index: 2;
}

.museum-card-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    z-index: 3; display: flex; flex-direction: column; justify-content: flex-end;
}
.museum-card-title {
    font-size: 24px; color: #fff; margin: 0 0 10px 0;
    transition: color 0.3s ease; text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.museum-card-item:hover .museum-card-title { color: #a22701; }
.museum-card-desc { font-size: 15px; color: #f0f0f0; line-height: 1.4; margin: 0; text-transform: none; font-weight: 300; }

@media (max-width: 991px) { .museum-card-item { height: 300px; } }
@media (max-width: 767px) {
    .museum-style-grid { grid-template-columns: 1fr; gap: 20px; }
    .museum-card-item { height: 250px; }
    .museum-card-content { padding: 20px; }
    .museum-card-title { font-size: 20px; }
}


/* ==========================================================================
   7. ПАРТНЕРЫ И ССЫЛКИ
   ========================================================================== */
.partner-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e5e5;
    border-radius: 4px; height: 100%; text-decoration: none !important;
    color: #173844; transition: box-shadow 0.2s, border-color 0.2s; overflow: hidden;
}
.partner-card:hover, .partner-card:focus {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); border-color: #a22701; color: #173844;
}

.partner-img-box {
    height: 140px; padding: 15px; display: flex; align-items: center; justify-content: center;
    background: #fafafa; border-bottom: 1px solid #e5e5e5;
}
.partner-img-box img { max-height: 100%; max-width: 100%; object-fit: contain; }

.partner-text-box {
    padding: 15px; flex-grow: 1; display: flex; align-items: center;
    justify-content: center; text-align: center;
}
.partner-title { font-size: 14px; transition: color 0.2s; }
.partner-card:hover .partner-title { color: #a22701; }

@media (max-width: 767px) {
    .partner-card { flex-direction: row; align-items: center; height: auto; }
    .partner-img-box { width: 35%; height: 100px; border-bottom: none; border-right: 1px solid #e5e5e5; padding: 10px; }
    .partner-text-box { width: 65%; padding: 10px 15px; text-align: left; justify-content: flex-start; }
    .partner-title { font-size: 13px; }
}


/* ==========================================================================
   8. ПРОЧИЕ ЭЛЕМЕНТЫ (КНОПКИ, ФОРМЫ, ПОДВАЛ)
   ========================================================================== */
.welcome-block, .special-block, .food-block, .service-block, 
.book-block, .counter-block, .staff-block, .subscribe-block, .contact-block {
    padding-top: 100px;
}

.read-more {
    background: #a22701; color: #fff; font-size: 20px; font-weight: 600;
    letter-spacing: 2px; padding: 10px 13px; border: 1px solid transparent; cursor: pointer;
}
.read-more:hover { background: #fff; border-color: #a22701; color: #a22701; }

#contactForm .form-control {
    background: rgba(255,255,255,0.7); border: none; border-radius: 0; box-shadow: none;
    color: #173844; font-size: 18px; height: 67px; line-height: 22px; margin-bottom: 20px; padding: 6px 12px; width: 100%;
}
.contact-block #contactForm .form-control { background: rgba(0,0,0,0); border: 1px solid #fff; color: #fff; height: 63px; font-size: 17px; }
.contact-block #contactForm .form-control:focus { background: rgba(0,0,0,0); color: #FFF; }

footer {
    background: #173844; margin-top: 135px; padding: 35px 0 25px; color: #fff;
}

#back-to-top { position: fixed; right: 25px; bottom: 15px; }

/* --- ВЫРАВНИВАНИЕ МЕНЮ ПО ВЕРТИКАЛИ НА ДЕСКТОПЕ --- */
@media (min-width: 768px) {
    /* Превращаем строку с меню во Flexbox для идеального центрирования по вертикали */
    #myNavbar > .row {
        display: flex;
        align-items: center; /* Центрирует ссылки ровно по середине относительно логотипа */
    }

    /* Отключаем стандартные обтекания (floats) Бутстрапа для этой строки */
    #myNavbar > .row > div {
        float: none;
    }

    /* Списки делаем гибкими */
    #myNavbar .navbar-nav {
        display: flex;
        width: 100%;
        margin: 0;
    }

    /* Левое меню прижимаем к центру (ближе к логотипу) или оставляем слева */
    #myNavbar .row > div:first-child .navbar-nav {
        justify-content: center; 
    }
    
    /* Правое меню прижимаем к центру (ближе к логотипу) или оставляем справа */
    #myNavbar .row > div:last-child .navbar-nav {
        justify-content: center;
    }

    /* Настраиваем сами пункты меню, чтобы красная подложка была аккуратной кнопкой */
    .navbar-default .navbar-nav > li > a {
        padding: 10px 5px !important; /* Компактные внутренние отступы */
        white-space: normal !important; /* Разрешаем тексту переноситься на две строки */
        line-height: 1.3 !important; /* Межстрочный интервал для перенесенного текста */
        text-align: center; /* Выравниваем текст внутри кнопок по центру */
        border-radius: 4px; /* Легкое скругление углов у красной плашки (по желанию) */
        margin: 0 0px; /* Небольшой отступ между соседними кнопками */
    }
}