/* =========================================
   БАЗОВЫЕ НАСТРОЙКИ СТРАНИЦЫ
========================================= */
.project-single {
    background-color: #ffffff !important;
    color: #333;
    min-height: 100vh;
}

.project-container {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0 10px;
}

.section-padding {
    padding: 80px 0;
}

/* =========================================
   SINGLE PAGE: ПЕРВЫЙ ЭКРАН (HERO)
========================================= */
.project-hero {
    position: relative;
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: stretch;
    color: #fff;
}

.project-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.project-hero__container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: 150px 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-hero__title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.1;
}

.project-hero__meta {
    display: flex;
    gap: 20px;
    font-size: 16px;
    opacity: 0.9;
}

.project-hero__bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.project-hero__slogan {
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 600;
    max-width: 500px;
    line-height: 1.3;
}

/* БАЛУН ЭКСПЕРТА */
.expert-balloon {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 350px;
    color: #333;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.expert-balloon:hover {
    transform: translateY(-5px);
}

.expert-balloon__avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e53935;
}

.expert-balloon__quote {
    font-size: 14px;
    font-style: italic;
    margin-bottom: 6px;
    line-height: 1.4;
}

.expert-balloon__author {
    font-size: 12px;
    color: #666;
}

.expert-balloon__author strong {
    color: #222;
}

/* =========================================
   SINGLE PAGE: БЛОК "О ПРОЕКТЕ"
========================================= */
.project-about__grid {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 60px;
    align-items: start;
}

.project-about__content,
.project-about__gallery {
    min-width: 0;
}

.project-about__title {
    font-family: "Times New Roman", Times, serif;
    font-size: 28px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: #444;
    line-height: 1.3;
}

.project-about__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-about__list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

.project-about__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background-color: #c4a477;
    border-radius: 50%;
}

.project-gallery-slider {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.project-gallery-slider__image {
    width: 100%;
    height: 450px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    background-color: #eee;
}

.project-gallery-slider__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 0 5px;
}

.swiper-pagination-fraction {
    font-size: 22px;
    color: #b5b5b5;
    font-weight: 300;
    letter-spacing: 2px;
    width: auto;
}

.project-gallery-slider__arrows {
    display: flex;
    gap: 12px;
}

.swiper-button-prev-custom,
.swiper-button-next-custom {
    width: 36px;
    height: 36px;
    background-color: #c4a477;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.swiper-button-prev-custom:hover,
.swiper-button-next-custom:hover {
    opacity: 0.8;
}

.swiper-button-prev-custom::after,
.swiper-button-next-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.swiper-button-prev-custom::after {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.swiper-button-next-custom::after {
    transform: rotate(45deg);
    margin-right: 4px;
}

@media (max-width: 992px) {
    .project-about__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-gallery-slider__image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .project-hero__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .project-about__title {
        font-size: 24px;
    }

    .project-gallery-slider__image {
        height: 300px;
    }
}

/* =========================================
   БАЗОВЫЕ НАСТРОЙКИ СЕКЦИИ НА ГЛАВНОЙ
========================================= */
.projects-section {
    background-color: #ffffff !important;
    color: #222222;
    padding: 80px 0;
}

.projects-section .section-title {
    color: #222222;
    font-size: 36px;
    margin-bottom: 20px;
}

/* =========================================
   ПАНЕЛЬ ФИЛЬТРОВ НА ГЛАВНОЙ
========================================= */
.projects-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 20px 0;
    /* border-bottom: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0; */
    /* margin-bottom: 40px; */
    font-family: Arial, sans-serif;
}

.filter-count {
    display: flex;
    align-items: center;
}

.filter-count__active {
    background: #333333;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-dropdown {
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    color: #333333;
    transition: all 0.2s;
}

.filter-dropdown:hover {
    background: #f5f5f5;
    border-color: #cccccc;
}

.filter-dropdown .arrow {
    font-size: 10px;
    margin-left: 6px;
    color: #888;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

.filter-btn--all {
    background: transparent;
    border: 1px solid #dddddd;
}

.filter-btn--all:hover {
    background: #f5f5f5;
}

/* =========================================
   СЕТКА ПРОЕКТОВ И КАРТОЧКА
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    width: 100%;
}

.project-card {
    position: relative;
    height: 550px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #222;
    transform: translateZ(0);
}

.project-card:hover .project-card__bg {
    transform: scale(1.05);
}

.project-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 1;
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 2;
}

.project-card__link {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 30px 20px;
    color: #fff;
    text-decoration: none;
}

.project-card__header {
    text-align: center;
}

.project-card__title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 5px;
    color: #fff;
    line-height: 1.1;
}

.project-card__developer {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.project-card__price {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.project-card__metro {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.project-card__footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-card__badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    max-width: 90%;
}

.badge--red {
    background: #e53935;
    color: #fff;
}

.badge--gray {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge--dark {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: #fff;
}

@media (max-width: 992px) {
    .projects-filter-bar {
        justify-content: flex-start;
    }
}

/* =========================================
   БЛОК ПЛАНИРОВОК (ПЛОТНЫЙ ДИЗАЙН)
========================================= */
.layouts-section {
    background-color: #ffffff !important;
    padding: 60px 0;
    font-family: Arial, sans-serif;
}

.layouts-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 15px;
    color: #333;
}

/* Шапка с табами и кнопкой */
.layouts-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.layouts-tabs {
    display: flex;
    gap: 10px;
    background: transparent;
    padding: 0;
    flex-wrap: wrap;
}

.layout-tab {
    padding: 10px 24px;
    border: 1px solid #eaeaea;
    border-radius: 40px;
    background: #ffffff;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
}

.layout-tab:hover {
    border-color: #ccc;
}

.layout-tab.active {
    background: #f5f5f5;
    border-color: #ddd;
    font-weight: 500;
}

/* Блок действия: Кнопка + Текст (ПК версия) */
.layouts-action-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 320px;
}

