/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden; /* Блокируем скроллинг при открытом попапе */
}

/* Подключаем шрифты */
@font-face {
    font-family: 'Involve';
    src: url('/wp-content/themes/contentbureau2/assets/style/fonts/involve/Involve-Regular.woff') format('woff'),
         url('/wp-content/themes/contentbureau2/assets/style/fonts/involve/Involve-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Athelas';
    src: url('/wp-content/themes/contentbureau2/assets/style/fonts/athelas/Athelas-Regular.woff') format('woff'),
         url('/wp-content/themes/contentbureau2/assets/style/fonts/athelas/Athelas-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* Страница конкретного кейса */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    font-family: 'Involve', serif; /* Шрифт для хлебных крошек */
    color: #666;
    margin-top: 50px;
}

.breadcrumbs a {
    color: #0073aa;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #333;
}

.case-title {
    font-size: 32px;
    margin-bottom: 20px;
    font-family: 'Athelas', serif; /* Шрифт для заголовка */
    color: #333;
}

.case-divider {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 20px 0;
    width: 100%;
}

.case-content {
    font-family: 'Involve', serif; /* Шрифт для основного текста */
    line-height: 1.6;
    color: #333;
    margin-bottom: 50px;
}

.case-content p {
    margin-bottom: 15px;
}

/* Корректировка списков */
.case-content ul,
.case-content ol {
    margin-left: 20px; /* Сдвигаем списки правее относительно текста */
    padding-left: 20px; /* Добавляем внутренний отступ для маркеров/нумерации */
}

.case-content li {
    margin-bottom: 10px;
}

/* Основной контейнер для гибкости и фиксации футера */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Растягиваем на всю высоту экрана */
}

.container {
    max-width: 1270px; /* Максимальная ширина сетки */
    width: 100%;
    margin: 0 auto;
    padding: 0 15px; /* Отступы по бокам для мобильных устройств */
}

/* Первый экран */
.hero-section {
    flex: 1; /* Растягиваем для фиксации футера */
    background: #272729; /* Цвет фона */
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

.main-nav {
    padding: 20px 0;
}

.header_line {
    border-bottom: 3px solid white;
    margin-top: 10px;
    max-width: 1270px;
    width: 100%;
    height: 3px;
}

.nav-content {
    display: flex;
    align-items: center;
    /* justify-content: space-between; */
}

.logo {
    font-size: 24px;
    color: #fff;
    font-family: 'Athelas', serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
    justify-content: space-between;
    margin-left: 30px;
    flex: 1;
}

.menu-left {
    list-style: none;
    display: flex;
    gap: 20px;
}

.menu-left a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Involve', sans-serif;
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-right img {
    width: 30px;
}

.icon {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
}

.phone {
    color: #fff;
    font-size: 16px;
}

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px 0;
    background-repeat: no-repeat; /* Запрещаем повторение */
    background-position: center; /* Центрируем */
    background-size: contain;
    margin-top: 30px;
    margin-bottom: 60px;
    position: relative;
}

.hero-content h1 {
    font-family: 'Athelas', serif;
    color: #fff;
    font-size: 144px;
    font-weight: 100;
    line-height: 1.2;
}

.hero-btn {
    margin-top: 20px;
    /* width: 60%; */
    border-radius: 20px;
    background-color: #000;
    border: 1px solid white;
    outline: 1px solid white; /* Чёрный контур */
    outline-offset: 5px;
    color: white;
    padding: 11px 21px;
    margin-top: 20px;
    font-size: 20px;
    text-transform: uppercase;
    position: absolute;
    top: 377px;
    cursor: pointer;
}

.header_text {
    border: 1px solid white;
    text-align: center;
    max-width: 40%;
    padding: 20px;
    margin: auto;
    margin-top: 30px;
    margin-bottom: 30px;
    color: white;
}

/* Блок услуги */
.service-section {
    padding: 50px 0;
}

.service-section:nth-of-type(even) {
    background: #ece6d5; /* Цвет фона для чётных блоков */
}

.service-section:nth-of-type(even) .couple {
    flex-direction: row-reverse;
}

.service-content {
    display: flex;
    flex-direction: column; /* Вертикальная структура */
    gap: 20px;
}

.cases-title {
    display: block; /* Делаем элемент блочным */
    border-radius: 20px;
    background-color: #000;
    border: 1px solid black;
    outline: 1px solid black; /* Чёрный контур */
    outline-offset: 5px;
    color: white;
    padding: 11px 21px;
    margin-top: 20px;
    font-size: 16px;
    text-transform: uppercase;
    text-align: center;
    font-family: 'Athelas', serif;
    margin-right: auto;
    margin-left: auto;
    width: 60%;
    margin-bottom: 30px;
}


.service-main {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start; /* Выравнивание по верхнему краю */
    margin: 0 auto;
    width: 90%;
    flex-wrap: wrap;
}

.couple {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap; /* Позволяет перенос элементов */
    gap: 20px;
    flex: 1;
}

.service-sidebar {
    background: #171313; /* Чёрный фон везде */
    color: #fff;
    writing-mode: vertical-rl;
    text-align: center;
    padding: 20px;
    font-size: 50px;
    min-width: 100px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 0; /* Минимальная высота по содержимому текста */
    font-family: 'Athelas', serif;
}

.service-section.even .service-sidebar {
    order: 1; /* Справа на чётных на десктопе */
}

.sidebar-icon {
    width: 40px;
    height: 40px;
    margin: 0 10px;
}

.service-section .sidebar-icon {
    order: 1; /* Картинка справа от текста на нечётных */
}

.service-section.even .sidebar-icon {
    order: 0; /* Картинка слева от текста на чётных */
}

.service-text {
    flex: 1;
    margin-left: 50px;
}


.tab-buttons {
    display: flex;
    /* justify-content: space-between; Равномерное распределение кнопок */
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap; /* Запрещаем перенос кнопок на новую строку */
    margin-bottom: 50px;
}

.tab-btn {
    flex: 1; /* Равномерное распределение по ширине */
    min-width: 120px; /* Минимальная ширина кнопок */
    max-width: 250px; /* Чтобы кнопки не были слишком большими */
    aspect-ratio: 3 / 1; /* Сохранение овальной формы */
    border: none;
    background: #000000;
    cursor: pointer;
    border-radius: 50%; /* Делаем кнопки овальными */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    /* font-size: clamp(12px, 2vw, 18px); */
    font-size: 1vw;
    padding: 0.5em 1em; /* Поддержка адаптивности */
    transition: background 0.3s ease, color 0.3s ease;
    outline: 2px solid #000; /* Чёрный контур */
    outline-offset: 5px; /* Отступ между кнопкой и контуром */
    margin-right: 10px;
    font-family: 'Athelas', serif;
}

.tab-btn:last-child {
    margin-right: 0; /* Убираем отступ у последней кнопки */
}

.tab-btn.active {
    background: #808080; /* Серый цвет активной кнопки */
    color: #fff; /* Белый текст */
    border-color: #000;
}

.w_couple_text {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* Гибкая адаптация под маленькие экраны */
@media (max-width: 768px) {
    .tab-buttons {
        gap: 5px; /* Уменьшаем расстояние между кнопками */
    }

    .tab-btn {
        min-width: 90px; /* Минимальная ширина кнопок на мобилке */
        /* font-size: clamp(14px, 3vw, 16px); */
        font-size: 3vw;

    }

    .header_text {
        max-width: 80%;
    }
}




.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

.tab-content.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    width: 100%;
}


.tab-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
    font-family: 'Athelas', serif;
    border-bottom: 1px solid black;
    margin-bottom: 20px;
}

