/* Основные стили и переменные */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333333;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --white: #ffffff;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --section-spacing: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.property-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Хлебные крошки */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumbs a::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--dark-gray);
}

.breadcrumbs span {
    color: var(--dark-gray);
}

/* Галерея изображений */
.property-gallery {
    margin-bottom: var(--section-spacing);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--medium-gray);
    position: relative;
}

.gallery-main {
    height: 500px;
    width: 100%;
    position: relative;
}

.gallery-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--medium-gray);
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 500px;
}

.gallery-thumbs {
    height: 100px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.gallery-thumbs .swiper-slide {
    opacity: 0.6;
    transition: var(--transition);
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
}

.gallery-thumbs .swiper-slide:hover {
    opacity: 0.8;
}

.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid var(--secondary-color);
}

.gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-pagination {
    position: static;
    margin-top: 1rem;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--white);
    opacity: 0.7;
    transition: var(--transition);
}

.swiper-pagination-bullet-active {
    background: var(--secondary-color);
    opacity: 1;
    transform: scale(1.2);
}

/* Значки состояния на фото */
.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.status-badge.active {
    background-color: #4CAF50;
    color: white;
}

.status-badge.closed {
    background-color: #f44336;
    color: white;
}

/* Иконки действий в галерее */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-actions {
    display: flex;
    gap: 15px;
}

.gallery-action-btn {
    background-color: rgba(255,255,255,0.9);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.gallery-action-btn:hover {
    background-color: var(--white);
    transform: scale(1.1);
}

/* Счетчик фото */
.photo-counter {
    background-color: rgba(255,255,255,0.9);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: var(--dark-gray);
    cursor: pointer;
    z-index: 10;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-video {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 */
    position: relative;
}

.modal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-map {
    width: 100%;
    height: 500px;
}

/* Обзор характеристик */
.property-overview {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: var(--section-spacing);
    box-shadow: var(--box-shadow);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.overview-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    min-width: 2rem;
    text-align: center;
}

.overview-item-content {
    display: flex;
    flex-direction: column;
}

.overview-item span {
    font-size: 0.875rem;
    color: var(--dark-gray);
    margin-bottom: 0.25rem;
}

.overview-item strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Описание */
.property-description {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: var(--section-spacing);
    box-shadow: var(--box-shadow);
}

.description-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--medium-gray);
}

.description-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.price-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.badge {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.property-description h2 {
    font-size: 1.375rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.property-description h2 i {
    color: var(--secondary-color);
}

.description-content {
    line-height: 1.8;
    font-size: 1rem;
}

.short-description {
   margin-bottom: 1rem;
    font-size: 1rem;
   line-height: 1.7;
}
.full-description {
    margin-bottom: 1rem;
}

.read-more {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9375rem;
}

.read-more:hover {
    color: var(--primary-color);
}

.read-more i {
    transition: var(--transition);
}

@media (min-width: 768px) {
    .short-description {
        font-size: 1rem;
    }
}

/* Характеристики */
.property-features {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: var(--section-spacing);
    box-shadow: var(--box-shadow);
}

.property-features h2 {
    font-size: 1.375rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.property-features h2 i {
    color: var(--secondary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.feature-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
}

.feature-item span {
    font-size: 0.875rem;
    color: var(--dark-gray);
    margin-bottom: 0.25rem;
}

.feature-item strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Особенности */
.property-amenities {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: var(--section-spacing);
    box-shadow: var(--box-shadow);
}

.property-amenities h2 {
    font-size: 1.375rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.property-amenities h2 i {
    color: var(--secondary-color);
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
}

.amenity-item i {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Контакты */
.property-contact {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: var(--section-spacing);
    box-shadow: var(--box-shadow);
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.realtor-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
}

.realtor-info img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
    box-shadow: var(--box-shadow);
}

.realtor-info h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.realtor-info p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.phone-link, .whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
}

.phone-link {
    background-color: var(--accent-color);
    color: var(--white);
}

.whatsapp-link {
    background-color: #25D366;
    color: var(--white);
}

.phone-link:hover, .whatsapp-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.phone-link:active, .whatsapp-link:active {
    transform: translateY(0);
}

/* Адаптивность */
@media (min-width: 576px) {
    .property-page {
        padding: 1.5rem;
    }
    
    .realtor-info {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }
    
    .contact-methods {
        flex-direction: row;
    }
    
    .phone-link, .whatsapp-link {
        flex: 1;
    }
}

@media (min-width: 768px) {
    .description-header h1 {
        font-size: 2rem;
    }
    
    .price {
        font-size: 1.75rem;
    }
    
    .gallery-main {
        height: 600px;
    }
    
    .gallery-main img {
        max-height: 600px;
    }
}

@media (min-width: 992px) {
    .property-page {
        padding: 2rem;
    }
    
    .contact-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .realtor-info {
        flex: 1;
    }
    
    .contact-methods {
        flex: 0 0 300px;
        margin-left: 2rem;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.property-overview,
.property-description,
.property-features,
.property-amenities,
.property-contact {
    animation: fadeIn 0.5s ease-out forwards;
}

.property-overview { animation-delay: 0.1s; }
.property-description { animation-delay: 0.2s; }
.property-features { animation-delay: 0.3s; }
.property-amenities { animation-delay: 0.4s; }
.property-contact { animation-delay: 0.5s; }

/* Утилиты */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* для кнопки мои объявления */
.listings-button {
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
    margin-top:  2px;
}

.listings-button:hover {
    background: #45a049;
}

/* Добавим в конец файла для кнопки обновления в админ */
.update-confirm-btn {
    background-color: #f59e0b;
    color: white;
}

.update-confirm-btn:hover {
    background-color: #d97706;
}

/* Стили для стрелок навигации галереи */
.swiper-button-prev,
.swiper-button-next {
    opacity: 0.5 !important; /* Полупрозрачность */
    transition: opacity 0.3s ease !important;
    color: white !important; /* Цвет стрелок */
    background: rgba(0, 0, 0, 0.3) !important; /* Фон кнопок */
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    opacity: 0.9 !important; /* Увеличиваем прозрачность при наведении */
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 20px !important; /* Размер иконки стрелки */
}

/* Для мобильных устройств можно уменьшить размер */
@media (max-width: 768px) {
    .swiper-button-prev,
    .swiper-button-next {
        width: 30px !important;
        height: 30px !important;
    }
    
    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 16px !important;
    }
}