/* Premium Real Estate Theming (Royal LePage Balanced Palette) */
:root {
    --rlp-red: #e01a22;          /* Royal LePage Accent Red */
    --brand-dark: #000000;       /* Swapped from Slate to Solid Ink Black */
    --brand-light: #f8f9fa;      /* Clean off-white canvas */
}

body {
    background-color: var(--brand-light);
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Custom Navbar Style Override */
.navbar-custom {
    background-color: var(--brand-dark) !important;
    border-bottom: 3px solid var(--rlp-red);
}

/* Target Dropdown Menu Spacing, Elevation, and Dark Charcoal Background */
.navbar .dropdown-menu {
    background-color: #1e2022 !important;   /* Dark charcoal base */
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    border-radius: 8px;
    padding: 0.5rem 0;
}

/* Force Text Color and Strip Out Bootstrap Blue Defaults Completely */
.navbar .dropdown-menu a,
.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.85) !important; /* Forces off-white text state */
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem;
    text-decoration: none !important;            /* Removes all underlines */
    display: block;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover or Selected State (Slightly Lighter Charcoal + Crisp Solid White Text) */
.navbar .dropdown-menu a:hover,
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: #5c6169 !important;       /* Slightly lighter gray row highlight */
    color: #dad8d8 !important;                   /* Swapped from Red to Crisp Solid White */
    text-decoration: none !important;
    font-weight: 500;
}

/* Style the Divider Line between Items inside the Dropdown */
.navbar .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin: 0.5rem 0;
}



/* Premium Property Card Rules */
.card-listing {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

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

/* Micro-Accent Classes */
.text-accent-price {
    color: var(--rlp-red);
    font-weight: 700;
}

.badge-rlp {
    background-color: var(--rlp-red);
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium Real Estate Hero Section */
.hero-showcase {
    background: linear-gradient(rgba(30, 32, 34, 0.85), rgba(30, 32, 34, 0.85));
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 80px 0; /* Uniform padding since it spans the full screen width */
    margin-bottom: 3rem;
}

/* Semi-translucent Luxury Search Container */
.search-glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

/* Custom Input/Select Overrides inside Search */
.search-glass-card .form-select,
.search-glass-card .form-control {
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
}

.search-glass-card .form-select:focus,
.search-glass-card .form-control:focus {
    border-color: var(--rlp-red);
    box-shadow: 0 0 0 3px rgba(224, 26, 34, 0.15);
}

/* High-Contrast Action Buttons */
.btn-rlp-dark {
    background-color: var(--brand-dark);
    color: #ffffff;
    border: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-rlp-dark:hover {
    background-color: var(--rlp-red);
    color: #ffffff;
}

/* Custom Dark Overlay and Transitions */
.bg-gradient-dark {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(15, 17, 19, 0.95) 100%);
}

.bg-dark-subtle {
    background-color: #1a1c1e !important;
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.03);
}

/* Leaflet Map Popup Dark Overrides */
.leaflet-popup-content-wrapper, 
.leaflet-popup-tip {
    background-color: #1e2022 !important;
    color: #ffffff !important;
    border: 1px solid #3a3f45;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    line-height: 1.4;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #dad8d8 !important;
    padding: 6px !important;
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: #ffffff !important;
}

/* Input & Select High-Contrast Fixes */
.search-glass-card select.form-select option {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.search-glass-card .form-label {
    color: #1a1c1e !important;
    font-weight: 700;
}

/* Ensure Card Titles and Text stay bold and legible */
.card-listing .card-title {
    color: #ffffff !important;
}

.card-listing .card-body {
    background-color: #1a1c1e !important;
    color: #e2e8f0 !important;
}
/* Card Title Typography & Padding Fixes */
.card-listing .card-title {
    font-size: 1.25rem !important; /* ~20px */
    line-height: 1.3;
    padding-left: 2px; /* Safety inset so letter hooks aren't cut off */
    margin-bottom: 0.5rem;
    color: #ffffff !important;
}

/* Ensure Card Body provides consistent inner spacing */
.card-listing .card-body {
    padding: 1.25rem !important;
    background-color: #1a1c1e !important;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
.footer-custom {
    background-color: var(--brand-dark);
    position: relative;
}

.footer-accent-bar {
    height: 3px;
    background-color: var(--rlp-red);
    width: 100%;
}

.text-muted-custom {
    color: rgba(255, 255, 255, 0.65) !important;
}

.text-accent-red {
    color: var(--rlp-red) !important;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
.footer-custom {
    background-color: #000000 !important; /* Or #1a1c1e to match card bodies */
    color: #ffffff !important;
    position: relative;
}

.footer-accent-bar {
    height: 3px;
    background-color: var(--rlp-red);
    width: 100%;
}

.text-muted-custom {
    color: rgba(255, 255, 255, 0.65) !important;
}

.text-accent-red {
    color: var(--rlp-red) !important;
}

/* Footer Navigation Links */
.footer-links a,
.footer-legal-link {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover,
.footer-legal-link:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

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

/* Footer Social Icons */
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #1a1c1e;
    color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 50%;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-social-link:hover {
    background-color: var(--rlp-red);
    color: #ffffff !important;
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    opacity: 1;
}