:root {
    --primary: #4e73df;
    --secondary: #1cc88a;
    --dark: #5a5c69;
}

body {
    font-family: 'Nunito', sans-serif;
}

.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.property-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.property-card-img {
    height: 200px;
    object-fit: cover;
}

.property-type-nav .nav-link {
    color: var(--dark);
    border-radius: 0.25rem;
}

.property-type-nav .nav-link.active {
    background-color: var(--primary);
    color: white;
}

.ad-container {
    border: 1px solid #eee;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.ad-container img {
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .property-filters {
        order: -1;
        margin-bottom: 1.5rem;
    }
    
    .property-card-img {
        height: 150px;
    }
}

/* Flash Messages Styling */
.flash-messages {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.flash-message {
    padding: 15px 0;
    color: white;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.flash-icon {
    margin-right: 12px;
    font-size: 20px;
}

.flash-text {
    flex-grow: 1;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: 15px;
    font-size: 18px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

/* Category-specific colors */
.flash-success {
    background-color: #28a745;
}

.flash-error {
    background-color: #dc3545;
}

.flash-warning {
    background-color: #ffc107;
    color: #212529;
}

.flash-info {
    background-color: #17a2b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .flash-message {
        padding: 12px 0;
        font-size: 14px;
    }
    
    .flash-icon {
        font-size: 18px;
        margin-right: 8px;
    }
    
    .flash-close {
        font-size: 16px;
        margin-left: 10px;
    }
}

/* Property Listing Container */
.property-listing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Search Bar */
.search-bar-container {
    margin-bottom: 30px;
}

.search-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 5px;
}

/*
.search-input-group {
    display: flex;
    align-items: center;
}
*/

.search-input-group i {
    padding: 0 15px;
    color: #6c757d;
}

.search-input-group input {
    flex: 1;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    outline: none;
}

.search-button {
    background: #4e66f8;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: #3a52e8;
}

/* Main Content Layout */
.property-listing-content {
    display: flex;
    gap: 30px;
}

/* Filters Sidebar */
.filters-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filters-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reset-filters {
    color: #4e66f8;
    font-size: 14px;
    text-decoration: none;
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.filter-group h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: #f8f9fa;
}

.filter-option input {
    margin: 0;
}

.price-range-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.price-input {
    flex: 1;
}

.price-input label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #6c757d;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-right: none;
    padding: 10px 12px;
    border-radius: 6px 0 0 6px;
}

.input-group input {
    border-left: none;
    border-radius: 0 6px 6px 0;
}

.price-slider {
    padding: 0 10px;
}

.apply-filters-btn {
    width: 100%;
    padding: 12px;
    background: #4e66f8;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.apply-filters-btn:hover {
    background: #3a52e8;
}

