/* Базовые стили меню */
.site-header {
    background-color: #000;
    height: 80px; /* Уменьшаем высоту шапки */
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-container {
    height: 80px; /* Уменьшаем высоту контейнера */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Основные стили меню */
.header-menu {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

/* Удаляем лишние стили */
.header-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

/* Стили для подменю */
.header-menu ul li {
    position: relative;
}

.header-menu ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px; /* Уменьшаем с 16px */
    line-height: 80px; /* Подстраиваем под новую высоту шапки */
    padding: 0 10px;
    display: block;
}

/* Важное исправление: стили для подменю */
.header-menu ul li .sub-menu {
    display: none !important; /* Скрываем по умолчанию */
    position: absolute;
    top: 80px; /* Подстраиваем под новую высоту шапки */
    left: 0;
    background: #000;
    min-width: 200px;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Показываем подменю при наведении */
.header-menu ul li:hover > .sub-menu {
    display: flex !important;
}

/* Стили для пунктов подменю */
.header-menu ul li .sub-menu li {
    width: 100%;
}

.header-menu ul li .sub-menu li a {
    padding: 8px 12px; /* Уменьшаем с 14px */
    font-size: 12px; /* Уменьшаем с 14px */
    line-height: 1.2;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Индикатор для пунктов с подменю */
.menu-item-has-children > a:after {
    content: '▼';
    display: inline-block;
    margin-left: 5px;
    font-size: 10px;
    vertical-align: middle;
}

/* Стили для мобильного меню */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 15px; /* Подстраиваем позицию кнопки */
        right: 20px;
        z-index: 1001;
        background: none;
        border: none;
        color: #fff;
        font-size: 20px; /* Уменьшаем размер кнопки */
        cursor: pointer;
        padding: 10px;
    }

    .header-container {
        height: 60px; /* Меньше на мобильных */
    }

    .header-logo {
        height: 60px; /* Высота для мобильной версии */
    }

    .header-logo img {
        height: 50px; /* Размер логотипа для мобильной версии */
    }

    .header-menu {
        display: none;
        position: fixed;
        top: 80px; /* Отступ под шапкой */
        left: 0;
        width: 100%;
        height: auto; /* Высота по контенту */
        min-height: min-content; /* Минимальная высота по контенту */
        max-height: calc(100vh - 80px); /* Максимальная высота экрана минус шапка */
        background: rgba(0, 0, 0, 0.95);
        z-index: 1000;
        padding: 20px 0;
        overflow-y: auto; /* Добавляем прокрутку если контент не помещается */
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .header-menu.menu-open {
        display: block;
        transform: translateY(0);
    }

    .header-menu ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .header-menu ul li {
        width: 100%;
        text-align: center;
        position: relative;
        padding: 0;
        margin: 0;
    }

    /* Важно: стили для подменю в мобильной версии */
    .header-menu ul.sub-menu {
        display: block !important;
        position: static !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.05) !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .header-menu ul li a {
        display: block;
        padding: 15px;
        font-size: 18px;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        line-height: normal;
    }

    .header-menu ul.sub-menu li a {
        padding: 10px 15px;
        font-size: 16px;
        color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.05);
        border-bottom: none;
    }

    /* Убираем все эффекты наведения и переходов */
    .header-menu ul li:hover > ul.sub-menu {
        animation: none;
        transform: none;
    }

    .menu-item-has-children > a:after,
    .dropdown-indicator {
        display: none !important;
    }

    .mobile-contacts {
        display: block;
        padding: 20px;
        margin-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }

    .mobile-contacts p {
        margin: 10px 0;
        font-size: 14px;
        line-height: 1.3;
    }

    .mobile-contacts a {
        color: #ffffff;
        text-decoration: none;
    }

    .mobile-contacts .address a {
        font-size: 12px;
        line-height: 1.2;
    }

    .footer-menu ul {
        text-align: center;
        margin-top: 20px;
    }

    .info-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 30px !important;
        padding: 0 15px !important;
        justify-content: center !important;
    }

    .info-block {
        flex: 1 1 300px !important;
        max-width: 350px !important;
        min-width: 300px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        background: #f9f9f9;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .info-image {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 15px !important;
    }

    .info-image img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        border-radius: 5px !important;
    }

    .info-block h3 {
        margin: 0 0 10px 0 !important;
        font-size: 1.4rem !important;
    }

    .info-block p {
        margin: 0 !important;
        flex-grow: 1 !important;
    }

    .info-grid {
        flex-direction: column !important;
        align-items: center !important;
    }

    .info-block {
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 20px 0 !important;
    }
}