.btn-primary {
    background: #508b65;
    color: #fff;
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #3e7050;
}

.layouts-action-hint {
    font-size: 12px;
    color: #777;
    margin-top: 8px;
    line-height: 1.3;
    text-align: right;
}

.layouts-action-hint strong {
    color: #444;
}

/* =========================================================
   ОСНОВНАЯ СЕТКА ПЛАНИРОВОК: ПРОПОРЦИИ 2/3 (Главная) и 1/3 (Миниатюры) 
========================================================= */
.layouts-body {
    display: grid;
    /* 2fr - главная колонка, 1fr - боковая. Размеры 66.6% на 33.3% */
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 20px;
}

/* Центр: фото планировки */
.layouts-center {
    width: 100%;
    min-width: 0;
    /* Защита от разъезжания Swiper внутри Grid */
}

/* Фиксируем высоту, чтобы избежать бага с бесконечным увеличением (Resize Loop) */
.layouts-main-slider {
    width: 100%;
    height: 400px;
}

.layouts-main-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.layouts-main-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Право: Стрелки и миниатюры */
.layouts-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    /* Защита от разъезжания Swiper внутри Grid */
}

.layouts-nav {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.layouts-prev,
.layouts-next {
    position: static !important;
    margin: 0 !important;
}

/* Яркие рамки для неактивных миниатюр на ПК */
.layouts-thumbs-slider {
    width: 100%;
    height: auto !important;
}

.layouts-thumbs-slider .swiper-slide {
    height: auto !important;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px;
    border: 2px solid #508b65;
    /* Зеленая рамка для неактивных */
    border-radius: 8px;
    box-sizing: border-box;
    background: #fff;
}

.layouts-thumbs-slider .swiper-slide:hover {
    opacity: 1;
}

/* Активная миниатюра - отключаем цветную рамку (прозрачный бордер, чтобы не прыгали размеры) */
.layouts-thumbs-slider .swiper-slide-thumb-active {
    opacity: 1;
    border-color: transparent;
    cursor: default;
}

.layouts-thumbs-slider .swiper-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Подвал (Характеристики) */
.layouts-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    padding-top: 10px;
    color: #333;
    font-size: 16px;
    gap: 0;
}

.layout-meta-item {
    position: relative;
    padding-right: 25px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
}

.layout-meta-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 18px;
    background-color: #dcdcdc;
}

.layout-meta-item:last-child {
    padding-right: 0;
}

/* =========================================
   АДАПТИВ ДЛЯ БЛОКА ПЛАНИРОВОК (МОБИЛЬНЫЕ)
========================================= */
@media (max-width: 992px) {

    /* Верхняя панель */
    .layouts-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    /* Блок с кнопкой и текстом (выстраиваем в строку) */
    .layouts-action-block {
        order: -1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 15px;
        margin-bottom: 28px;
        /* Ровно 28px отступ до фильтров */
        max-width: 100%;
    }

    /* Текст рядом с кнопкой */
    .layouts-action-hint {
        text-align: left;
        margin-top: 0;
        font-size: 11px;
        flex: 1;
    }

    /* Кнопка на мобильных чуть компактнее */
    .layouts-action-block .btn-primary {
        padding: 12px 18px;
        font-size: 13px;
        flex-shrink: 0;
    }

    /* Компактные табы */
    .layout-tab {
        padding: 6px 11px;
        font-size: 14px;
    }

    .layouts-tabs {
        margin-bottom: 20px;
    }

    /* Сетка планировок */
    .layouts-body {
        display: block;
        /* Сбрасываем Grid для правильного абсолютного позиционирования */
        position: relative;
        margin-bottom: 15px;
    }

    .layouts-center {
        width: 100%;
    }

    /* Навигация (стрелки) идет наверх над фото, строго по центру высоты */
    .layouts-right {
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        transform: translateY(-50%);
        /* Выравниваем по оси Y ровно в центр */
        z-index: 10;
        pointer-events: none;
        /* Пропускаем клики сквозь контейнер, чтобы можно было свайпать фото */
        display: block;
    }

    .layouts-nav {
        display: flex;
        justify-content: space-between;
        /* Стрелки раскиданы по краям */
        width: 100%;
        margin: 0;
        padding: 0 10px;
        pointer-events: auto;
        /* Включаем клики обратно на самих стрелках */
    }

    /* Полностью скрываем миниатюры на мобильном */
    .layouts-thumbs-slider {
        display: none !important;
    }

    /* Подвал группируется компактно под фото */
    .layouts-footer {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px 15px;
        padding-top: 10px;
    }

    .layout-meta-item {
        padding-right: 0;
        font-size: 14px;
    }

    .layout-meta-item:not(:last-child)::after {
        display: none;
    }
}