/*
 * Paralelo 25 - Minimalist Design System
 * Version: 3.0
 */

/* ====== CSS Variables ====== */
:root {
    --primary: #F4701A;
    --primary-light: #FF8A3D;
    --primary-dark: #D4590F;
    
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-500: #9E9E9E;
    --gray-700: #616161;
    --gray-900: #212121;
    
    --white: #FFFFFF;
    --black: #000000;
    
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== Global Styles ====== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
    z-index: 1;
}

/* ====== Dynamic Background System ====== */
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.dynamic-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(244, 112, 26, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
}

.dynamic-background .bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(244, 112, 26, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 3;
}

.dynamic-background .bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.dynamic-background .bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ====== Modern Navigation ====== */
.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.modern-navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modern-brand {
    text-decoration: none;
    padding: 0.05rem 0;
    transition: var(--transition);
}

.modern-brand:hover {
    transform: translateY(-1px);
}

.brand-logo {
    width: 200px;
    height: 85px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modern-toggler {
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: var(--transition);
}

.modern-toggler:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.modern-toggler span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-900);
    border-radius: 1px;
    transition: var(--transition);
}

.modern-nav-link {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem !important;
    margin: 0 0.15rem;
    color: var(--white) !important;
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.modern-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-nav-link i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.user-avatar i {
    font-size: 1.2rem;
    color: var(--white);
}

.user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-dropdown {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 200px;
    margin-top: 0.5rem;
}

.modern-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
}

.modern-dropdown-item:hover {
    background: rgba(244, 112, 26, 0.1);
    color: var(--primary);
}

.modern-dropdown-item.logout-item:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.modern-divider {
    border-color: rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.modern-btn-primary {
    background: var(--primary);
    color: var(--white) !important;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(244, 112, 26, 0.3);
    margin-left: 0.5rem;
}

.modern-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(244, 112, 26, 0.4);
}

/* Background Controls (Hidden by default) */
.background-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.background-controls.show {
    opacity: 1;
    pointer-events: all;
}

.bg-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bg-control-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Loading overlay for background transitions */
.background-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.background-loading.show {
    opacity: 1;
    pointer-events: all;
}

.background-loading .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced content cards over background */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Background Info Indicator */
.background-info {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 11px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.background-info:hover {
    opacity: 0.8;
}

#backgroundCounter {
    color: var(--primary);
    font-weight: bold;
}

#backgroundName {
    color: rgba(255, 255, 255, 0.8);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Results Header with Background */
.results-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem !important;
    transition: all 0.3s ease;
}

.results-header:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.results-title {
    color: var(--gray-900) !important;
    font-weight: 600;
    font-size: 1.75rem;
    margin: 0;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    letter-spacing: -0.02em;
}