/* Стили для адреса в шапке */
.header-contacts .address-text {
    font-size: 14px;
    line-height: 1.3;
    margin-top: 5px;
}

.header-contacts .address-text a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-contacts .address-text a:hover {
    color: #00bcd4;
}

/* Обновленные стили для контактов в шапке */
.header-contacts {
    padding-right: 20px;
    max-width: 250px; /* Уменьшаем с 300px */
    text-align: right;
}

.header-contacts-text {
    margin: 0 0 3px 0; /* Уменьшаем отступы */
    line-height: 1.3;
    font-size: 12px !important; /* Уменьшаем с 16px */
    color: #ffffff !important;
}

.header-contacts .email,
.header-contacts .phone {
    font-size: 12px !important; /* Уменьшаем с 14px */
    margin-bottom: 4px; /* Уменьшаем отступы */
}

.header-contacts .address {
    font-size: 11px !important; /* Уменьшаем с 12px */
    line-height: 1.2;
}

.header-contacts a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-contacts a:hover {
    color: #00bcd4 !important;
}

.address-link {
    display: inline-block;
    line-height: 1.2;
}

.header-logo {
    flex: 0 0 auto;
    height: 80px; /* Увеличиваем до высоты шапки */
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 70px; /* Увеличиваем размер логотипа, оставляя небольшой отступ */
    width: auto;
    display: block;
}

/* Стили для меню в подвале */
.footer-menu-list,
.footer-menu ul {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-menu-list li,
.footer-menu ul li {
    display: inline-block;
    margin: 0 10px;
}

.footer-menu-list li a,
.footer-menu ul li a {
    color: #fff !important;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    background: none !important;
}

.footer-menu-list li a:hover,
.footer-menu-list li.active > a,
.footer-menu ul li a:hover,
.footer-menu ul li.active > a {
    color: #a259ff !important;
    border-bottom: 1px solid #a259ff;
}

/* Убрать подменю в подвале */
.footer-menu-list .sub-menu,
.footer-menu-list li ul,
.footer-menu-list li:hover > ul,
.footer-menu ul .sub-menu,
.footer-menu ul li ul,
.footer-menu ul li:hover > ul {
    display: none !important;
}

/* --- Адаптивность для подвала --- */
@media (max-width: 768px) {
    .footer-menu-list,
    .footer-menu ul {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    .footer-menu-list li,
    .footer-menu ul li {
        margin: 0;
    }
}

/* Стили для страниц */
.page-wrapper {
    margin-top: 80px;
}

.page-content {
    padding: 20px;
    min-height: 500px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.entry-header {
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

.entry-title {
    color: #000;
    font-size: 36px;
    margin: 0 0 30px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .page-wrapper {
        margin-top: 60px;
    }
    
    .page-content {
        padding-top: 80px; /* Уменьшаем отступ для мобильных */
    }
    
    .entry-title {
        font-size: 24px;
        padding-top: 15px;
    }
}

/* Общие стили для всех блоков (услуги, акции, информация) */
.services, .promotions, .info {
    margin: 50px 0;
    text-align: center;
}

.services h2, .promotions h2, .info h2 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 15px;
    position: relative;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.services h2::after, .promotions h2::after, .info h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: #00bcd4;
    border-radius: 2px;
}

.services-grid, .promotions-grid, .info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 15px;
}

.service-block, .promotion-block, .info-block {
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-block:hover, .promotion-block:hover, .info-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: inherit;
}

.service-image, .promotion-image, .info-image {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.service-image img, .promotion-image img, .info-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-block h3, .promotion-content h3, .info-block h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #333;
}

.service-block p, .promotion-content p, .info-block p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin: 0 0 15px 0;
}

/* Стили для блока услуг */
.info-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    padding: 0 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
}