.tab-content p {
    font-size: 16px;
    font-family: 'Involve', serif;
}

.service-stats {
    display: flex;
    gap: 20px;
    flex-direction: column; /* Расположение в строку */
    justify-content: space-between; /* Равномерное распределение элементов */
    align-items: center; /* Выравнивание элементов по центру */
    font-family: 'Athelas', serif;
    align-items: flex-end;

}

.stat-item {
    text-align: right;
    flex: 1;
}

.stat-number {
    font-size: 60px;
    display: block;
}


/* CEO блок */

.ceo-section {
    background:#ece6d5;
    width: 100%;
    justify-content: space-between;
    align-content: center;
}

.ceo-content {
    display: flex;
    flex-direction: row;
    gap: 3vw;
    margin-bottom: 100px;
}

.ceo-text {
    flex: 1;
    font-family: 'Involve', serif;
}

.ceo-text > h2 {
    font-family: 'Athelas', serif;
    border-bottom: 1px solid black;
    margin-bottom: 10px;
}

.ceo-photo {
    flex: 2;
    /* width: 40%; */
}

.ceo-photo > img {
    width: 100%;
    height: auto;
}

.ceo_line {
    border-bottom: 1px solid #000;
}

.ceo-sidebar {
    min-width: 80px;
    min-height: 0; /* Минимальная высота по содержимому */
    max-height: none; /* Убираем ограничение, высота по .service-text */
    padding: 25px;
    flex: 0.5;
    text-align: center;
    background-color: #000;
    writing-mode: vertical-rl;
    color: #fff;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: 5vw;
    rotate: 180deg;
    font-family: 'Athelas', serif;
}


