body {
    font-family: "EB Garamond", serif;
    background: #628395;
    color: #ffffff;
}

a {
    color: #ffffff;
    text-decoration: none;
}

:root {
    --color-primary: #2c7be5;
    --color-primary-hover: #1a5fd1;
    --color-text: #ffffff;
    --color-link: #fefefe;
    --color-bg: #72059d;
    --color-bg-secondary: #628395;
}

body {
    font-family: "EB Garamond", serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
}


/* Typography & Links */

a {
    color: var(--color-link);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    opacity: 0.8;
}


/* Buttons */

.btn-custom {
    background-color: var(--color-primary);
    color: #fff;
    transition: 0.3s;
}

.btn-custom:hover {
    background-color: var(--color-primary-hover);
}


/* Home Slider */

.home-slider .swiper {
    padding-bottom: 60px;
}

.home-slider__image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.home-slider__arrow {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: #ff0000;
    /* Твой красный цвет */
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.home-slider__arrow:hover {
    transform: scale(1.05);
    background: #cc0000;
}

.home-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.home-slider .swiper-pagination-bullet-active {
    background: #fff;
    opacity: 1;
}


/* Post Cards Fix (чтобы текст был виден на темном фоне сайта) */

.card {
    overflow: hidden;
}

.card-title {
    color: #333;
}

.card-text {
    color: #666;
}


/* Responsive */

@media (max-width: 767.98px) {
    .home-slider__top {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    .home-content-block__content {
        padding-left: 0 !important;
        padding-top: 25px;
    }
}


/* Исправление вылетающих строк в контактных данных (Overlay) */

.contact-data,
.contact-info,
.footer-contact-item {
    /* Используем общие селекторы, проверь какой класс у тебя в оверлее */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    /* Чтобы не распирало родителя */
}


/* Специфично для мобильных устройств */

@media (max-width: 576px) {
    .overlay-content a,
    .overlay-content span {
        font-size: 16px;
        /* Немного уменьшим шрифт, если email все равно слишком длинный */
        display: block;
        /* Позволяет тексту занимать всю ширину и переноситься */
        line-height: 1.4;
    }
}


/* Фикс для полей формы, чтобы они не вылезали за края */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea {
    width: 100% !important;
    /* Занимать всю доступную ширину */
    max-width: 100% !important;
    /* Ни в коем случае не шире контейнера */
    box-sizing: border-box !important;
    /* Учитывать padding и border внутри ширины */
}


/* Если используешь Contact Form 7, добавим обертку */

.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}


/* Убедимся, что сам контейнер формы не имеет фиксированной ширины */

form {
    width: 100%;
}


/* Дополнительный фикс для мобилок */

@media (max-width: 767px) {
    .contact-andmed-container,
    /* Замени на свой класс фиолетового блока, если он другой */
    div[style*="background-color: var(--color-bg)"] {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}


/* Убираем контейнерные ограничения для слайдера */

.home-slider {
    width: 100%;
    overflow: hidden;
    padding: 0 !important;
    /* Убираем падинги секции, чтобы было от края до края */
}

.home-swiper {
    width: 100%;
    height: 650px;
    /* Высота слайдера, можешь менять */
}


/* Слайд как контейнер для фона */

.hero-slide {
    position: relative;
    display: flex;
    align-items: center;
    /* Центрируем текст по вертикали */
    overflow: hidden;
    background-color: #000;
    /* Цвет подложки, если картинка не загрузится */
}


/* Сама картинка через псевдоэлемент (для прозрачности) */

.hero-slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* ПРОЗРАЧНОСТЬ КАРТИНКИ */
    opacity: 0.5;
    z-index: 1;
}


/* Контент поверх фона */

.hero-slide .container {
    position: relative;
    z-index: 2;
    /* Поднимаем текст над фоном */
}

.hero-content {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Тень для текста, чтобы он "горел" на фоне */
}


/* Навигация поверх слайдера */

.home-slider__nav {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    /* Чтобы кнопки не перекрывали клики по слайду */
    z-index: 10;
}

.home-slider__arrow {
    pointer-events: auto;
    /* Возвращаем кликабельность кнопкам */
    margin: 0 20px;
}


/* Мобильная адаптация высоты */

@media (max-width: 768px) {
    .home-swiper {
        height: 500px;
    }
    .display-4 {
        font-size: 2rem;
    }
}


/* Центрирование контента в слайдере */

.hero-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide .container {
    z-index: 2;
    position: relative;
    /* Убеждаемся, что контейнер растягивается на всю высоту слайдера */
    height: 100%;
}


/* Стили для текста, чтобы он гарантированно был белым и читаемым */

.hero-content h2,
.hero-content .hero-text {
    color: #ffffff !important;
}


/* Если кнопки навигации мешают тексту по центру на мобилках */

@media (max-width: 768px) {
    .home-slider__nav {
        display: none;
        /* Часто на мобилках стрелки скрывают, оставляя только точки (pagination) */
    }
}


/* 1. Базовое состояние: текст ссылок белый */

#primary-menu .nav-link {
    color: #ffffff !important;
    opacity: 0.9;
    /* Слегка приглушим, чтобы был запас для яркости */
    transition: all 0.3s ease;
}