.info-block {
    display: flex !important;
    flex-direction: column !important;
    background-color: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    padding: 20px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    text-decoration: none !important;
    color: inherit !important;
    height: auto !important;
    min-height: 0 !important;
}

.info-block .info-image {
    width: 100% !important;
    margin-bottom: 15px !important;
    border-radius: 5px !important;
    overflow: hidden !important;
}

.info-block .info-image img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
}

.info-block h3 {
    font-size: 1.4rem !important;
    margin: 0 0 15px 0 !important;
    color: #333 !important;
}

.info-block p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: #666 !important;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr !important;
        max-width: 400px !important;
        margin: 0 auto !important;
        padding: 0 15px !important;
    }

    .info-block {
        margin-bottom: 20px !important;
        height: auto !important;
    }
}

/* Стили для блока акций */
.promotions {
    position: relative;
    margin: 0; /* Убираем отступы для полной ширины */
    padding: 80px 0;
    text-align: center;
    width: 100vw; /* На всю ширину viewport */
    margin-left: calc(-50vw + 50%); /* Центрируем блок */
    margin-right: calc(-50vw + 50%);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    isolation: isolate; /* Создаем новый контекст наложения для псевдоэлемента */
}

/* Затемняющий эффект */
.promotions::after {
    content: '';
    position: absolute;
    inset: 0; /* Занимает всю площадь родителя */
    background: rgba(0, 0, 0, 0.7); /* Полупрозрачный черный */
    z-index: -1; /* Размещаем под контентом */
}

.promotions h2 {
    color: #fff; /* Меняем цвет заголовка на белый */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.promotions-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 20px;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .promotions {
        width: 100%; /* Возвращаем стандартную ширину */
        margin-left: 0;
        margin-right: 0;
        padding: 40px 0;
    }

    .promotions-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        gap: 20px;
    }

    .promotion-block {
        margin: 0 15px;
    }
}

/* Стили для блоков с меткой SALE */
.promotion-block {
    position: relative; /* Добавляем для позиционирования метки */
}

.sale-label {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff0000;
    color: #fff;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 3px;
    z-index: 1;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .services-grid, .promotions-grid, .info-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
        width: 100%;
        margin: 0 auto;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .service-block, .promotion-block, .info-block {
        width: 100%;
        max-width: 400px;
        margin-bottom: 20px;
        box-sizing: border-box;
    }

    .services h2, .promotions h2, .info h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .services h2::after, .promotions h2::after, .info h2::after {
        width: 80px;
        height: 2px;
    }
}

/* --- Стили для меню в подвале (footer-menu-list) --- */
.footer-block.footer-menu,
.footer-menu,
.footer-menu-list {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    text-align: center !important;
    gap: 0;
    margin: 0;
    padding: 0;
}

.footer-menu-list {
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
}

.footer-menu-list li {
    display: inline-block;
    margin: 0 10px;
}

.footer-menu-list li a {
    color: #fff !important;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    background: none !important;
}

.footer-menu-list li a:hover,
.footer-menu-list li.active > a {
    color: #a259ff !important;
    border-bottom: 1px solid #a259ff;
}

/* Убрать подменю в подвале */
.footer-menu-list .sub-menu,
.footer-menu-list li ul,
.footer-menu-list li:hover > ul {
    display: none !important;
}

/* --- Адаптивность для подвала --- */
@media (max-width: 768px) {
    .footer-block.footer-menu,
    .footer-menu,
    .footer-menu-list {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    .footer-menu-list li {
        margin: 0;
    }
}
}

.footer-menu-list li a {
    color: #fff !important;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    background: none !important;
}

.footer-menu-list li a:hover,
.footer-menu-list li.active > a {
    color: #a259ff !important;
    border-bottom: 1px solid #a259ff;
}

/* Убрать подменю в подвале */
.footer-menu-list .sub-menu,
.footer-menu-list li ul,
.footer-menu-list li:hover > ul {
    display: none !important;
}

/* --- Адаптивность для подвала --- */
@media (max-width: 768px) {
    .footer-block.footer-menu,
    .footer-menu,
    .footer-menu-list {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    .footer-menu-list li {
        margin: 0;
    }
}
