/* ===== ОСНОВНЫЕ СТИЛИ ===== */
.objects-page {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 0;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

/* ===== ЗАГОЛОВОК СТРАНИЦЫ ===== */
.page-header {
    background: white;
    padding: 40px 0;
    margin-bottom: 40px;
    position: relative;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-align: center;
    color: #2c5530;
}

.title-icon {
    display: none;
}

.page-subtitle {
    font-size: 1.1rem;
    text-align: center;
    margin: 0;
    font-weight: 400;
    color: #7f8c8d;
}

/* ===== СЧЕТЧИК ОБЪЕКТОВ ===== */
.objects-counter {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #3498db;
}

.counter-text {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* ===== СЕТКА ОБЪЕКТОВ ===== */
.objects-section {
    padding: 20px 0 60px 0;
}

.objects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    max-width: 100%;
}

/* Когда только 1 объект, ограничиваем ширину */
.objects-grid:has(.object-card:only-child) {
    grid-template-columns: minmax(350px, 600px);
    justify-content: center;
}

/* Альтернативный способ для браузеров без поддержки :has() */
.objects-grid .object-card:only-child {
    max-width: 600px;
    margin: 0 auto;
}

/* ===== КАРТОЧКА ОБЪЕКТА ===== */
.object-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e9ecef;
}

.object-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.object-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ===== ИЗОБРАЖЕНИЕ ОБЪЕКТА ===== */
.object-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.object-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(52, 73, 94, 0.8), rgba(44, 62, 80, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.object-card:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.view-text {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== КОНТЕНТ КАРТОЧКИ ===== */
.object-content {
    padding: 20px;
    position: relative;
}

.object-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.object-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.object-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
    white-space: nowrap;
}

.badge-text {
    display: block;
}

/* ===== ИНФОРМАЦИЯ ОБ ОБЪЕКТЕ ===== */
.object-info {
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 0;
}

.info-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-text {
    font-size: 0.9rem;
    color: #555;
    font-weight: 400;
    line-height: 1.4;
}

.info-item.location .info-icon {
    color: #27ae60;
}

.info-item.status .info-icon {
    color: #f39c12;
}

/* ===== КНОПКА ДЕЙСТВИЯ ===== */
.object-actions {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.action-button {
    width: 40px;
    height: 40px;
    background: #005838;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.action-button svg {
    color: white;
    transition: transform 0.3s ease;
}

.object-card:hover .action-button {
    background: #f59303;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.object-card:hover .action-button svg {
    transform: translateX(2px);
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.no-objects {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-text {
    font-size: 1rem;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.5;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.object-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* ===== АДАПТИВНЫЙ ДИЗАЙН ===== */
@media (max-width: 1200px) {
    .objects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .title-icon {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .objects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .object-image {
        height: 200px;
    }
    
    .object-content {
        padding: 18px;
    }
    
    .object-title {
        font-size: 1.2rem;
    }
    
    .object-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .object-badge {
        margin-left: 0;
        margin-top: 8px;
        align-self: flex-start;
    }
    
    .action-button {
        width: 36px;
        height: 36px;
        bottom: 18px;
        right: 18px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .objects-grid {
        gap: 15px;
    }
    
    .object-image {
        height: 180px;
    }
    
    .object-content {
        padding: 15px;
    }
    
    .object-title {
        font-size: 1.1rem;
    }
    
    .info-text {
        font-size: 0.85rem;
    }
    
    .action-button {
        width: 32px;
        height: 32px;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ===== */
html {
    scroll-behavior: smooth;
}

/* Улучшенные тени */
.object-card {
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 4px 15px rgba(0, 0, 0, 0.08);
}

.object-card:hover {
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Улучшенная типографика */
.object-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.info-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Плавные переходы */
* {
    transition: all 0.3s ease;
}

/* Убираем анимацию bounce для иконки */
.title-icon {
    animation: none;
}

/* ===== СТИЛИ ДЛЯ КАРТЫ ===== */
#yandex-map {
    position: relative;
    z-index: 1;
}

/* Стили для балуна Яндекс.Карт */
.ymaps-2-1-79-balloon {
    z-index: 10000 !important;
}

.ymaps-2-1-79-balloon__content {
    padding: 0 !important;
}

.ymaps-2-1-79-balloon__tail {
    z-index: 10001 !important;
}

.map-balloon {
    padding: 15px;
    min-width: 200px;
    max-width: 300px;
}

.map-balloon-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c5530;
    line-height: 1.4;
}

.map-balloon-body {
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.map-balloon-body p {
    margin: 5px 0;
}

.map-balloon-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.map-balloon-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #005838;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.map-balloon-link:hover {
    background-color: #004028;
    color: white !important;
    text-decoration: none;
}

/* Предотвращаем конфликты с другими скриптами */
.ymaps-2-1-79-balloon__close {
    z-index: 10002 !important;
}

/* Отключаем pointer-events для элементов карты, которые могут вызывать конфликты */
.ymaps-2-1-79-balloon__content * {
    pointer-events: auto;
}

.ymaps-2-1-79-balloon__content a {
    pointer-events: auto;
    cursor: pointer;
}