/* 2. Состояние при наведении (Hover): меняем на фиолетовый с белым фоном (или наоборот) */

#primary-menu .nav-link:hover {
    color: var(--color-bg) !important;
    /* Текст становится фиолетовым */
    background-color: #ffffff;
    /* Появляется белый фон */
    border-radius: 5px;
    /* Скруглим углы фона */
    opacity: 1;
}


/* 3. Активная страница (Current): чтобы сразу было видно, где мы */

#primary-menu .current-menu-item>a {
    color: var(--color-bg) !important;
    background-color: #ffffff !important;
    border-radius: 5px;
    opacity: 1;
}


/* Фикс для мобильного меню, чтобы там тоже всё было ок */

@media (max-width: 991px) {
    #primary-menu .nav-link {
        padding: 10px 15px !important;
        margin: 5px 0;
    }
}

.news-swiper {
    padding: 10px 10px 40px 10px;
    /* Место под точки внизу */
}

.news-swiper .card {
    transition: transform 0.3s ease;
}

.news-swiper .card:hover {
    transform: translateY(-5px);
}

.news-swiper .swiper-pagination-bullet {
    background: #fff;
    /* Белые точки, так как фон синий/фиолетовый */
}


/* footer */

.site-footer {
    margin-top: 70px;
    padding: 56px 0 34px;
    background: var(--color-bg-light);
    color: var(--color-text);
}

.site-footer__top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    padding-bottom: 46px;
    border-bottom: 1px solid var(--color-border);
}

.site-footer__title {
    margin: 0 0 18px;
    color: var(--color-text-dark);
    font-size: 20px;
    line-height: 1.25;
}

.site-footer__menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__menu li+li {
    margin-top: 10px;
}

.site-footer__menu a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.site-footer__menu a:hover {
    color: var(--color-link);
}

.site-footer__bottom {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 220px;
    gap: 32px;
    align-items: center;
    padding-top: 30px;
}

.site-footer__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: inherit;
    text-decoration: none;
}

.site-footer__logo svg {
    display: block;
    width: 150px;
    height: 40px;
}

.site-footer__info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    color: var(--color-text-muted);
    text-align: center;
    font-size: 15px;
}

.site-footer__slogan {
    width: 100%;
    color: var(--color-text-dark);
    font-weight: 700;
}

.site-footer__info a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.site-footer__info a:hover {
    color: var(--color-link);
}

.site-footer__socials {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.site-footer__social {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-link) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.25s ease;
}

.site-footer__social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.site-footer__social:hover {
    background: var(--color-link);
    color: var(--color-text-light) !important;
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .site-footer__bottom {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .site-footer__logo {
        justify-self: center;
    }
    .site-footer__socials {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .site-footer {
        margin-top: 50px;
        padding: 42px 0 30px;
    }
    .site-footer__top {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 34px;
    }
    .site-footer__bottom {
        gap: 24px;
        padding-top: 26px;
    }
}


/* =========================================================
   BUILDER TEMPLATE
========================================================= */

.builder-page {
    padding-bottom: 20px;
}

.builder-page__hero {
    padding: 64px 0 34px;
    text-align: center;
}

.builder-page__title {
    margin: 0;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
}


/* =========================================================
   BUILDER SECTION
========================================================= */

.builder-section {
    padding: 34px 0;
}

.builder-card {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.builder-section__title {
    margin: 0 0 18px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
}

.builder-section__text {
    font-size: 17px;
    line-height: 1.75;
}

.builder-section__text p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   TEXT + MEDIA
========================================================= */

.builder-text-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    gap: 42px;
    align-items: center;
}

.builder-text-media--reverse {
    grid-template-columns: 460px minmax(0, 1fr);
}

.builder-text-media--reverse .builder-text-media__media {
    order: -1;
}

.builder-text-media__content,
.builder-text-media__media {
    min-width: 0;
}

.builder-text-media__image-link {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.builder-text-media__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: cover;
    transition: transform 0.25s ease;
}

.builder-text-media__image-link:hover .builder-text-media__image {
    transform: scale(1.04);
}