/* ===== MOBILE-FIRST RESPONSIVE DESIGN ===== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --border-radius: 10px;
    --box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    --mobile-padding: 1rem;
}

* {
    box-sizing: border-box;
}

/* Base Mobile Styles */
body {
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
    max-width: 100%;
}

/* ===== HERO SECTION MOBILE OPTIMIZATION ===== */
.hero-section {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(52, 152, 219, 0.8) 100%), 
                url('../images/hero-bg.jpg') center/cover;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-section .lead {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.search-filter {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.search-filter .form-select,
.search-filter .form-control {
    margin-bottom: 1rem;
    font-size: 16px; /* Prevents zoom on iOS */
}

/* ===== PROPERTY CARDS MOBILE OPTIMIZATION ===== */
.property-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    box-shadow: var(--box-shadow);
    height: 100%;
    margin-bottom: 1.5rem;
}

.property-image-slider {
    height: 200px;
    position: relative;
}

.property-image-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-info {
    padding: 1rem;
}

.property-info h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.property-info .price {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.property-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.property-features span {
    background: var(--light-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    color: var(--dark-text);
}

/* ===== NAVIGATION MOBILE OPTIMIZATION ===== */
.navbar-brand {
    font-size: 1.1rem;
    font-weight: 600;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* ===== PROPERTY DETAILS PAGE MOBILE OPTIMIZATION ===== */
.property-main-slider .slick-slide img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.property-thumb-slider {
    margin: 0.5rem -0.25rem;
}

.property-thumb-slider .slick-slide {
    padding: 0 0.25rem;
}

.property-thumb-slider img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.property-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.9rem;
}

.feature-item i {
    width: 25px;
    color: var(--accent-color);
}

/* ===== FORM MOBILE OPTIMIZATION ===== */
.form-control, .form-select {
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 16px; /* Prevents zoom on iOS */
    transition: border-color 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
}

/* ===== SEARCH/FILTER MOBILE OPTIMIZATION ===== */
.search-filter .row.g-3 {
    margin: 0 -0.5rem;
}

.search-filter .row.g-3 > [class*="col-"] {
    padding: 0 0.5rem;
}

/* ===== SLICK SLIDER MOBILE OPTIMIZATION ===== */
.property-slider .slick-slide {
    padding: 0 0.5rem;
}

.property-slider .slick-prev,
.property-slider .slick-next {
    width: 35px;
    height: 35px;
    z-index: 2;
}

.property-slider .slick-prev { left: -10px; }
.property-slider .slick-next { right: -10px; }

.property-slider .slick-prev:before,
.property-slider .slick-next:before {
    font-size: 16px;
}

/* ===== MODAL MOBILE OPTIMIZATION ===== */
.modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
}

.modal-content {
    border-radius: 15px;
    border: none;
}

/* ===== FOOTER MOBILE OPTIMIZATION ===== */
footer {
    text-align: center;
}

footer .row > div {
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ===== TABLET STYLES (768px and up) ===== */
@media (min-width: 768px) {
    body {
        font-size: 15px;
    }
    
    .container {
        max-width: 720px;
        margin: 0 auto;
    }
    
    .hero-section {
        min-height: 60vh;
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .property-image-slider {
        height: 250px;
    }
    
    .property-main-slider .slick-slide img {
        height: 400px;
    }
    
    .property-thumb-slider img {
        height: 80px;
    }
    
    .search-filter .form-select,
    .search-filter .form-control {
        margin-bottom: 0;
    }
    
    footer {
        text-align: left;
    }
    
    .social-links {
        justify-content: flex-start;
    }
}

/* ===== DESKTOP STYLES (992px and up) ===== */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .hero-section {
        min-height: 80vh;
        padding: 4rem 0;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .property-image-slider {
        height: 280px;
    }
    
    .property-main-slider .slick-slide img {
        height: 500px;
    }
    
    .property-sidebar {
        position: sticky;
        top: 100px;
        margin-top: 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* ===== LARGE DESKTOP STYLES (1200px and up) ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
}

/* ===== MOBILE-SPECIFIC UTILITIES ===== */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* ===== TOUCH-FRIENDLY INTERACTIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .property-card:hover {
        transform: none; /* Disable hover effects on touch devices */
    }
    
    .btn, .form-control, .form-select {
        min-height: 44px; /* Better touch targets */
    }
    
    .property-features span {
        padding: 0.5rem 1rem; /* Larger touch targets */
    }
}

/* ===== MOBILE MENU ENHANCEMENTS ===== */
.navbar-collapse {
    background: var(--dark-text);
    margin: 0 -1rem;
    padding: 1rem;
}

@media (min-width: 992px) {
    .navbar-collapse {
        background: transparent;
        margin: 0;
        padding: 0;
    }
}

/* ===== MOBILE SEARCH ENHANCEMENT ===== */
.mobile-search-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .mobile-search-btn {
        display: none;
    }
}

/* ===== IMAGE OPTIMIZATION FOR MOBILE ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== LOADING STATES FOR MOBILE ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ===== SWIPE-INDICATOR FOR SLIDERS ===== */
.swipe-indicator {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .swipe-indicator {
        display: none;
    }
}
/* Property Grid Layout */
.property-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.property-badge.bg-warning {
    background: linear-gradient(45deg, #f39c12, #e67e22) !important;
}

.property-badge.bg-success {
    background: linear-gradient(45deg, #27ae60, #2ecc71) !important;
}

/* Ensure 4 cards per row on large screens */
@media (min-width: 1200px) {
    .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }
}

/* Responsive adjustments */
@media (max-width: 1199px) and (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (max-width: 767px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Property card enhancements */
.property-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.property-info {
    padding: 20px;
}

.property-info .price {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.3em;
    margin: 10px 0;
}

.property-features {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.property-features span {
    background: var(--light-bg);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    color: var(--dark-text);
}