/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    max-width: 900px;
    margin: 50px auto;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.5s ease;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-gallery {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.gallery-nav button {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-nav button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gallery-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-dot.active {
    background: white;
}

.modal-body {
    padding: 30px;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.modal-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
    margin-bottom: 20px;
}

.modal-description {
    color: var(--gray);
    margin-bottom: 25px;
    line-height: 1.7;
}

.modal-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.modal-feature {
    background: #f0f7f0;
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-icon {
    width: 40px;
    height: 40px;
    background: #f0f7f0;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.detail-text h4 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 3px;
}

.detail-text p {
    font-weight: 600;
    color: var(--dark);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffc107;
    font-weight: 600;
}

@media (max-width: 992px) {
    .modal-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .modal-gallery {
        height: 250px;
    }
}