/* Real Estate Management System - Custom CSS */

/* ========== ADVANCED RESPONSIVE ROOT VARIABLES ========== */
:root {
    --primary-color: skyblue;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    
    /* Fluid Typography */
    --font-size-base: clamp(0.9rem, 2vw, 1rem);
    --font-size-sm: clamp(0.8rem, 1.8vw, 0.875rem);
    --font-size-lg: clamp(1.1rem, 2.2vw, 1.25rem);
    --font-size-xl: clamp(1.3rem, 2.5vw, 1.5rem);
    --font-size-xxl: clamp(1.8rem, 3.5vw, 2.5rem);
    
    /* Fluid Spacing */
    --spacing-xs: clamp(0.25rem, 1vw, 0.5rem);
    --spacing-sm: clamp(0.5rem, 1.5vw, 0.75rem);
    --spacing-md: clamp(0.75rem, 2vw, 1rem);
    --spacing-lg: clamp(1rem, 2.5vw, 1.5rem);
    --spacing-xl: clamp(1.5rem, 3vw, 2rem);
    --spacing-xxl: clamp(2rem, 4vw, 3rem);
    
    /* Touch Target Sizes */
    --touch-target-min: 44px;
    --touch-target-recommended: 48px;
    
    /* Border Radius */
    --border-radius-sm: clamp(0.25rem, 0.5vw, 0.375rem);
    --border-radius-md: clamp(0.5rem, 1vw, 0.75rem);
    --border-radius-lg: clamp(0.75rem, 1.5vw, 1rem);
    
    /* Container Widths */
    --container-padding: clamp(1rem, 3vw, 1.5rem);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    font-size: var(--font-size-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Call to Action Section - Sky Blue Background */
/* Target the container that contains the Call to Action bg-primary div */
.container.my-5 .bg-primary.text-white {
    background-color: skyblue !important;
    background: skyblue !important;
}

/* Also override Bootstrap's bg-primary class specifically for this section */
div.bg-primary.text-white.rounded {
    background-color: skyblue !important;
    background: skyblue !important;
}

/* Fixed Navigation Bar */
.navbar.fixed-top {
    z-index: 1030;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar.fixed-top.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Large, Easy-to-Read Buttons for Low Literacy Users */
.btn-lg-custom {
    padding: clamp(12px, 3vw, 15px) clamp(20px, 5vw, 30px);
    font-size: var(--font-size-lg);
    font-weight: bold;
    border-radius: var(--border-radius-lg);
    min-height: var(--touch-target-recommended);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 0.75rem);
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
}

.icon-btn i {
    font-size: var(--font-size-xl);
}

/* Enhanced Button Touch Targets */
.btn {
    min-height: var(--touch-target-min);
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-base);
    transition: all 0.2s ease;
}

.btn-sm {
    min-height: 38px;
    padding: clamp(0.375rem, 1vw, 0.5rem) clamp(0.5rem, 1.5vw, 0.75rem);
    font-size: var(--font-size-sm);
}

.btn-lg {
    min-height: var(--touch-target-recommended);
    padding: clamp(0.625rem, 2vw, 0.75rem) clamp(1rem, 2.5vw, 1.25rem);
    font-size: var(--font-size-lg);
}

/* Property Cards - Ultra Responsive */
.property-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

@media (hover: none) {
    .property-card:hover {
        transform: none;
    }
    
    .property-card:active {
        transform: scale(0.98);
    }
}

.property-image {
    height: clamp(180px, 30vw, 250px);
    object-fit: cover;
    width: 100%;
    aspect-ratio: 16 / 10;
}

.property-badge {
    position: absolute;
    top: clamp(10px, 2vw, 15px);
    right: clamp(10px, 2vw, 15px);
    padding: clamp(5px, 1.5vw, 8px) clamp(10px, 2.5vw, 15px);
    border-radius: clamp(15px, 3vw, 20px);
    font-weight: bold;
    font-size: var(--font-size-sm);
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.95);
}

.property-card .card-body {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-card .card-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
}

.price-tag {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: bold;
    color: var(--primary-color);
    display: block;
    margin: var(--spacing-sm) 0;
}

/* Status Badges */
.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-approved {
    background-color: #198754;
    color: #fff;
}

.status-rejected {
    background-color: #dc3545;
    color: #fff;
}