@media (max-width: 768px) {
    .ceo-content {
        display: flex;
        flex-wrap: wrap;
    }

    .hero-btn {
        top: 234px;
    }

    .ceo-text {
        flex: 2; /* Больше места */
        min-width: 60%;
        order: 1;
    }

    .ceo-sidebar {
        flex: 1; /* Меньше места */
        min-width: 30%;
        order: 2;
    }

    .ceo-photo {
        flex-basis: 100%; /* Занимает всю ширину на следующей строке */
        order: 3;
    }

    .couple {
      gap: 1px;
    }
}


.form-main {
    background-color: #232323;
    display: flex;
    color: white;
}

.footer_form {
    display: flex;
    flex-direction: row;
    border: 1px solid white;
    gap: 20px;
    border-radius: 30px;
    justify-content: space-between;
    padding: 31px 58px;
    margin: auto;
    width: 60%;
    margin-bottom: 100px;
    margin-top: 100px;
}

.form_content {
    display: flex;
    flex-direction: column;
    flex: 2;
    min-height: 100%;
    justify-content: space-between;
}

.form_icons {
    display: flex;
    /* justify-content: space-between; */
}

.icons_group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 30%;
    margin-right: 30px;
}

.icons_group > a > img {
    width: 25px;
    height: auto;
}

.form_icons > p {
    color: white;
}

p.inputs_text {
    font-size: 13px;
    margin-bottom: 10px;
    color: white;
}

p.form_header {
    font-size: 30px;
    font-family: 'Athelas', serif;
}

p.form_desc {
    font-size: 40px;
    font-family: 'Athelas', serif;
}

.form_inputs {
    display: flex;
    flex-direction: column;
    flex: 1.5;
    width: 50%;
}

.form-group {
    position: relative;
}

.form-group > input {
    height: 40px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid white;
    width: 100%;
    padding: 12px 10px;
    margin-bottom: 10px;
    color: white;
}

.form-group > label {
    position: absolute;
    left: 12px;
    top: 40%;
    transform: translateY(-50%);
    font-size: 12px;
    color: white;
    transition: all 0.3s ease;
    pointer-events: none;
}



input:focus + label,
input:not(:placeholder-shown) + label {
    top: 5px;
    left: 10px;
    font-size: 10px;
    color: white;
}

