/* ============================================
   СЕКЦИЯ ПРЕИМУЩЕСТВА КВАРТАЛА
   ============================================ */

.advantages-section {
    padding: 80px 0 100px;
    background: #f9f9f9;
}

.advantages-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.advantages-title {
    font-family: 'Manrope', sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0 0 50px 0;
}

/* ========== СЕТКА КАРТОЧЕК ========== */
/* ========== СЕТКА КАРТОЧЕК ========== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 20px;
    margin-bottom: 50px;
}

/* Карточка преимущества */
.advantage-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Изображение */
.advantage-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.advantage-card:hover img {
    transform: scale(1.05);
}

/* Наложение с текстом */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
}

.card-overlay h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* Специфичные размеры карточек по позициям */
/* Ряд 1 */
.advantage-card:nth-child(1) {
    /* Высота потолков */
    grid-column: 1;
    grid-row: 1 / span 2;
}

.advantage-card:nth-child(2) {
    /* Инклюзивная детская площадка */
    grid-column: 2;
    grid-row: 1;
}

.advantage-card:nth-child(3) {
    /* Фитнес зал */
    grid-column: 3;
    grid-row: 1 / span 2;
}

.advantage-card:nth-child(4) {
    /* Кинорум */
    grid-column: 4;
    grid-row: 1;
}

/* Ряд 2 */
.advantage-card:nth-child(5) {
    /* Street retail */
    grid-column: 1;
    grid-row: 3 / span 2;
}

.advantage-card:nth-child(6) {
    /* Йога room */
    grid-column: 2;
    grid-row: 2 / span 2;
}

.advantage-card:nth-child(7) {
    /* Ландшафтный дизайн */
    grid-column: 3;
    grid-row: 3 / span 2;
}

.advantage-card:nth-child(8) {
    /* Всесезонная игровая зона */
    grid-column: 4;
    grid-row: 2 / span 2;
}

/* Ряд 3 */
.advantage-card:nth-child(9) {
    /* Зона барбекю */
    grid-column: 1;
    grid-row: 5 / span 2;
}

.advantage-card:nth-child(10) {
    /* Workout площадка */
    grid-column: 2;
    grid-row: 4;
}

.advantage-card:nth-child(11) {
    /* Удобный вызов лифта */
    grid-column: 3 / span 2;
    grid-row: 5 / span 2;
}


/* ============================================
   МОДАЛЬНОЕ ОКНО
   ============================================ */

.advantage-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.advantage-modal.active {
    display: flex;
}

/* Затемнение фона */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Контент модального окна */
.modal-content {
    position: relative;
    background: #fff;
    border-radius: 30px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Кнопка закрытия */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1a1a1a;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Тело модального окна */
.modal-body {
    display: flex;
    flex-direction: row;
}

/* Левая часть - изображение */
.modal-image {
    flex: 0 0 50%;
    max-height: 600px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Правая часть - описание */
.modal-description {
    flex: 1;
    padding: 50px 40px;
    overflow-y: auto;
    max-height: 600px;
}

.modal-description h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.modal-description p {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    line-height: 26px;
    color: #717676;
    margin: 0 0 15px 0;
}

.modal-description p:last-child {
    margin-bottom: 0;
}