/* KYC Status Cards */
.kyc-card {
    border-left: 4px solid;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.kyc-card.pending {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.kyc-card.approved {
    border-left-color: #198754;
    background-color: #d1e7dd;
}

.kyc-card.rejected {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

/* Dashboard Stats Cards - Fluid Responsive */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-height: clamp(120px, 20vw, 150px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card .stat-icon {
    font-size: clamp(2rem, 5vw, 3rem);
    opacity: 0.3;
}

.stat-card .stat-value {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
    line-height: 1.2;
    word-break: break-word;
}

.stat-card .stat-label {
    font-size: var(--font-size-base);
    opacity: 0.9;
}

/* Profile Image */
.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Message Bubbles */
.message-bubble {
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    max-width: 70%;
}

.message-sent {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
}

.message-received {
    background-color: #e9ecef;
    color: #000;
}

/* File Upload Area */
.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Wallet Card - Ultra Responsive */
.wallet-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--spacing-xl);
    border-radius: clamp(15px, 3vw, 20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: visible !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.wallet-balance {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
}

/* ========== ENHANCED HERO SECTION WITH BACKGROUND IMAGE ========== */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2073&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section .lead {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Enhanced Search Box */
.search-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-box .form-control,
.search-box .form-select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    font-size: 1.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 3px rgba(13, 110, 253, 0.1);
}

.search-box .btn-primary {
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Property Features List */
.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list i {
    color: var(--success-color);
    margin-right: 10px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
        background-attachment: scroll;
        min-height: 60vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .search-box {
        padding: 20px;
        margin: 0 15px;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
    
    .btn-lg-custom {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .search-box {
        padding: 15px;
    }
}

/* Form Labels - Bold and Clear */
label {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-base);
    display: block;
}

/* Required Field Indicator */
.required::after {
    content: " *";
    color: var(--danger-color);
}

/* Enhanced Form Controls */
.form-control,
.form-select {
    font-size: clamp(0.9rem, 2vw, 1rem) !important;
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 2.5vw, 1rem);
    border-radius: var(--border-radius-md);
    min-height: var(--touch-target-min);
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

textarea.form-control {
    min-height: clamp(100px, 20vw, 120px);
    resize: vertical;
}

.form-floating > label {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
}

/* Form Groups */
.mb-3, .form-group {
    margin-bottom: var(--spacing-lg);
}

/* Input Groups */
.input-group {
    min-height: var(--touch-target-min);
}

.input-group-text {
    padding: clamp(0.5rem, 2vw, 0.75rem);
    font-size: var(--font-size-base);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 20px;
}

/* Ensure breadcrumb stays within user-content */
.user-content .breadcrumb {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Wallet page content wrapper */
.wallet-page-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Ensure wallet card column doesn't clip content */
.wallet-page-content .row > .col-md-4:first-child {
    overflow: visible !important;
    min-width: 0;
}

.wallet-page-content .row {
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
}

/* Advanced Responsive Tables */
.table-responsive {
    border-radius: var(--border-radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--spacing-lg);
}

.table {
    font-size: var(--font-size-sm);
    margin-bottom: 0;
}

.table th,
.table td {
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    vertical-align: middle;
}

.table thead th {
    font-weight: 600;
    white-space: nowrap;
}

/* Stack tables on very small screens */
@media (max-width: 576px) {
    .table-stack {
        display: block;
        width: 100%;
    }
    
    .table-stack thead {
        display: none;
    }
    
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
    }
    
    .table-stack tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: var(--border-radius-md);
        padding: var(--spacing-sm);
        background: white;
    }
    
    .table-stack td {
        text-align: right;
        padding: var(--spacing-xs) var(--spacing-sm);
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        padding-left: 50%;
    }
    
    .table-stack td:before {
        content: attr(data-label);
        position: absolute;
        left: var(--spacing-sm);
        font-weight: 600;
        text-align: left;
    }
    
    .table-stack td:last-child {
        border-bottom: none;
    }
}

/* Alert Custom */
/* Ensure customer information box is always visible */
.alert.alert-success[id^="customer-info-"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #d4edda !important;
    border: 2px solid #28a745 !important;
}

.alert {
    border-radius: 10px;
    border: none;
}

/* Responsive Pagination */
.pagination {
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.pagination .page-link {
    border-radius: var(--border-radius-sm);
    margin: 0;
    border: none;
    color: var(--primary-color);
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.375rem, 1.5vw, 0.5rem) clamp(0.5rem, 2vw, 0.75rem);
    font-size: var(--font-size-sm);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

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

/* Why Choose Us Section */
.bg-purple {
    background-color: #6f42c1 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

/* ========== ADVANCED MOBILE OPTIMIZATIONS ========== */

/* Container Improvements */
.container,
.container-fluid {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Card Enhancements */
.card {
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-lg);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    font-size: var(--font-size-lg);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-md) var(--spacing-lg);
}

/* Modal Improvements */
.modal-dialog {
    margin: var(--spacing-md);
    max-width: calc(100% - 2rem);
}

.modal-content {
    border-radius: var(--border-radius-lg);
}

.modal-header {
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-body {
    padding: var(--spacing-lg);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    padding: var(--spacing-md) var(--spacing-lg);
}

/* Badge Improvements */
.badge {
    padding: clamp(0.25rem, 1vw, 0.35rem) clamp(0.5rem, 1.5vw, 0.65rem);
    font-size: var(--font-size-sm);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}

/* Alert Improvements */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-base);
}

/* Breadcrumb */
.breadcrumb {
    padding: var(--spacing-sm) 0;
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-sm);
}

.breadcrumb-item {
    padding: 0 var(--spacing-xs);
}

/* List Group */
.list-group-item {
    padding: var(--spacing-md);
    font-size: var(--font-size-base);
    border-radius: var(--border-radius-sm);
}

/* Dropdown */
.dropdown-menu {
    border-radius: var(--border-radius-md);
    padding: var(--spacing-xs);
    font-size: var(--font-size-base);
}

.dropdown-item {
    padding: clamp(0.5rem, 1.5vw, 0.625rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: var(--border-radius-sm);
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
}

/* Profile Image Responsive */
.profile-img {
    width: clamp(80px, 15vw, 150px);
    height: clamp(80px, 15vw, 150px);
    object-fit: cover;
    border-radius: 50%;
    border: clamp(3px, 0.5vw, 5px) solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Upload Area Responsive */
.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: var(--border-radius-lg);
    padding: clamp(20px, 5vw, 40px);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: clamp(120px, 20vw, 160px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

.upload-area i {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

/* Message Bubbles Responsive */
.message-bubble {
    padding: var(--spacing-md);
    border-radius: clamp(12px, 2.5vw, 15px);
    margin-bottom: var(--spacing-sm);
    max-width: clamp(250px, 75%, 600px);
    word-wrap: break-word;
    font-size: var(--font-size-base);
}

/* Image Responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Video Responsive */
video {
    max-width: 100%;
    height: auto;
}

/* Iframe Responsive */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    display: block;
    content: "";
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.embed-responsive iframe,
.embed-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Utility Classes */
.text-responsive {
    font-size: var(--font-size-base);
}

.text-responsive-sm {
    font-size: var(--font-size-sm);
}

.text-responsive-lg {
    font-size: var(--font-size-lg);
}

.text-responsive-xl {
    font-size: var(--font-size-xl);
}

/* Spacing Utilities */
.spacing-xs { margin: var(--spacing-xs); }
.spacing-sm { margin: var(--spacing-sm); }
.spacing-md { margin: var(--spacing-md); }
.spacing-lg { margin: var(--spacing-lg); }
.spacing-xl { margin: var(--spacing-xl); }

.p-responsive { padding: var(--spacing-md); }
.m-responsive { margin: var(--spacing-md); }

/* Touch Feedback */
@media (hover: none) {
    .btn:active,
    .card:active,
    a:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Safe Area Insets for Notched Devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .navbar.fixed-top,
    .user-topbar,
    .admin-topbar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* ========== COMPREHENSIVE RESPONSIVE STYLES ========== */

/* Large Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
    :root {
        --container-padding: clamp(1rem, 2.5vw, 1.25rem);
    }
    
    .container {
        max-width: 100%;
    }
    
    /* Grid adjustments */
    .row {
        margin-left: calc(var(--spacing-sm) * -1);
        margin-right: calc(var(--spacing-sm) * -1);
    }
    
    .row > * {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
}

/* Tablets and Below (max-width: 992px) */
@media (max-width: 992px) {
    /* Grid - Convert 4 columns to 3 */
    .col-md-3 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    /* Stat Cards */
    .stat-card {
        margin-bottom: var(--spacing-lg);
        padding: var(--spacing-md);
    }
    
    .stat-card .stat-icon {
        font-size: clamp(2rem, 4.5vw, 2.5rem);
    }
    
    /* Wallet Card */
    .wallet-card {
        margin-bottom: var(--spacing-lg);
        padding: var(--spacing-lg);
    }
    
    /* Search Box */
    .search-box .form-control,
    .search-box .form-select {
        font-size: clamp(0.9rem, 2vw, 1rem);
        padding: clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 15px);
    }
    
    .search-box .btn-primary {
        font-size: clamp(0.9rem, 2vw, 1rem);
        padding: clamp(10px, 2.5vw, 12px) clamp(20px, 4vw, 25px);
    }
    
    /* Tables - Force Horizontal Scroll */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 60vh;
    }
    
    .hero-section h1 {
        font-size: clamp(2rem, 5vw, 2.8rem);
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --touch-target-min: 48px;
        --touch-target-recommended: 50px;
    }
    
    /* Body Padding for Fixed Navbar */
    body {
        padding-top: clamp(60px, 12vw, 70px);
    }
    
    /* Navbar Adjustments */
    .navbar-brand {
        font-size: clamp(1.1rem, 3vw, 1.2rem) !important;
    }
    
    .navbar-nav .nav-link {
        padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 15px);
        text-align: center;
        min-height: var(--touch-target-min);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Grid - Convert to 2 columns */
    .col-md-3,
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Property Cards - Full Width on Mobile */
    .property-card {
        margin-bottom: var(--spacing-lg);
    }
    
    .property-badge {
        font-size: clamp(0.75rem, 1.8vw, 0.8rem);
        padding: clamp(5px, 1vw, 6px) clamp(10px, 2vw, 12px);
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 16px !important; /* Prevent iOS zoom on focus */
        min-height: var(--touch-target-min);
    }
    
    /* Upload Area */
    .upload-area {
        padding: clamp(20px, 5vw, 30px) clamp(12px, 3vw, 15px);
    }
    
    .upload-area i {
        font-size: clamp(1.8rem, 4.5vw, 2rem);
    }
    
    /* Message Bubbles */
    .message-bubble {
        max-width: 85%;
        padding: clamp(10px, 2.5vw, 12px);
    }
    
    /* Dashboard Stats */
    .stat-card {
        text-align: center;
        padding: var(--spacing-md);
    }
    
    /* KYC Cards */
    .kyc-card {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-sm);
    }
    
    /* Cards */
    .card {
        margin-bottom: var(--spacing-lg);
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    .card-title {
        font-size: var(--font-size-lg);
    }
    
    /* Modals */
    .modal-dialog {
        margin: var(--spacing-sm);
        max-width: calc(100% - 1rem);
    }
    
    .modal-body {
        padding: var(--spacing-md);
        max-height: calc(100vh - 150px);
    }
    
    .modal-header,
    .modal-footer {
        padding: var(--spacing-md);
    }
    
    /* Search Box in Hero */
    .search-box {
        padding: var(--spacing-md);
        border-radius: var(--border-radius-lg);
    }
    
    .search-box .form-control,
    .search-box .form-select {
        padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 15px);
        font-size: clamp(0.9rem, 2vw, 0.95rem);
        margin-bottom: var(--spacing-sm);
    }
    
    .search-box .btn-primary {
        width: 100%;
        padding: clamp(10px, 2.5vw, 12px);
        min-height: var(--touch-target-min);
    }
    
    /* Hero Section */
    .hero-section {
        padding: clamp(50px, 10vw, 60px) 0;
        min-height: 50vh;
    }
    
    .hero-section h1 {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }
    
    .hero-section .lead {
        font-size: clamp(1rem, 2.5vw, 1.1rem);
    }
    
    /* Features List */
    .features-list li {
        font-size: var(--font-size-sm);
        padding: var(--spacing-sm) 0;
    }
    
    /* Stacked Layout for Complex Forms */
    .row.g-3 > * {
        margin-bottom: var(--spacing-md);
    }
    
    /* Full-width buttons on mobile */
    .btn-group-vertical {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .btn-group-vertical .btn {
        width: 100%;
    }
    
    /* Horizontal scroll hint for tables */
    .table-responsive::after {
        content: '← Scroll →';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #999;
        padding: 0.5rem;
    }
}

/* Small Mobile Devices (max-width: 576px) */
@media (max-width: 576px) {
    :root {
        --container-padding: 0.75rem;
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1rem;
        --spacing-xl: 1.25rem;
        --touch-target-min: 48px;
    }
    
    /* Typography - Fluid Responsive */
    h1 { font-size: clamp(1.6rem, 4.5vw, 1.8rem); }
    h2 { font-size: clamp(1.4rem, 4vw, 1.5rem); }
    h3 { font-size: clamp(1.2rem, 3.5vw, 1.3rem); }
    h4 { font-size: clamp(1rem, 3vw, 1.1rem); }
    h5 { font-size: clamp(0.95rem, 2.5vw, 1rem); }
    h6 { font-size: clamp(0.9rem, 2vw, 0.95rem); }
    
    /* Grid - Single column layout */
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Navbar */
    .navbar-brand {
        font-size: clamp(1rem, 3vw, 1.1rem) !important;
    }
    
    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.1rem;
    }
    
    /* Property Cards */
    .property-card .card-body {
        padding: var(--spacing-md);
    }
    
    .property-card .card-title {
        font-size: var(--font-size-base);
        line-height: 1.4;
    }
    
    /* Buttons - Ensure touch targets */
    .btn {
        min-height: var(--touch-target-min);
        padding: clamp(8px, 2vw, 10px) clamp(14px, 3vw, 16px);
        font-size: clamp(0.85rem, 2vw, 0.9rem);
    }
    
    .btn-lg {
        min-height: 50px;
        padding: clamp(10px, 2.5vw, 12px) clamp(18px, 4vw, 20px);
        font-size: clamp(0.95rem, 2.2vw, 1rem);
    }
    
    .btn-sm {
        min-height: 42px;
        padding: clamp(7px, 1.8vw, 8px) clamp(12px, 2.5vw, 14px);
        font-size: clamp(0.8rem, 1.8vw, 0.85rem);
    }
    
    .btn-block,
    .w-100.btn {
        display: block;
        width: 100%;
    }
    
    /* Forms */
    .form-label {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-xs);
    }
    
    .form-control,
    .form-select {
        padding: clamp(8px, 2vw, 10px) clamp(10px, 2.5vw, 12px);
        font-size: 16px !important;
        min-height: var(--touch-target-min);
    }
    
    .form-control-sm {
        min-height: 42px;
    }
    
    /* Upload Area */
    .upload-area {
        padding: clamp(15px, 4vw, 20px) clamp(8px, 2vw, 10px);
        min-height: clamp(100px, 18vw, 120px);
    }
    
    .upload-area i {
        font-size: clamp(1.6rem, 4vw, 1.8rem);
    }
    
    .upload-area p {
        font-size: var(--font-size-sm);
    }
    
    /* Stats Cards */
    .stat-card {
        padding: var(--spacing-md);
        min-height: clamp(100px, 18vw, 120px);
    }
    
    /* Message Bubbles */
    .message-bubble {
        max-width: 90%;
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    /* Tables */
    .table {
        font-size: clamp(0.75rem, 2vw, 0.85rem);
    }
    
    .table th,
    .table td {
        padding: clamp(6px, 1.5vw, 8px);
    }
    
    /* Pagination */
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination .page-link {
        min-height: var(--touch-target-min);
        min-width: var(--touch-target-min);
        padding: clamp(5px, 1.5vw, 6px) clamp(8px, 2vw, 10px);
        font-size: clamp(0.8rem, 1.8vw, 0.85rem);
    }
    
    /* Cards */
    .card-body {
        padding: var(--spacing-md);
    }
    
    .card-title {
        font-size: var(--font-size-lg);
    }
    
    /* Hero Section */
    .hero-section {
        padding: clamp(40px, 8vw, 50px) 0;
        min-height: 40vh;
    }
    
    .hero-section h1 {
        font-size: clamp(1.6rem, 4.5vw, 1.8rem);
        line-height: 1.3;
    }
    
    .hero-section .lead {
        font-size: clamp(0.95rem, 2.2vw, 1rem);
    }
    
    /* Search Box */
    .search-box {
        padding: var(--spacing-md);
    }
    
    .search-box .form-control,
    .search-box .form-select {
        padding: clamp(8px, 2vw, 10px) clamp(10px, 2.5vw, 12px);
        font-size: clamp(0.85rem, 2vw, 0.9rem);
    }
    
    .search-box .btn-primary {
        padding: clamp(8px, 2vw, 10px);
        font-size: clamp(0.9rem, 2vw, 0.95rem);
        min-height: var(--touch-target-min);
    }
    
    /* Alerts */
    .alert {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: clamp(0.8rem, 1.8vw, 0.85rem);
    }
    
    /* List Groups */
    .list-group-item {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    /* Dropdowns */
    .dropdown-item {
        padding: clamp(0.5rem, 1.5vw, 0.625rem) clamp(0.75rem, 2vw, 1rem);
        font-size: var(--font-size-sm);
    }
}

/* Extra Small Devices (max-width: 400px) */
@media (max-width: 400px) {
    :root {
        --container-padding: 0.5rem;
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.375rem;
        --spacing-md: 0.5rem;
        --spacing-lg: 0.75rem;
        --spacing-xl: 1rem;
    }
    
    /* Container Padding */
    .container,
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Typography */
    h1 { font-size: clamp(1.4rem, 5vw, 1.6rem); }
    h2 { font-size: clamp(1.3rem, 4.5vw, 1.4rem); }
    h3 { font-size: clamp(1.1rem, 4vw, 1.2rem); }
    h4 { font-size: clamp(0.95rem, 3.5vw, 1rem); }
    
    /* Buttons */
    .btn {
        padding: clamp(6px, 1.8vw, 7px) clamp(12px, 3vw, 14px);
        font-size: clamp(0.8rem, 2vw, 0.85rem);
    }
    
    .btn i {
        font-size: clamp(0.9rem, 2.2vw, 1rem);
    }
    
    /* Property Cards */
    .property-card .card-body {
        padding: clamp(10px, 2.5vw, 12px);
    }
    
    .property-card .card-title {
        font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    }
    
    /* Stats */
    .stat-card {
        padding: clamp(10px, 2.5vw, 12px);
    }
    
    .stat-card .stat-value {
        font-size: clamp(1.3rem, 4vw, 1.4rem);
    }
    
    .stat-card .stat-label {
        font-size: clamp(0.8rem, 2vw, 0.85rem);
    }
    
    /* Wallet Balance */
    .wallet-balance {
        font-size: clamp(1.1rem, 3.5vw, 1.2rem);
    }
    
    /* Cards */
    .card-body {
        padding: clamp(10px, 2.5vw, 12px);
    }
    
    .card-header {
        padding: clamp(8px, 2vw, 10px);
        font-size: clamp(0.95rem, 2.5vw, 1rem);
    }
    
    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: clamp(10px, 2.5vw, 12px);
    }
    
    /* Forms */
    .form-control,
    .form-select {
        padding: clamp(7px, 2vw, 8px) clamp(9px, 2.5vw, 10px);
    }
    
    /* Tables - Force stacking */
    .table th,
    .table td {
        padding: clamp(5px, 1.5vw, 6px) clamp(3px, 1vw, 4px);
        font-size: clamp(0.75rem, 2vw, 0.8rem);
    }
    
    /* Alerts */
    .alert {
        padding: clamp(8px, 2vw, 10px);
        font-size: clamp(0.8rem, 2vw, 0.85rem);
    }
    
    /* Badges */
    .badge {
        padding: clamp(3px, 1vw, 4px) clamp(6px, 1.5vw, 8px);
        font-size: clamp(0.7rem, 1.8vw, 0.75rem);
    }
    
    /* Hero Section */
    .hero-section h1 {
        font-size: clamp(1.4rem, 5vw, 1.6rem);
    }
    
    .hero-section .lead {
        font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    }
}

/* Landscape Orientation on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .modal-dialog {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .pagination,
    .admin-sidebar,
    .admin-topbar {
        display: none !important;
    }
    
    .admin-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* Accessibility - Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========== RESPONSIVE UTILITY CLASSES ========== */

/* Width Utilities */
.w-100 { width: 100% !important; }
.w-75 { width: 75% !important; }
.w-50 { width: 50% !important; }
.w-25 { width: 25% !important; }
.w-auto { width: auto !important; }

/* Max Width Utilities */
.mw-100 { max-width: 100% !important; }
.mw-75 { max-width: 75% !important; }
.mw-50 { max-width: 50% !important; }

/* Height Utilities */
.h-100 { height: 100% !important; }
.h-75 { height: 75% !important; }
.h-50 { height: 50% !important; }
.h-25 { height: 25% !important; }
.h-auto { height: auto !important; }

/* Min Height Utilities */
.min-h-100vh { min-height: 100vh !important; }
.min-h-50vh { min-height: 50vh !important; }
.min-h-screen { min-height: 100vh !important; }

/* Display Utilities for Responsive */
@media (max-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (max-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (max-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}

/* Text Alignment Responsive */
@media (max-width: 768px) {
    .text-md-center { text-align: center !important; }
    .text-md-left { text-align: left !important; }
    .text-md-right { text-align: right !important; }
}

@media (max-width: 576px) {
    .text-sm-center { text-align: center !important; }
    .text-sm-left { text-align: left !important; }
    .text-sm-right { text-align: right !important; }
}

/* Overflow Utilities */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }
.overflow-x-auto { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
.overflow-y-auto { overflow-y: auto !important; -webkit-overflow-scrolling: touch; }

/* Flex Utilities */
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }

@media (max-width: 768px) {
    .flex-md-column { flex-direction: column !important; }
    .flex-md-wrap { flex-wrap: wrap !important; }
}

@media (max-width: 576px) {
    .flex-sm-column { flex-direction: column !important; }
    .flex-sm-wrap { flex-wrap: wrap !important; }
}

/* Gap Utilities */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* ========== COMPREHENSIVE COMPONENT OVERRIDES ========== */

/* Override any hardcoded inline styles */
img[style*="width"] {
    max-width: 100% !important;
    height: auto !important;
}

div[style*="max-height: 500px"] {
    max-height: clamp(300px, 60vh, 500px) !important;
}

div[style*="max-height: 400px"] {
    max-height: clamp(250px, 50vh, 400px) !important;
}

/* Navbar Enhancements */
.navbar {
    padding: var(--spacing-sm) var(--container-padding);
}

.navbar-brand {
    font-size: clamp(1.1rem, 3vw, 1.25rem) !important;
    padding: var(--spacing-xs) 0;
}

.navbar-nav {
    gap: var(--spacing-xs);
}

.navbar-nav .nav-link {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
}

@media (max-width: 992px) {
    .navbar-collapse {
        margin-top: var(--spacing-md);
    }
    
    .navbar-nav .nav-link {
        padding: var(--spacing-md);
        border-bottom: 1px solid #f0f0f0;
    }
}

/* Footer Responsive */
footer {
    padding: var(--spacing-xl) var(--container-padding);
    font-size: var(--font-size-sm);
}

footer .row {
    gap: var(--spacing-lg);
}

@media (max-width: 576px) {
    footer {
        text-align: center;
    }
}

/* ====================================================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS
   ==================================================================== */

/* Public navbar brand styling - ensure it shows properly on all screens */
.navbar-brand {
    display: flex !important;
    align-items: center;
    gap: 0.3rem;
}

.navbar-brand i {
    flex-shrink: 0;
}

.navbar-brand .brand-full,
.navbar-brand .brand-short {
    display: inline-block;
}

@media (max-width: 768px) {
    /* Hide date/time displays on mobile for cleaner interface */
    .date-time-display,
    .current-date,
    .current-time,
    .datetime-info,
    .time-display,
    .date-display,
    [class*="date-time"],
    [class*="datetime"] {
        display: none !important;
    }
    
    /* Fix brand name overflow */
    .navbar-brand {
        font-size: 0.9rem !important;
        max-width: 70%;
    }
    
    .navbar-brand i {
        font-size: 1.1rem;
    }
    
    /* Ensure short brand name shows on mobile */
    .navbar-brand .brand-short {
        display: inline-block !important;
        font-size: 0.9rem;
    }
    
    /* Ensure all buttons have proper touch targets (minimum 44px) */
    .btn,
    button,
    a.btn,
    .btn-sm {
        min-height: 44px !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.95rem !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Primary action buttons should be 48px for better accessibility */
    .btn-primary,
    .btn-success,
    .btn-danger {
        min-height: 48px !important;
        font-weight: 500;
    }
    
    /* Icon buttons */
    .btn-icon,
    .menu-toggle {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve spacing throughout */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* Better spacing for form elements */
    .form-control,
    .form-select,
    textarea.form-control {
        min-height: 44px !important;
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 0.75rem !important;
    }
    
    textarea.form-control {
        min-height: 100px !important;
    }
    
    /* Input groups */
    .input-group {
        flex-wrap: nowrap;
    }
    
    .input-group .btn {
        white-space: nowrap;
    }
    
    /* Fix table overflow */
    .table-responsive {
        margin-bottom: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    /* Better list spacing */
    .list-group-item {
        padding: 0.75rem !important;
    }
    
    /* Navigation items */
    .nav-link,
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Dropdown menus */
    .dropdown-menu {
        font-size: 0.95rem;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Modal improvements */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Alert spacing */
    .alert {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    /* Badge sizes */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.65rem !important;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
    
    /* Pagination */
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Property cards */
    .property-card {
        margin-bottom: 1rem;
    }
    
    .property-card .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .property-card .card-text {
        font-size: 0.9rem;
    }
    
    /* Fix button groups */
    .btn-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
    
    /* Stats cards */
    .stats-card,
    .revenue-card {
        padding: 1rem !important;
    }
    
    .stats-card h3,
    .revenue-card h3 {
        font-size: 1.5rem !important;
    }
    
    .stats-card p,
    .revenue-card p {
        font-size: 0.9rem;
    }
    
    /* Dashboard improvements */
    .dashboard-header {
        padding: 1rem 0;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    /* Top bar improvements */
    .user-topbar {
        padding: 0.5rem 1rem !important;
    }
    
    .user-topbar .dropdown-toggle {
        padding: 0.5rem !important;
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Notification badge */
    .notification-badge {
        min-width: 20px;
        min-height: 20px;
        font-size: 0.7rem;
    }
    
    /* Search bar */
    .search-bar {
        margin-bottom: 1rem;
    }
    
    .search-bar input {
        font-size: 16px !important;
    }
    
    /* Property filters */
    .filter-section {
        padding: 1rem;
    }
    
    .filter-section .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Image galleries */
    .property-images img {
        margin-bottom: 0.5rem;
    }
    
    /* Price display */
    .price {
        font-size: 1.25rem !important;
        font-weight: 600;
    }
    
    /* Action buttons container */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    /* Fix floating elements */
    .float-end {
        float: none !important;
        display: block;
        margin-top: 0.5rem;
    }
    
    /* Text alignment */
    h1, h2, h3, h4 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Link spacing */
    a {
        min-height: 24px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Profile images */
    .profile-img,
    .avatar {
        width: 40px;
        height: 40px;
    }
    
    /* Status badges */
    .status-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Extra small devices (phones in portrait, less than 400px) */
@media (max-width: 400px) {
    .navbar-brand {
        font-size: 0.8rem !important;
    }
    
    .btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    .modal-dialog {
        margin: 0.25rem;
    }
}

/* Image Gallery Responsive */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 30vw, 250px), 1fr));
    gap: var(--spacing-md);
}

.image-gallery img {
    width: 100%;
    height: clamp(150px, 25vw, 200px);
    object-fit: cover;
    border-radius: var(--border-radius-md);
}

/* Video Responsive */
video,
iframe {
    max-width: 100%;
    height: auto;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Maps Responsive */
.map-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius-md);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Rating Stars Responsive */
.rating {
    display: flex;
    gap: var(--spacing-xs);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

/* Review Cards */
.review-card {
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .review-card {
        padding: var(--spacing-md);
    }
}

/* Timeline Responsive */
.timeline {
    position: relative;
    padding: var(--spacing-lg) 0;
}

.timeline-item {
    margin-bottom: var(--spacing-xl);
    padding-left: clamp(1.5rem, 5vw, 2.5rem);
}

@media (max-width: 768px) {
    .timeline-item {
        padding-left: var(--spacing-lg);
    }
}

/* Tabs Responsive */
.nav-tabs {
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-base);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    min-height: var(--touch-target-min);
}

@media (max-width: 576px) {
    .nav-tabs .nav-link {
        flex: 1 1 auto;
        text-align: center;
        padding: var(--spacing-sm);
    }
}

/* Progress Bar */
.progress {
    height: clamp(1rem, 2vw, 1.5rem);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.progress-bar {
    font-size: var(--font-size-sm);
    line-height: clamp(1rem, 2vw, 1.5rem);
}

/* Accordion Responsive */
.accordion-button {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-base);
    min-height: var(--touch-target-min);
}

.accordion-body {
    padding: var(--spacing-lg);
}

@media (max-width: 576px) {
    .accordion-button {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .accordion-body {
        padding: var(--spacing-md);
    }
}

/* Carousel Responsive */
.carousel-item img {
    width: 100%;
    height: clamp(250px, 50vh, 600px);
    object-fit: cover;
}

.carousel-control-prev,
.carousel-control-next {
    width: clamp(30px, 8vw, 50px);
}

.carousel-indicators {
    gap: var(--spacing-xs);
}

.carousel-indicators button {
    width: clamp(8px, 2vw, 12px);
    height: clamp(8px, 2vw, 12px);
    border-radius: 50%;
}

/* Offcanvas Responsive */
.offcanvas {
    max-width: clamp(280px, 80vw, 400px);
}

.offcanvas-body {
    padding: var(--spacing-lg);
}

/* Toast Notifications */
.toast {
    max-width: clamp(280px, 90vw, 350px);
    font-size: var(--font-size-base);
}

.toast-header,
.toast-body {
    padding: var(--spacing-md);
}

/* Spinner/Loader */
.spinner-border,
.spinner-grow {
    width: clamp(1.5rem, 4vw, 2rem);
    height: clamp(1.5rem, 4vw, 2rem);
}

.spinner-border-sm,
.spinner-grow-sm {
    width: clamp(1rem, 3vw, 1.25rem);
    height: clamp(1rem, 3vw, 1.25rem);
}

/* Popovers & Tooltips */
.popover {
    max-width: clamp(250px, 85vw, 276px);
    font-size: var(--font-size-sm);
}

.tooltip-inner {
    max-width: clamp(200px, 80vw, 200px);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
}

/* Steps/Wizard Responsive */
.steps {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.step {
    min-width: clamp(80px, 20vw, 120px);
    padding: var(--spacing-md);
    text-align: center;
}

@media (max-width: 576px) {
    .steps {
        flex-direction: column;
    }
    
    .step {
        min-width: 100%;
    }
}

/* Charts Container */
.chart-container {
    position: relative;
    width: 100%;
    height: clamp(250px, 50vw, 400px);
}

@media (max-width: 768px) {
    .chart-container {
        height: clamp(200px, 60vw, 300px);
    }
}

/* Data Grid / Cards Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(250px, 40vw, 300px), 1fr));
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .data-grid {
        grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 45vw, 250px), 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 576px) {
    .data-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== FORCE RESPONSIVE ON ALL ELEMENTS ========== */

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Prevent horizontal scroll */
.container,
.container-fluid,
.row {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure all images are responsive by default */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix for embedded content */
embed,
object,
iframe {
    max-width: 100%;
}

/* Make all tables responsive by default */
table {
    width: 100%;
    max-width: 100%;
}

/* Ensure buttons wrap text on small screens */
.btn {
    white-space: normal;
    text-align: center;
    word-wrap: break-word;
}

/* Prevent text overflow */
p, h1, h2, h3, h4, h5, h6, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ========== COMPREHENSIVE ICON RESPONSIVE SYSTEM ========== */

/* Base Icon Sizing - Fluid Responsive */
i, .bi {
    font-size: inherit;
    line-height: inherit;
}

/* Icon Size Utilities - Fluid Scaling */
.icon-xs {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem) !important;
    width: clamp(12px, 2.5vw, 14px);
    height: clamp(12px, 2.5vw, 14px);
}

.icon-sm {
    font-size: clamp(0.875rem, 1.8vw, 1rem) !important;
    width: clamp(14px, 3vw, 16px);
    height: clamp(14px, 3vw, 16px);
}

.icon-md, .icon-base {
    font-size: clamp(1rem, 2vw, 1.25rem) !important;
    width: clamp(16px, 3.5vw, 20px);
    height: clamp(16px, 3.5vw, 20px);
}

.icon-lg {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem) !important;
    width: clamp(20px, 4vw, 24px);
    height: clamp(20px, 4vw, 24px);
}

.icon-xl {
    font-size: clamp(1.5rem, 3vw, 2rem) !important;
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
}

.icon-xxl {
    font-size: clamp(2rem, 4vw, 3rem) !important;
    width: clamp(32px, 6vw, 48px);
    height: clamp(32px, 6vw, 48px);
}

.icon-xxxl {
    font-size: clamp(3rem, 6vw, 4rem) !important;
    width: clamp(48px, 8vw, 64px);
    height: clamp(48px, 8vw, 64px);
}

/* Button Icons - Auto-scale with button size */
.btn i, .btn .bi {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    margin-right: clamp(0.25rem, 0.5vw, 0.5rem);
}

.btn-sm i, .btn-sm .bi {
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    margin-right: clamp(0.2rem, 0.4vw, 0.4rem);
}

.btn-lg i, .btn-lg .bi {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-right: clamp(0.3rem, 0.6vw, 0.6rem);
}

/* Card Icons */
.card i, .card .bi {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.card-header i, .card-title i {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    margin-right: clamp(0.25rem, 0.5vw, 0.5rem);
}

/* Navbar Icons */
.navbar i, .navbar .bi {
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.navbar-brand i {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-right: clamp(0.3rem, 0.6vw, 0.5rem);
}

/* Sidebar Icons */
.sidebar-nav-item i,
.user-sidebar i,
.admin-sidebar i {
    font-size: clamp(1rem, 2vw, 1.1rem);
    min-width: clamp(20px, 4vw, 24px);
}

/* Alert Icons */
.alert i {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-right: clamp(0.5rem, 1vw, 0.75rem);
}

/* Badge Icons */
.badge i {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
}

/* List Icons */
.list-group-item i,
ul li i,
ol li i {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    margin-right: clamp(0.3rem, 0.6vw, 0.5rem);
}

/* Dropdown Icons */
.dropdown-item i {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    margin-right: clamp(0.5rem, 1vw, 0.75rem);
    min-width: clamp(16px, 3vw, 20px);
}

/* Modal Icons */
.modal-header i,
.modal-title i {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-right: clamp(0.5rem, 1vw, 0.75rem);
}

.modal-body i {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

/* Footer Social Icons */
footer i {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

footer a i {
    transition: all 0.3s ease;
}

footer a:hover i {
    transform: scale(1.1);
}

/* Form Icons */
.input-group-text i,
.form-label i {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

/* Stat Card Icons */
.stat-card i,
.stat-icon {
    font-size: clamp(2rem, 5vw, 3rem) !important;
}

/* Feature Icons */
.features-list i,
.feature-icon {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--success-color);
}

/* Status Icons */
.status-icon {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

/* Action Icons */
.action-icon {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    cursor: pointer;
    transition: all 0.2s;
}

.action-icon:hover {
    transform: scale(1.1);
}

/* Avatar Icons */
.avatar i {
    font-size: clamp(1rem, 2vw, 1.2rem);
}

/* Breadcrumb Icons */
.breadcrumb-item i {
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
}

/* Tab Icons */
.nav-tabs i,
.nav-pills i {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    margin-right: clamp(0.25rem, 0.5vw, 0.5rem);
}

/* Toast Icons */
.toast i {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

/* Progress Icons */
.progress i {
    font-size: clamp(0.8rem, 1.6vw, 0.9rem);
}

/* Table Icons */
.table i {
    font-size: clamp(0.85rem, 1.7vw, 1rem);
}

/* Property Card Icons */
.property-card i {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.property-badge i {
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    margin-right: clamp(0.2rem, 0.4vw, 0.3rem);
}

/* Rating Stars */
.rating i,
.stars i {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    margin-right: clamp(0.1rem, 0.2vw, 0.15rem);
}

/* Upload Area Icons */
.upload-area i {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: clamp(0.5rem, 1vw, 1rem);
}

/* Wallet Icons */
.wallet-card i {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

/* Dashboard Widget Icons */
.widget i,
.dashboard-widget i {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

/* Notification Icons */
.notification i,
.notification-icon {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

/* Spinner Icons */
.spinner i {
    font-size: clamp(1rem, 2vw, 1.5rem);
    animation: spin 1s linear infinite;
}

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

/* Floating Action Button Icons */
.fab i,
.floating-btn i,
.floating-chatbot-btn i {
    font-size: clamp(1.3rem, 2.8vw, 1.5rem) !important;
}

/* Close Button Icons */
.btn-close i,
.close i {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

/* Pagination Icons */
.pagination i {
    font-size: clamp(0.8rem, 1.6vw, 0.9rem);
}

/* Accordion Icons */
.accordion-button i {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    margin-right: clamp(0.5rem, 1vw, 0.75rem);
}

/* Carousel Icons */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: clamp(20px, 4vw, 30px);
    height: clamp(20px, 4vw, 30px);
}

/* Offcanvas Icons */
.offcanvas-header i,
.offcanvas-title i {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
}

/* ========== COMPREHENSIVE FONT RESPONSIVE SYSTEM ========== */

/* Base Typography - Fluid Responsive */
body {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: clamp(1.5, 1.6, 1.7);
}

/* Headings - Fluid Scale */
h1, .h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
    line-height: clamp(1.2, 1.3, 1.4);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    font-weight: 700;
}

h2, .h2 {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
    line-height: clamp(1.2, 1.3, 1.4);
    margin-bottom: clamp(0.5rem, 1.8vw, 0.9rem);
    font-weight: 600;
}

h3, .h3 {
    font-size: clamp(1.3rem, 3.5vw, 1.75rem) !important;
    line-height: clamp(1.3, 1.4, 1.5);
    margin-bottom: clamp(0.4rem, 1.6vw, 0.8rem);
    font-weight: 600;
}

h4, .h4 {
    font-size: clamp(1.1rem, 3vw, 1.5rem) !important;
    line-height: clamp(1.3, 1.4, 1.5);
    margin-bottom: clamp(0.4rem, 1.4vw, 0.7rem);
    font-weight: 600;
}

h5, .h5 {
    font-size: clamp(1rem, 2.5vw, 1.25rem) !important;
    line-height: clamp(1.4, 1.5, 1.6);
    margin-bottom: clamp(0.3rem, 1.2vw, 0.6rem);
    font-weight: 500;
}

h6, .h6 {
    font-size: clamp(0.9rem, 2vw, 1rem) !important;
    line-height: clamp(1.4, 1.5, 1.6);
    margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
    font-weight: 500;
}

/* Paragraph Text */
p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: clamp(1.5, 1.6, 1.7);
    margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

/* Lead Text */
.lead {
    font-size: clamp(1rem, 2.5vw, 1.25rem) !important;
    line-height: clamp(1.4, 1.5, 1.6);
    font-weight: 300;
}

/* Small Text */
small, .small {
    font-size: clamp(0.75rem, 1.8vw, 0.875rem) !important;
    line-height: clamp(1.4, 1.5, 1.6);
}

/* Display Text - Hero Headings */
.display-1 {
    font-size: clamp(3rem, 8vw, 5rem) !important;
    font-weight: 700;
    line-height: 1.2;
}

.display-2 {
    font-size: clamp(2.5rem, 7vw, 4.5rem) !important;
    font-weight: 700;
    line-height: 1.2;
}

.display-3 {
    font-size: clamp(2rem, 6vw, 4rem) !important;
    font-weight: 700;
    line-height: 1.2;
}

.display-4 {
    font-size: clamp(1.75rem, 5vw, 3.5rem) !important;
    font-weight: 700;
    line-height: 1.2;
}

.display-5 {
    font-size: clamp(1.5rem, 4vw, 3rem) !important;
    font-weight: 700;
    line-height: 1.2;
}

.display-6 {
    font-size: clamp(1.25rem, 3vw, 2.5rem) !important;
    font-weight: 700;
    line-height: 1.2;
}

/* Text Size Utilities */
.text-xs {
    font-size: clamp(0.65rem, 1.5vw, 0.75rem) !important;
}

.text-sm {
    font-size: clamp(0.8rem, 1.8vw, 0.875rem) !important;
}

.text-base {
    font-size: clamp(0.9rem, 2vw, 1rem) !important;
}

.text-lg {
    font-size: clamp(1rem, 2.5vw, 1.125rem) !important;
}

.text-xl {
    font-size: clamp(1.1rem, 3vw, 1.25rem) !important;
}

.text-2xl {
    font-size: clamp(1.3rem, 3.5vw, 1.5rem) !important;
}

.text-3xl {
    font-size: clamp(1.6rem, 4vw, 1.875rem) !important;
}

.text-4xl {
    font-size: clamp(2rem, 5vw, 2.25rem) !important;
}

.text-5xl {
    font-size: clamp(2.5rem, 6vw, 3rem) !important;
}

/* Font Weight */
.fw-lighter { font-weight: 200 !important; }
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 800 !important; }
.fw-black { font-weight: 900 !important; }

/* Line Height Utilities */
.lh-1 { line-height: 1 !important; }
.lh-sm { line-height: 1.25 !important; }
.lh-base { line-height: 1.5 !important; }
.lh-lg { line-height: 1.75 !important; }
.lh-xl { line-height: 2 !important; }

/* Letter Spacing */
.ls-tight { letter-spacing: -0.05em !important; }
.ls-normal { letter-spacing: 0 !important; }
.ls-wide { letter-spacing: 0.05em !important; }
.ls-wider { letter-spacing: 0.1em !important; }
.ls-widest { letter-spacing: 0.25em !important; }

/* Link Text */
a {
    font-size: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: none;
}

/* List Text */
ul, ol {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: clamp(1.5, 1.6, 1.7);
}

li {
    margin-bottom: clamp(0.25rem, 0.8vw, 0.5rem);
}

/* Blockquote */
blockquote {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: clamp(1.5, 1.6, 1.7);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border-left: clamp(3px, 0.5vw, 5px) solid var(--primary-color);
}

/* Code Text */
code {
    font-size: clamp(0.85rem, 1.8vw, 0.9rem);
    padding: clamp(0.1rem, 0.3vw, 0.2rem) clamp(0.3rem, 0.6vw, 0.4rem);
}

pre code {
    font-size: clamp(0.75rem, 1.6vw, 0.85rem);
    line-height: 1.6;
}

/* Price Text */
.price, .price-tag, .amount {
    font-size: clamp(1.2rem, 3vw, 1.5rem) !important;
    font-weight: 700;
    line-height: 1.2;
}

/* Caption Text */
.caption, figcaption {
    font-size: clamp(0.75rem, 1.6vw, 0.85rem);
    line-height: 1.5;
}

/* ========== MOBILE-SPECIFIC ICON & FONT OVERRIDES ========== */

@media (max-width: 576px) {
    /* Ensure all icons are touch-friendly on mobile */
    i, .bi {
        min-width: 20px;
        min-height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Clickable icons need larger touch area */
    a i, button i, .clickable i {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Prevent text from being too small */
    * {
        min-font-size: 14px;
    }
    
    /* Ensure readability on small screens */
    p, span, div, li {
        font-size: clamp(0.875rem, 2.2vw, 1rem) !important;
    }
}

@media (max-width: 400px) {
    /* Extra small devices - ensure nothing is too tiny */
    h1 { font-size: clamp(1.5rem, 5vw, 1.8rem) !important; }
    h2 { font-size: clamp(1.3rem, 4.5vw, 1.5rem) !important; }
    h3 { font-size: clamp(1.15rem, 4vw, 1.3rem) !important; }
    
    /* Icons scale down slightly but remain visible */
    i, .bi {
        min-width: 18px;
        min-height: 18px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper icons on retina displays */
    i, .bi {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}