:root {
    --primary-color: #1e4b9e;
    --primary-hover: #143673;
    --bg-light-gray: #f8f9fa;
    --text-muted: #6c757d;
    --secondary-color: #f59e0b;
    --bg-light: #f5f7fb;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --font-family: font-family: 'Roboto', sans-serif;
}

body.bg-light-body {
    font-family: var(--font-family);
    background-color: #eef2f6;
    /* Outer container background matching mockup */
}

/* Override primary button */
.btn-primary-dark {
    background-color: var(--primary-color);
    color: white;
    border: none;
    transition: background-color 0.2s;
    border-radius: 6px;
}

.btn-primary-dark:hover {
    background-color: var(--primary-hover);
    color: white;
}

.text-primary-dark {
    color: var(--primary-color) !important;
}

.text-secondary-dark {
    color: #495057 !important;
}

.bg-light-input {
    background-color: #f8f9fa !important;
}

/* Adjusting z-indexes for maps and floating elements */
.ui-layer {
    z-index: 1000 !important;
    /* Above leaflet map which is at 400 */
}

/* Filter Card specifics */
.filter-card {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(5px);
}

/* Login Prompt Card specifics */
.login-prompt-card {
    background-color: rgba(255, 255, 255, 1);
}

/* Leaflet Map Marker Styles */
.custom-map-marker {
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: relative;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    border: 2px solid white;
}

.custom-map-marker span {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 15px;
}

/* Map specific tweaks */
.leaflet-control-container .leaflet-bottom {
    z-index: 400;
    /* Ensure it stays below UI cards */
}

/* --- New Sections CSS --- */

/* Statistics Cards */
.bg-primary {
    background-color: #4382ff !important;
    /* Lighter blue for icons/stats */
}

.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05) !important;
}

/* First stat card with map overlay */
.stat-card-map {
    background-color: #f1f4f9 !important;
}

.map-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://unpkg.com/leaflet@1.9.4/images/marker-shadow.png');
    /* Placeholder minimal pattern/map effect */
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

/* Project Cards Hover Effects */
.project-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.project-img-wrapper {
    height: 180px;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.05);
}

.project-hover-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-hover-overlay {
    opacity: 1;
}

/* Badge styling for dark overlay */
.rounded-pills {
    border-radius: 50rem;
}

/* CTA & Footer Base Colors */
.bg-primary-dark {
    background-color: var(--primary-color) !important;
}

.btn-warning {
    background-color: #f6b024;
    border-color: #efaa22;
    transition: filter 0.2s;
}

.btn-warning:hover {
    filter: brightness(0.95);
    background-color: #f6b024;
    color: #000;
}

.footer-social a {
    opacity: 0.8;
    transition: opacity 0.2s;
    font-size: 1.1rem;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-links a {
    opacity: 0.85;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline !important;
}

/* --- Project Detail Redesign Styles --- */

.project-main-image {
    height: 480px;
    border-radius: 1rem;
    overflow: hidden;
}

.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 4px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 15px;
}

.sidebar-info-card {
    border: 1px solid #e0e6ed;
    border-radius: 1rem;
    position: sticky;
    top: 2rem;
}

.map-thumbnail {
    height: 120px;
    background-color: #f1f4f9;
    background-image: url('https://unpkg.com/leaflet@1.9.4/images/marker-shadow.png');
    background-size: cover;
    background-position: center;
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inventory-stat-badge {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.dot-available {
    background-color: #28a745;
}

.dot-reserved {
    background-color: #ffc107;
}

.dot-sold {
    background-color: #dc3545;
}

.dot-empty {
    background-color: #6c757d;
}

/* Floor Section Tabs */
.block-tabs .nav-link {
    border: none;
    border-radius: 0.5rem 0.5rem 0 0;
    padding: 1rem 2rem;
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    margin-right: 2px;
}

.block-tabs .nav-link.active {
    background: #fff;
    color: var(--primary-color);
}

.floor-selection-sidebar {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
}

.floor-nav .nav-link {
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s;
}

.floor-nav .nav-link:hover {
    background: #e9ecef;
}

.floor-nav .nav-link.active {
    background: var(--primary-color);
    color: #fff;
}

.floor-plan-container {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.unit-map-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}

.legend-item {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

/* --- Unit Panel Card Styles --- */

.cursor-pointer {
    cursor: pointer;
}

.unit-panel-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    border: 1px solid #e9ecef !important;
}

.unit-panel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--primary-color) !important;
}

.unit-preview-img {
    transition: transform 0.3s ease;
}

.unit-panel-card:hover .unit-preview-img {
    transform: scale(1.05);
}

.unit-mini-info .fw-bold {
    font-size: 0.9rem;
}

.smaller {
    font-size: 0.75rem;
}

/* Status colors for badges in cards */
.bg-success {
    background-color: #28a745 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}


/* Unit Detail Modal Enhancements */
.unit-plan-preview {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalUnitPlan {
    max-height: 400px;
    object-fit: contain;
}

.floor-plan-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.floor-plan-wrapper img {
    display: block;
}

#unitLayers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.unit-layer-path {
    pointer-events: auto;
    cursor: pointer;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: fill 0.2s, stroke 0.2s;
}

.unit-layer-path:hover {
    stroke-width: 4;
    stroke: #fff;
}

.unit-layer-path.status-available {
    fill: #28a745;
    stroke: #28a745;
}

.unit-layer-path.status-reserved {
    fill: #ffc107;
    stroke: #ffc107;
}

.unit-layer-path.status-sold {
    fill: #dc3545;
    stroke: #dc3545;
}

.unit-layer-path.status-empty {
    fill: #6c757d;
    stroke: #6c757d;
}

.floor-plan-wrapper {
    position: relative;
}

.unit-box {
    position: absolute;
    border-radius: 6px;
    cursor: pointer;
    opacity: .85;
}

.available {
    background: #2ecc71;
}

.reserved {
    background: #f1c40f;
}

.sold {
    background: #e74c3c;
}