/* Кастомные стили для сайта "Аренда коттеджей в Московской области" */

:root {
    --primary-color: #2C3E50;
    --secondary-color: #27AE60;
    --accent-color: #E74C3C;
    --natural-color: #8B4513;
    --warm-color: #F39C12;
    --light-bg: #ECF0F1;
    --success-green: #27AE60;
    --warning-orange: #F39C12;
}

/* Hero секция */
.hero-section {
    background: linear-gradient(135deg, var(--success-green) 0%, var(--primary-color) 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400" preserveAspectRatio="none"><path d="M0,200 Q300,100 600,200 T1200,200 L1200,400 L0,400 Z" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

/* Форма поиска */
.hero-search {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-group {
    display: flex;
    flex-direction: column;
}

.search-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.search-input {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--success-green);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.search-button {
    background: var(--success-green);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.search-button:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Карточки коттеджей */
.cottage-card {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

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

.cottage-image {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.cottage-card .card-img-wrapper {
    overflow: hidden;
}

/* Исправление перекрытия бейджей */
.cottage-card .badge.position-absolute {
    z-index: 5;
}

.cottage-card .card-title {
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
}

/* Улучшение отображения изображений */
.cottage-card img {
    transition: transform 0.3s ease;
}

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

.price-tag {
    background: rgba(39, 174, 96, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

.amenities {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.amenity-icon {
    width: 28px;
    height: 28px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.amenity-icon:hover {
    background: var(--success-green);
    color: white;
    transform: scale(1.1);
}

.amenity-more {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Фильтры */
.amenities-filter {
    max-height: 200px;
    overflow-y: auto;
}

.form-check {
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

/* Навигация */
.navbar {
    background: linear-gradient(135deg, var(--success-green) 0%, #229954 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Преимущества */
.feature-box {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success-green) 0%, #229954 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

/* Секции */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 3rem;
    text-align: center;
}

/* Подвал */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 100%);
}

/* Модальные окна */
.modal-header {
    border-bottom: none;
}

.modal-footer {
    border-top: none;
}

/* Пагинация */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    margin: 0 2px;
    border-radius: 8px;
}

.pagination .page-link:hover {
    background: var(--light-bg);
    border-color: var(--success-green);
    color: var(--success-green);
}

.pagination .page-item.active .page-link {
    background: var(--success-green);
    border-color: var(--success-green);
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .amenities {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-search {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .cottage-image {
        height: 200px;
    }
    
    .feature-box {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Формы */
.form-control:focus {
    border-color: var(--success-green);
    box-shadow: 0 0 0 0.2rem rgba(39, 174, 96, 0.25);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green) 0%, #229954 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Badge */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

/* Улучшение readability */
.text-muted {
    color: #6c757d !important;
}

.small {
    font-size: 0.875em;
}

/* Scrollbar для фильтров */
.amenities-filter::-webkit-scrollbar {
    width: 6px;
}

.amenities-filter::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.amenities-filter::-webkit-scrollbar-thumb {
    background: var(--success-green);
    border-radius: 3px;
}

.amenities-filter::-webkit-scrollbar-thumb:hover {
    background: #229954;
}

/* Улучшение адаптивности каталога */
@media (max-width: 1200px) {
    .col-xl-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .col-xl-4,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .cottage-card {
        min-width: auto !important;
    }
}

/* Улучшение переноса текста */
.cottage-card .card-title a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Исправление для очень узких экранов */
@media (max-width: 350px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}