.results-count {
    background: var(--primary) !important;
    color: var(--white) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(244, 112, 26, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.results-count:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(244, 112, 26, 0.4);
}

/* Hero Section with Background */
.hero-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin: 2rem auto 3rem auto !important;
    max-width: 1200px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-section:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.hero-section h1 {
    color: var(--gray-900);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    letter-spacing: -0.02em;
}

.hero-section p {
    color: var(--gray-700) !important;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .modern-navbar {
        padding: 0.05rem 0;
        z-index: 1050; /* Ensure it stays on top */
    }
    
    .brand-name {
        font-size: 1.3rem;
    }
    
    .brand-tagline {
        font-size: 0.7rem;
    }
    
    .modern-dropdown {
        position: static;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 1rem;
    }
    
    .modern-nav-link {
        margin: 0.25rem 0;
        justify-content: flex-start;
    }
    
    .modern-btn-primary {
        margin: 0.5rem 0 0 0;
        width: 100%;
        justify-content: center;
    }
    
    .background-controls {
        bottom: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .bg-control-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .results-header {
        padding: 1rem 1.5rem;
        margin-bottom: 1.5rem !important;
    }
    
    .results-title {
        font-size: 1.5rem;
    }
    
    .results-count {
    font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-section {
        padding: 2rem 1.5rem;
        margin: 1rem auto 2rem auto !important;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .filters-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* ====== Inmobiliarias Page Styles ====== */
.inmobiliarias-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.inmobiliarias-header:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.inmobiliarias-header h2 {
    color: var(--gray-900);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.inmobiliarias-header p {
    color: var(--gray-700);
    font-size: 1.1rem;
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.inmobiliarias-stats {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.inmobiliarias-stats:hover {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

.inmobiliarias-stats h3 {
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    font-weight: 700;
}

.inmobiliarias-stats p {
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.inmobiliarias-cta {
    background: linear-gradient(135deg, rgba(244, 112, 26, 0.95) 0%, rgba(212, 89, 15, 0.98) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 16px rgba(244, 112, 26, 0.3) !important;
    color: var(--white);
}

.inmobiliarias-cta:hover {
    background: linear-gradient(135deg, rgba(244, 112, 26, 0.98) 0%, rgba(212, 89, 15, 1) 100%) !important;
    box-shadow: 0 8px 24px rgba(244, 112, 26, 0.4) !important;
    transform: translateY(-2px);
}

.inmobiliarias-cta h4 {
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.inmobiliarias-cta p {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.inmobiliarias-cta i {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.inmobiliarias-empty {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.inmobiliarias-empty:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.inmobiliarias-empty h4 {
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.inmobiliarias-empty p {
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

/* Enhanced inmobiliaria cards */
.inmobiliaria-card {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.inmobiliaria-card:hover {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(244, 112, 26, 0.3) !important;
    transform: translateY(-5px) !important;
}

.inmobiliaria-card .card-title {
    color: var(--gray-900);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.inmobiliaria-card .text-muted {
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.inmobiliaria-card .card-footer {
    background: rgba(248, 249, 250, 0.8) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* Enhanced styling for wider inmobiliaria cards */
.inmobiliaria-card .card-body {
    padding: 2rem 1.5rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.inmobiliaria-card .btn-group {
    width: 100%;
    justify-content: center;
}

.inmobiliaria-card .btn-group .btn {
    flex: 1;
    max-width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inmobiliaria-card .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.inmobiliaria-card .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive adjustments for inmobiliarias */
@media (max-width: 991.98px) {
    .inmobiliarias-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem !important;
    }
    
    .inmobiliarias-header h2 {
        font-size: 1.75rem;
    }
    
    .inmobiliarias-header p {
        font-size: 1rem;
    }
    
    .inmobiliarias-empty {
        margin: 1rem 0;
        padding: 1.5rem;
    }
    
    .inmobiliaria-card .card-body {
        padding: 1.5rem 1rem;
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .inmobiliaria-card .card-body {
        padding: 1.25rem 0.75rem;
        min-height: 300px;
    }
    
    .inmobiliaria-card .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .inmobiliaria-card .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
    margin: 0 0 1rem 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin: 0 0 1rem 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

main {
    padding-top: 80px;
}

/* ====== Layout ====== */
.container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ====== Navigation ====== */
.navbar {
    background-color: var(--white) !important;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 0rem 0;
}

.navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--gray-900) !important;
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--gray-700) !important;
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary) !important;
    background-color: var(--gray-100);
}

.navbar .dropdown-menu {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.navbar .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
    transition: var(--transition);
}

.navbar .dropdown-item:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

/* ====== Buttons ====== */
.btn {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
    color: var(--gray-900);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ====== Cards ====== */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--gray-700);
    margin-bottom: 1rem;
}

/* ====== Forms ====== */
.form-control,
.form-select {
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background-color: var(--white);
    color: var(--gray-700);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 112, 26, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

/* ====== Filter Section ====== */
.filters-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.filters-section:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.filters-section h3 {
    color: var(--gray-900);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.filter-group {
        margin-bottom: 1.5rem;
    }

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* ====== Listings Grid ====== */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.listing-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    
    .listing-card:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: rgba(244, 112, 26, 0.3);
}

.listing-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

.listing-card .card-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.listing-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em; /* 2 lines * 1.3 line-height */
    word-wrap: break-word;
}

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

.listing-card .location {
    color: var(--gray-500);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ====== Badges ====== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

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

.badge-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.badge-success {
    background-color: #10B981;
    color: var(--white);
}

.badge-warning {
    background-color: #F59E0B;
    color: var(--white);
}

/* ====== Alerts ====== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.alert-danger {
    background-color: #FEF2F2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.alert-warning {
    background-color: #FFFBEB;
    color: #92400E;
    border-left: 4px solid #F59E0B;
}

.alert-info {
    background-color: #EFF6FF;
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

/* ====== Loading State ====== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====== Utilities ====== */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--gray-500) !important; }
.text-muted { color: var(--gray-500) !important; }
.text-center { text-align: center; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--gray-100) !important; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }

.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* ====== Responsive Design ====== */
@media (max-width: 768px) {
    .brand-logo {
        width: 200px;
        height: 85px;
    }
    
    main {
        margin-top: 80px; /* Less space on mobile */
    }
    
    .container-fluid {
        padding: 0 1rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .listing-title {
        font-size: 1rem;
        line-height: 1.2;
        max-height: 2.4em; /* 2 lines * 1.2 line-height */
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .filters-section {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* ====== Footer Static ====== */
.footer-static {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    padding: 1rem 0 0.5rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 2px solid #F4701A;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.footer-title {
    color: #F4701A;
    font-weight: 700;
    margin: 0;
    font-size: 1rem;
}

.footer-description {
    display: none; /* Hide description to save space */
}

.footer-section-title {
    color: #F4701A;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links-list li {
    margin: 0;
}

.footer-links-list a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.8rem;
}

.footer-links-list a:hover {
    color: #F4701A;
}

.footer-contact-info {
    display: none; /* Hide contact info to save space */
}

.footer-social {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    background: rgba(244, 112, 26, 0.1);
    color: #F4701A;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(244, 112, 26, 0.3);
    font-size: 0.8rem;
}

.social-link:hover {
    background: #F4701A;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 112, 26, 0.3);
}

.footer-divider {
    border-color: rgba(244, 112, 26, 0.3);
    margin: 0.5rem 0;
}

.footer-copyright {
    color: #999999;
    font-size: 0.75rem;
}

.footer-legal {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.legal-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: #F4701A;
}

/* Image Management Styles */
.image-item {
    cursor: move;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-container {
    position: relative;
    overflow: hidden;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.drag-handle {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,255,255,0.9);
    border-radius: 3px;
    padding: 2px 4px;
    cursor: move;
    z-index: 10;
}

.sortable-ghost {
    opacity: 0.5;
    transform: rotate(5deg);
}

.sortable-chosen {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.sortable-drag {
    opacity: 0.8;
}

/* Adjust main content to account for fixed footer */
main {
    margin-top: 100px; /* Space for fixed header */
    margin-bottom: 120px; /* Much smaller margin */
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .footer-static {
        padding: 0.75rem 0 0.5rem;
    }
    
    .footer-logo {
        width: 25px;
        height: 25px;
    }
    
    .footer-title {
        font-size: 0.9rem;
    }
    
    .footer-links-list {
        gap: 0.5rem;
    }
    
    .footer-links-list a {
        font-size: 0.75rem;
    }
    
    .footer-social {
        gap: 0.25rem;
    }
    
    .social-link {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .footer-legal {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }
    
    .legal-link {
        font-size: 0.7rem;
    }
    
    main {
        margin-bottom: 100px; /* Even smaller on mobile */
    }
} 