/* RealEstate Hub - Custom Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-radius: 0.5rem;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
}

/* ==================== Header/Navbar ==================== */

.navbar {
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    color: #333 !important;
    font-weight: 700;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.navbar-nav .nav-link {
    margin-left: 0.5rem;
    font-weight: 500;
    color: #555 !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: #555;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

/* ==================== Hero Section ==================== */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-box {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-top: 2rem;
}

.search-box .form-group {
    margin-bottom: 1rem;
}

.search-box label {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.search-box .form-control,
.search-box .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box .form-control:focus,
.search-box .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* ==================== Category Cards ==================== */

.category-card {
    text-align: center;
    padding: 2rem;
    border: none;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h5 {
    color: #333;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
}

/* ==================== Listing Cards ==================== */

.listing-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.listing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.listing-card-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

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

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

.listing-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.listing-card-badge.sold {
    background: var(--danger-color);
}

.listing-card-badge.featured {
    background: var(--accent-color);
    color: #333;
}

.listing-card-body {
    padding: 1.5rem;
}

.listing-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-card-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.listing-card-location i {
    color: var(--primary-color);
    margin-right: 0.3rem;
}

.listing-card-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.listing-card-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.listing-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.listing-card-features {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.listing-card-features span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ==================== Listing Details Page ==================== */

.listing-gallery {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.listing-gallery-main {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
}

.listing-gallery-thumbs {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    overflow-x: auto;
}

.listing-gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.listing-gallery-thumb:hover,
.listing-gallery-thumb.active {
    border-color: var(--primary-color);
}

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

.listing-info {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.listing-info-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 1.5rem;
}

.listing-info-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.listing-info-meta {
    color: #666;
    font-size: 0.95rem;
}

.listing-info-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.listing-info-section {
    margin-bottom: 2rem;
}

.listing-info-section h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.property-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    text-align: center;
}

.detail-item-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.detail-item-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.detail-item-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.amenity-tag {
    background: var(--light-bg);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

.amenity-tag i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.description-text {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.action-buttons .btn-primary {
    background: var(--primary-color);
    border: none;
}

.action-buttons .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.action-buttons .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.action-buttons .btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* ==================== Forms ==================== */

.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* ==================== Buttons ==================== */

.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #c82333;
}

/* ==================== Alerts ==================== */

.alert {
    border: none;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ==================== Dashboard ==================== */

.dashboard-card {
    background: white;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-header {
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.dashboard-subtitle {
    color: #666;
    font-size: 1rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card-label {
    color: #666;
    font-weight: 600;
}

/* ==================== Tables ==================== */

.table-responsive {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table {
    margin-bottom: 0;
    color: #333;
}

.table thead {
    background: var(--light-bg);
    font-weight: 700;
    color: #333;
    border: none;
}

.table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: var(--light-bg);
}

.table-action-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    margin: 0 0.2rem;
}

/* ==================== Footer ==================== */

footer {
    background: #1a1a1a;
    color: #fff;
    margin-top: 5rem;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    font-size: 1.2rem;
    display: inline-block;
}

/* ==================== Utilities ==================== */

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

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

.text-muted {
    color: #999 !important;
}

.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 0.3rem;
}

.badge-primary {
    background: var(--primary-color);
}

.badge-success {
    background: var(--success-color);
}

.badge-danger {
    background: var(--danger-color);
}

.badge-warning {
    background: var(--accent-color);
    color: #333;
}

/* ==================== Responsive Design ==================== */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .listing-gallery-main {
        height: 250px;
    }
    
    .listing-info-title {
        font-size: 1.5rem;
    }
    
    .listing-info-price {
        font-size: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .search-box {
        padding: 1rem;
    }
    
    .property-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .listing-card-image {
        height: 180px;
    }
    
    .property-details {
        grid-template-columns: 1fr;
    }
    
    .amenities-list {
        flex-direction: column;
    }
}

/* ==================== Loading States ==================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