.form_inputs > button {
    border-radius: 20px;
    background-color: #000;
    border: 1px solid white;
    outline: 1px solid white; /* Чёрный контур */
    outline-offset: 5px;
    color: white;
    padding: 11px 21px;
    margin-top: 20px;
    font-size: 20px;
}



@media (max-width: 768px) {
    .footer_form {
        flex-direction: column;
        width: 80%;
        padding: 30px 30px;
    }

    .form_inputs {
        align-items: center;
        width: 100%;
    }

    .form-group {
        width: 100%;
    }
}

/* Адаптация под мобильные устройства */
@media (max-width: 768px) {
    .service-content {
        flex-direction: column; /* Переключаем на вертикальный режим */
        align-items: center;
    }

    .service-main {
        flex-direction: column; /* Переключаем на вертикальный режим */
        align-items: center;
        width: 100%;
    }

    .nav-content {
        justify-content: space-between;
    }

    .header_line {
        display: none;
    }

    .logo {
        visibility: hidden;
    }

    .service-stats {
        flex-direction: row; /* Располагаем элементы в строку */
        width: 100%; /* Растягиваем на всю ширину контейнера */
        gap: 10px;
        justify-content: space-around;
    }
}

/* .cases-title {
    margin: 40px 0 20px;
    font-size: 17px;
} */

.cases-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
}

.case-item {
    flex: 0 0 calc(33.33% - 13.33px);
    height: 200px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

a.case-item {

    text-decoration: none;
    color: black;
    font-weight: bold;
    font-family: 'Athelas', serif;
    background: none;
    border: 1px solid black;
    font-size: 24px;
    text-align: center;

}

.carousel-arrow {
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1;
}

.carousel-arrow > img {
    width: 40px;
}

img.sidebar-icon {
    width: 64px;
    height: auto;
}

.left {
    margin-right: 10px;
}

.right {
    margin-left: 10px;
}

.cta-block {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

.cta-text {
    font-size: 18px;
}

.cta-btn {
    padding: 10px 20px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
}

/* Футер */
.footer {
    background: #272729;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

/* Popup */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
}

.popup {
    background: #fff;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup {
    transform: scale(1);
}

.case-popup-content {
    max-height: 80vh;
    overflow-y: auto;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.popup h2 {
    margin-bottom: 20px;
}

.popup form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup input, .popup textarea {
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.popup button {
    padding: 10px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    .nav-links {
        display: block;
        visibility: hidden;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #272729;
        padding: 20px;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
        margin-left: 0;
    }

    .nav-links.active {
        visibility: visible;
        opacity: 1;
        z-index: 1;
        transform: translateY(0);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
    }

    .menu-left, .menu-right {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .burger-menu {
        display: flex;
    }

    .hero-content h1 {
        font-size: 80px;
        
    }

    .service-main {
        flex-direction: row;
        flex-wrap: wrap; /* Запрещаем перенос для строгого порядка */
        width: 100%;
    }

    .service-sidebar {
        min-width: 80px;
        min-height: 0; /* Минимальная высота по содержимому */
        max-height: none; /* Убираем ограничение, высота по .service-text */
        padding: 0;
    }

    .service-section .service-sidebar {
        order: 0; /* Слева на нечётных */
    }

    .service-section.even .service-sidebar {
        order: 1; /* Справа на чётных */
    }

    .service-section .service-text {
        order: 1; /* Справа на нечётных */
    }

    .service-section.even .service-text {
        order: 0; /* Слева на чётных */
    }

    .service-stats {
        flex: 1 1 100%; /* C занимает всю ширину */
        order: 3; /* Переносим C вниз */
        flex-direction: row;
        margin-top: 20px;
    }

    .case-item {
        flex: 0 0 calc(100% - 0px);
    }

    .carousel-arrow {
        position: static;
    }

    .carousel-arrow > img {
        width: 56px;
    }

    .cta-block {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}