/* Sidebar Ad */
.sidebar-ad {
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.ad-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.ad-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.ad-content {
    padding: 15px;
}

.ad-content h5 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.ad-text {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* Property Listings */
.property-listings {
    flex: 1;
}

.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.listings-header h2 {
    margin: 0;
    font-size: 22px;
    color: #333;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-options .form-select {
    width: 200px;
}

.add-property-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Property Card */
.property-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

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

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.property-badge.available {
    background: #4e66f8;
    color: white;
}

.property-badge.sold {
    background: #dc3545;
    color: white;
}

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.property-price {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.property-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.favorite-btn, .compare-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
}

.favorite-btn:hover, .compare-btn:hover {
    background: white;
    color: #4e66f8;
}

.favorite-btn.active {
    color: #dc3545;
}

.property-details {
    padding: 20px;
}

.property-details h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.property-details h3 a {
    color: #333;
    text-decoration: none;
}

.property-address {
    color: #6c757d;
    font-size: 14px;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-features {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.property-type {
    font-size: 14px;
    color: #6c757d;
    text-transform: capitalize;
}

.view-details-btn {
    color: #4e66f8;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px 0;
}

.no-results img {
    max-width: 300px;
    margin-bottom: 30px;
}

.no-results h3 {
    margin-bottom: 10px;
    color: #333;
}

.no-results p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Pagination */
.pagination-container {
    margin-top: 40px;
}

.pagination {
    justify-content: center;
}

.page-item.active .page-link {
    background-color: #4e66f8;
    border-color: #4e66f8;
}

.page-link {
    color: #4e66f8;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .property-listing-content {
        flex-direction: column;
    }
    
    .filters-sidebar {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .property-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .listings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-input-group input {
        padding: 12px 0;
    }
    
    .search-button {
        padding: 12px 20px;
    }
}

@media (max-width: 576px) {
    .property-grid {
        grid-template-columns: 1fr;
    }
    
    .price-range-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .search-input-group i {
        display: none;
    }
    
    .search-input-group input {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
    }
    
    .search-button {
        width: 100%;
    }
}

/* Base Styles */
:root {
    --primary-color: #4e66f8;
    --primary-dark: #3a52e8;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

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

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

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.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);
}

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

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

/* Custom Favorite Button – only heart changes color */
.favorite-btn {
    background: white;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    color: #6c757d;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.favorite-btn i {
    font-size: 18px;
    transition: transform 0.2s;
}

.favorite-btn:hover {
    transform: scale(1.08);
    border-color: #dc3545;
    background: white;
}

.favorite-btn:hover i {
    color: #dc3545;
}

/* Active state: orange-yellow background + red heart */
.favorite-btn.active {
    background: #ffb347;  /* orange-yellow */
    border-color: #e07c1f;
    box-shadow: 0 2px 8px rgba(255, 180, 71, 0.4);
}

.favorite-btn.active i {
    color: #dc3545;       /* red heart */
    transform: scale(1.05);
}

/* Navbar Styles */
.navbar {
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand .logo {
    height: 50px;
    width: auto;
}

/* Footer logo (light variant on the dark footer) */
.footer-logo .logo {
    height: 74px;
    width: auto;
    margin-bottom: 14px;
}

.nav-link {
    font-weight: 500;
    padding: 8px 11px !important;
    white-space: nowrap;
}

/* Keep the primary nav on a single line at desktop widths and collapse to the
   hamburger below xl (≤1199px) instead of wrapping onto two rows. */
@media (min-width: 1200px) {
    .navbar-expand-xl .navbar-collapse { flex-wrap: nowrap; }
    .navbar-expand-xl .navbar-nav { flex-wrap: nowrap; align-items: center; }
    .navbar-actions { flex-shrink: 0; white-space: nowrap; }
    /* Trim button padding slightly so Login/Register never force a wrap. */
    .navbar-actions .btn { padding-left: 0.85rem; padding-right: 0.85rem; }
}

/* When collapsed into the mobile/tablet drawer, give links room to breathe. */
@media (max-width: 1199px) {
    .navbar-collapse .navbar-nav { padding-top: 0.5rem; }
    .navbar-collapse .navbar-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #eef0f5;
    }
}

.nav-search-btn {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.user-dropdown img {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.navbar .dropdown-menu {
    z-index: 10000; /* Ensures it sits above the search containers */
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1050;
    display: none;
    align-items: center;
}

.search-overlay.show {
    display: flex;
}

.search-container {
    width: 100%;
    position: relative;
}

.close-search {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.search-box {
    max-width: 800px;
    margin: 0 auto;
}

.search-tabs {
    display: flex;
    margin-bottom: 15px;
}

.search-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: #f8f9fa;
    border: none;
    font-weight: 500;
    color: var(--secondary-color);
}

.search-tab.active {
    background: var(--primary-color);
    color: white;
}

/*
.search-input-group {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}
*/

.search-input-group input {
    flex: 1;
    padding: 15px;
    border: none;
    outline: none;
}

.search-btn {
    padding: 15px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 500;
}

/* Property Listing */
.listing-container {
    padding: 30px 0;
}

.filters-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filters-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.reset-filters {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 1rem;
    margin-bottom: 15px;
}

.price-inputs {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.price-inputs .input-group {
    flex: 1;
}

.range-slider-input {
    width: 100%;
    margin-top: 10px;
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.property-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

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

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

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.property-price {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.property-actions {
    position: absolute;
    top: 15px;
    right: 15px;
}

.btn-favorite {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

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

.property-body {
    padding: 20px;
}

.property-body h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.property-body h3 a {
    color: var(--dark-color);
}

.property-location {
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-features {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.property-type {
    font-size: 0.9rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-view {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px 0;
}

.no-results img {
    max-width: 300px;
    margin-bottom: 30px;
    opacity: 0.7;
}

.no-results h3 {
    margin-bottom: 10px;
}

.no-results p {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
}

.pagination {
    justify-content: center;
}

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

.page-link {
    color: var(--primary-color);
    border: none;
    margin: 0 5px;
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Sponsored agency showcase =====
   A paid placement, so it is built to be noticed: a deep navy identity rail
   against a light listings rail, an elevated card that lifts on hover, and a
   marquee that scrolls the agency's properties on its own. */
.sponsor-wrap { margin: 1.75rem 0; }
.sponsor-heading { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-bottom:.6rem; }
.sponsor-label { font-size:.68rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
    color:#8a6a1d; background:rgba(217,164,65,.14); border:1px solid rgba(217,164,65,.35);
    border-radius:999px; padding:.25rem .7rem; }
.sponsor-heading h4 { font-size:1.15rem; font-weight:800; color:#0b2545; margin:0; letter-spacing:-.01em; }

.sponsor-showcase {
    background:#fff; border:1px solid #e2e7f0; border-radius:20px; overflow:hidden;
    box-shadow:0 10px 30px rgba(11,37,69,.10);
    transition:transform .25s ease, box-shadow .25s ease;
}
.sponsor-showcase:hover { transform:translateY(-4px); box-shadow:0 22px 50px rgba(11,37,69,.18); }

/* Left identity rail */
.sponsor-id {
    background:linear-gradient(160deg,#0b2545 0%,#13315c 55%,#1d4e89 100%);
    color:#fff; padding:1.6rem 1.4rem; display:flex; flex-direction:column; height:100%;
    position:relative; overflow:hidden;
}
.sponsor-id::after {           /* soft light bloom, keeps the rail from going flat */
    content:""; position:absolute; right:-40px; top:-40px; width:180px; height:180px;
    border-radius:50%; background:rgba(255,255,255,.07); pointer-events:none;
}
.sponsor-id > * { position:relative; z-index:1; }
.sponsor-logo, .sponsor-logo-ph { width:96px; height:96px; border-radius:16px; background:#fff; }
.sponsor-logo { object-fit:contain; padding:6px; border:0; }
.sponsor-logo-ph { display:flex; align-items:center; justify-content:center; font-weight:800; font-size:1.9rem;
    background:linear-gradient(135deg,#d9a441,#f0dfa8); color:#0b2545; }
.sponsor-name { font-size:1.1rem; font-weight:800; line-height:1.25; margin:.75rem 0 .2rem; }
.sponsor-meta { font-size:.82rem; color:#b9c7dc; }
.sponsor-link { color:#e8c477; font-size:.82rem; text-decoration:none; }
.sponsor-link:hover { color:#f3d894; text-decoration:underline; }
.sponsor-actions { display:grid; grid-template-columns:1fr 1fr; gap:.6rem; margin-top:1.1rem; }
.sponsor-actions--single { grid-template-columns:1fr; }
.sponsor-btn {
    display:flex; align-items:center; justify-content:center; gap:.45rem; min-height:44px;
    border-radius:10px; font-weight:700; font-size:.86rem; text-decoration:none; padding:.6rem .5rem;
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease; white-space:nowrap;
}
.sponsor-btn--primary { background:#d9a441; color:#241a02; box-shadow:0 8px 20px rgba(217,164,65,.28); }
.sponsor-btn--primary:hover { background:#e6b356; color:#241a02; transform:translateY(-2px); }
.sponsor-btn--ghost { border:1px solid rgba(255,255,255,.42); color:#fff; }
.sponsor-btn--ghost:hover { background:rgba(255,255,255,.12); color:#fff; transform:translateY(-2px); }

/* Right listings rail */
.sponsor-props { padding:1.25rem 0 1.1rem 1.25rem; min-width:0; }
.sponsor-props-head { display:flex; align-items:baseline; justify-content:space-between;
    gap:1rem; padding-right:1.25rem; margin-bottom:.75rem; }
.sponsor-props-head h5 { font-size:1rem; font-weight:800; color:#0b2545; margin:0; }
.sponsor-props-head a { font-size:.82rem; text-decoration:none; color:#1d4e89; white-space:nowrap; }
.sponsor-props-head a:hover { text-decoration:underline; }

/* Marquee: the track holds the listings twice and slides one full copy, so the
   loop is seamless. Hovering (or focusing a card) pauses it. */
.sponsor-marquee { position:relative; overflow:hidden; }
.sponsor-marquee::after {      /* fade the right edge so cards do not get cut hard */
    content:""; position:absolute; right:0; top:0; bottom:0; width:56px; pointer-events:none;
    background:linear-gradient(90deg, rgba(255,255,255,0), #fff 78%);
}
.sponsor-track { display:flex; gap:.85rem; width:max-content; animation:sponsorScroll 60s linear infinite; }
.sponsor-marquee:hover .sponsor-track,
.sponsor-marquee:focus-within .sponsor-track { animation-play-state:paused; }
@keyframes sponsorScroll { from { transform:translateX(0); } to { transform:translateX(-50%); } }

.sponsor-prop { flex:0 0 auto; width:186px; border:1px solid #e9edf5; border-radius:14px;
    overflow:hidden; background:#fff; text-decoration:none; display:block;
    transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.sponsor-prop:hover { transform:translateY(-4px); box-shadow:0 14px 30px rgba(11,37,69,.16); border-color:#cfd8e6; }
.sponsor-prop-img { width:100%; height:124px; object-fit:cover; display:block; background:#eef2f7; }
.sponsor-prop-body { padding:.6rem .7rem .75rem; }
.sponsor-prop-type { font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:#8a90a2; }
.sponsor-prop-price { font-weight:800; color:#0b2545; font-size:.98rem; line-height:1.2; }
.sponsor-prop-meta { font-size:.78rem; color:#6b7280; }

@media (max-width: 767.98px) {
    .sponsor-id { padding:1.4rem 1.2rem; }
    .sponsor-props { padding:1.1rem 0 1rem 1.1rem; }
    .sponsor-track { animation-duration:45s; }
    .sponsor-prop { width:158px; }
    .sponsor-prop-img { height:104px; }
}
@media (prefers-reduced-motion: reduce) {
    .sponsor-track { animation:none; }
    .sponsor-marquee { overflow-x:auto; }
    .sponsor-showcase:hover { transform:none; }
}
/* Compact sponsored agency card (sidebar / property page) */
.sponsor-card { display:block; background:#f4f6fb; border:1px solid #e9ecf5; border-radius:12px; padding:1rem 1.1rem;
    text-decoration:none; position:relative; margin-bottom:1rem; }
.sponsor-card:hover { background:#eef1f8; }
.sponsor-card-logo { width:96px; height:64px; object-fit:contain; background:#fff; border-radius:8px; }
.sponsor-card-logo-ph { width:96px; height:64px; display:flex; align-items:center; justify-content:center; border-radius:8px;
    background:linear-gradient(135deg,#4f46e5,#7c3aed); color:#fff; font-weight:700; }

/* ===== Footer ===== */
.main-footer {
    background: #12141d;
    color: #c7cad1;
    padding: 3.5rem 0 1.5rem;
    margin-top: 4rem;
}

/* Footer Grid Layout — flex so 3 or 4 columns both balance evenly */
.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem 3rem;
    padding: 0 0 2rem;
    align-items: flex-start;
    justify-content: space-between;
}

/* About / logo column */
.about-col {
    display: flex;
    flex-direction: column;
    flex: 1 1 300px;
    max-width: 360px;
}

.footer-col:not(.about-col) {
    flex: 1 1 170px;
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #9aa0ab;
    max-width: 280px;
    margin: 0.25rem 0 0;
}

/* Footer Columns */
.footer-col {
    margin-bottom: 0.5rem;
}

.footer-heading {
    color: #fff;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.65rem;
}

.footer-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: var(--primary-color);
}

/* Quick links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #c7cad1;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

/* Contact list */
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    align-items: flex-start;
    line-height: 1.5;
}

.footer-contact li i {
    color: var(--primary-color);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-contact a {
    color: #c7cad1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: #fff;
}

/* Newsletter column */
.newsletter-col p {
    color: #9aa0ab;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Footer Bottom Grid Layout - 3 columns */
.footer-bottom-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    align-items: center;
}

/* Social Links in footer bottom */
.social-links-col .social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #c7cad1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Adjust alignment of bottom columns */
.footer-bottom-col {
    display: flex;
    align-items: center;
    color: #9aa0ab;
    font-size: 0.875rem;
}

.copyright-col {
    justify-content: flex-start;
}

.social-links-col {
    justify-content: center;
}

.legal-links-col {
    justify-content: flex-end;
}

.legal-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.legal-links a {
    color: #9aa0ab;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.legal-links a:hover {
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-bottom-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom-col {
        justify-content: center;
    }

    .social-links, .legal-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-col {
        align-items: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact li {
        justify-content: center;
    }
}

/* Newsletter Form Styling */
.newsletter-form {
    margin-top: 1rem;
}

.input-group {
    display: flex;
    width: 100%;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter-input:focus {
    border-color: #2c7be5;
    box-shadow: 0 0 0 2px rgba(44, 123, 229, 0.2);
}

.newsletter-btn {
    padding: 0 1rem;
    border-radius: 0 4px 4px 0;
    border: 1px solid #2c7be5;
    background-color: #2c7be5;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background-color: #1a68d1;
    border-color: #1a68d1;
}

/* For dark theme footers, you might want to adjust colors */
.main-footer .newsletter-input {
    background-color: #fff;
    color: #333;
}

.main-footer .newsletter-input::placeholder {
    color: #999;
}

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

.filter-group h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.price-slider-row {
    margin-bottom: 1rem;
}

.price-inputs-row {
    display: flex;
    justify-content: space-between;
}

.price-inputs {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.input-group {
    display: flex;
    align-items: center;
    flex: 1;
}

.input-group-text {
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 0.25rem 0 0 0.25rem;
}

.input-group input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-left: none;
    border-radius: 0 0.25rem 0.25rem 0;
}

/* For dark mode if needed */
.dark-mode .input-group-text {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

.dark-mode .input-group input {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

/* Price Range Filter Styles - Final Clean Version */
.filter-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-group h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.price-slider-row {
    margin-bottom: 1.5rem;
}

.price-input-row {
    margin-bottom: 1rem;
}

.price-input-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #555;
}

.input-wrapper {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-wrapper:hover {
    border-color: #bbb;
}

.input-wrapper:focus-within {
    border-color: #2c7be5;
    box-shadow: 0 0 0 2px rgba(44, 123, 229, 0.2);
}

.price-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: none;
    outline: none;
    font-size: 0.9rem;
    background: #f8f9fa;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .filter-group {
        padding: 0.75rem;
    }
    
    .price-input {
        padding: 0.5rem 0.625rem;
    }
}

/* Dark Mode Support */
.dark-mode .filter-group {
    background: #2d3748;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dark-mode .filter-group h4 {
    color: #e2e8f0;
}

.dark-mode .price-input-row label {
    color: #a0aec0;
}

.dark-mode .input-wrapper {
    border-color: #4a5568;
}

.dark-mode .price-input {
    background: #4a5568;
    color: #e2e8f0;
}

/* Enhanced Search Bar Styles */
.hero-search {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&h=400&q=80');
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.hero-search h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-search .lead {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    gap: 10px;
    align-items: stretch;
}

/*
.location-search-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
*/

.location-search-container i {
    padding: 0 15px;
    color: #6c757d;
}

#location-search {
    flex: 1;
    border: none;
    padding: 15px 15px 15px 0;
    font-size: 16px;
    outline: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.autocomplete-results {
    position: absolute;
    top: calc(100% + 5px);
    left: -2px;
    right: -2px;
    background: rgb(23, 3, 3);
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    overflow: visible;
    display: none;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.autocomplete-item:hover {
    background: #012345;
}

.autocomplete-item i {
    margin-right: 10px;
    color: #003f77;
}

/*
.selected-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}
*/

.location-tag {
    background: #4b4c4d;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.location-tag:hover {
    background: #e83030;
}

.location-tag-remove {
    margin-left: 8px;
    cursor: pointer;
    color: #6c757d;
    font-size: 12px;
}

.search-btn {
    background: #4e66f8;
    color: white;
    border: none;
    padding: 0 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    white-space: nowrap;
}

.search-btn:hover {
    background: #3a52e8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-search {
        padding: 60px 15px;
    }
    
    .hero-search h1 {
        font-size: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-btn {
        padding: 15px;
        justify-content: center;
    }
}

/* Add these styles to your existing main.css */

/* Location Search Autocomplete Styles */
.location-search-container {
    position: relative;
    overflow: visible;
    z-index: 9999;
    flex: 1;
    display: flex;
    align-items: center;
    
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.autocomplete-item i {
    margin-right: 10px;
    color: #6c757d;
}

.selected-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 9998;
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    border-radius: 0 0 8px 8px;
    /* margin-top: -8px; /* To connect with the search box */
    position: relative;
}

.location-tag-remove {
    margin-left: 8px;
    cursor: pointer;
    color: #6c757d;
    font-size: 12px;
    transition: color 0.2s;
}

.location-tag-remove:hover {
    color: #dc3545;
}

.autocomplete-loading {
    padding: 10px 15px;
    color: #6c757d;
    font-style: italic;
}

/*
.selected-locations {
    z-index: 9998;
    position: relative;
    margin-top: 20px;
}
*/

.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

.flag-circle {
    display: inline-block;
    font-size: 1.65rem;
    line-height: 1;
    border-radius: 50%;
    padding: 2px 6px;
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}