/* =================================
   Reality Portal - Hlavný CSS súbor
   ================================= */



/* ---------- Globálne zmenšenie ---------- */
body {
    zoom: 0.85;
}



/* ---------- Základné premenné ---------- */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ---------- Globálne štýly ---------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

a {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ---------- Hero sekcia ---------- */
.hero-section {
    position: relative;
    overflow: hidden;
}


.hero-background {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%),
        url('/static/images/hero-bg.jpg') center/cover no-repeat;
    z-index: 0;
}

/* ---------- Vyhľadávací panel ---------- */
.search-panel {
    max-width: 1100px;
    margin: 0 auto;
}

.search-panel .form-control,
.search-panel .form-select {
    border: 2px solid #e9ecef;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel .form-control:focus,
.search-panel .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ---------- Autocomplete suggestions ---------- */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    box-shadow: var(--box-shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

/* ---------- Category dropdown ---------- */
#categoryDropdown {
    max-height: 400px;
    overflow-y: auto;
}

.category-item {
    padding: 5px 0;
}

.subcategories {
    border-left: 2px solid #e9ecef;
    padding-left: 15px;
}

/* ---------- Property cards ---------- */
.property-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg) !important;
}

.property-card .card-img-top {
    transition: transform 0.3s ease;
}

.property-card:hover .card-img-top {
    transform: scale(1.05);
}

.property-card .position-relative {
    overflow: hidden;
}

/* ---------- Category cards ---------- */
.category-card {
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg) !important;
}

.category-card .category-icon {
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* ---------- Mapa ---------- */
#map {
    border: 3px solid white;
    z-index: 1;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 10px;
}

/* ---------- Navbar ---------- */
.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    padding: 0.5rem 1rem !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow-lg);
    border-radius: var(--border-radius);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    border-radius: var(--border-radius);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ---------- Badges ---------- */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* ---------- Feature icons ---------- */
.feature-icon {
    box-shadow: var(--box-shadow);
}

/* ---------- Footer ---------- */
footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
}

footer a:hover {
    color: white !important;
}

/* ---------- Alerts ---------- */
.alert {
    border: none;
    border-radius: var(--border-radius);
}

/* ---------- Property detail page ---------- */
.property-gallery {
    position: relative;
}

.property-gallery .main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.property-gallery .thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
}

.property-gallery .thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.property-gallery .thumbnail:hover,
.property-gallery .thumbnail.active {
    opacity: 1;
}

.property-info-card {
    position: sticky;
    top: 80px;
}

.property-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.property-feature {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.property-feature i {
    width: 30px;
    color: var(--primary-color);
}

/* ---------- Property list page ---------- */
.filter-sidebar {
    position: sticky;
    top: 80px;
}

.property-list-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.property-list-item:hover {
    box-shadow: var(--box-shadow-lg);
}

.property-list-item .property-image {
    width: 250px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius);
    flex-shrink: 0;
}

.property-list-item .property-content {
    flex: 1;
}

/* ---------- Pagination ---------- */
.pagination {
    gap: 5px;
}

.page-link {
    border-radius: var(--border-radius) !important;
    border: none;
    color: var(--primary-color);
}

.page-link:hover {
    background-color: #e9ecef;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
}

/* ---------- User profile ---------- */
.profile-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--box-shadow);
}

/* ---------- Dashboard stats ---------- */
.stat-card {
    border: none;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
}

/* ---------- Messages / Inbox ---------- */
.message-item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.message-item:hover {
    background-color: #f8f9fa;
}

.message-item.unread {
    background-color: #e7f1ff;
}

.message-item.unread:hover {
    background-color: #d0e3ff;
}

/* ---------- Loading spinner ---------- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .search-panel {
        padding: 1rem !important;
    }
    
    .property-list-item {
        flex-direction: column;
    }
    
    .property-list-item .property-image {
        width: 100%;
        height: 200px;
    }
    
    .property-features {
        grid-template-columns: 1fr;
    }
    
    #map {
        height: 350px !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .property-gallery .main-image {
        height: 250px;
    }
}

/* ---------- Utility classes ---------- */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: var(--box-shadow-lg) !important;
}

.rounded-4 {
    border-radius: 1rem !important;
}