/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.logo i {
    margin-right: 8px;
    color: #f39c12;
}

.tagline {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 300;
}

.nav {
    display: flex;
    gap: 16px;
}

.nav-link {
    color: white;
    font-size: 18px;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(44, 62, 80, 0.85)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600"><rect width="1000" height="600" fill="%23ecf0f1"/><circle cx="200" cy="150" r="50" fill="%233498db" opacity="0.1"/><circle cx="800" cy="400" r="80" fill="%23e74c3c" opacity="0.1"/><rect x="100" y="300" width="200" height="150" fill="%232ecc71" opacity="0.1"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 32px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
    font-weight: 300;
}

.search-bar {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 14px;
    color: #333;
    background: transparent;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.search-input::placeholder {
    color: #7f8c8d;
    font-weight: 400;
}

.search-input:focus {
    color: #2c3e50;
}

.search-btn {
    background: #f39c12;
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #e67e22;
}

/* Featured Property Section */
.featured-property {
    padding: 24px 0 40px;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.property-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 8px;
}

.nav-counter {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

.nav-hint {
    font-size: 12px;
    color: #95a5a6;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-hint i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.property-card-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    perspective: 1000px;
}

.property-card-main {
    position: relative;
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
}

.property-card-main:active {
    cursor: grabbing;
}

/* Property Card Styles - Enhanced for Single Card */
.property-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.property-card:active {
    transform: scale(0.98);
}

.property-images {
    position: relative;
    height: 280px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.property-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
}

.nav-btn {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn i {
    font-size: 16px;
}

.property-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.property-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-dot.active {
    background: #3498db;
    transform: scale(1.2);
}

.property-dot:hover {
    background: #7f8c8d;
}

.property-slider {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.property-image {
    flex: 0 0 100%;
    height: 100%;
    object-fit: cover;
}

.slider-nav {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background: white;
}

.property-info {
    padding: 16px;
}

.property-location {
    display: flex;
    align-items: center;
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 8px;
}

.property-location i {
    margin-right: 6px;
    color: #e74c3c;
}

.property-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.property-units {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.unit-badge {
    background: #ecf0f1;
    color: #34495e;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.property-price {
    font-size: 16px;
    font-weight: 600;
    color: #27ae60;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    min-height: 100vh;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #2c3e50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    margin-right: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background: rgba(255,255,255,0.2);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 16px;
}

/* Building Gallery */
.building-gallery {
    margin-bottom: 24px;
}

.gallery-main {
    margin-bottom: 12px;
}

.main-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-thumbnails::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    flex: 0 0 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
    border-color: #3498db;
}

/* Building Info */
.building-info {
    margin-bottom: 24px;
}

.building-location {
    display: flex;
    align-items: center;
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 12px;
}

.building-location i {
    margin-right: 8px;
    color: #e74c3c;
}

.building-description {
    color: #555;
    line-height: 1.6;
}

/* Units Section */
.units-section {
    margin-bottom: 24px;
}

.units-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2c3e50;
}

.unit-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #3498db;
}

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

.unit-type {
    font-weight: 600;
    color: #2c3e50;
}

.unit-price {
    font-weight: 600;
    color: #27ae60;
}

.unit-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.feature-tag {
    background: white;
    color: #555;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.unit-photos {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.unit-photos::-webkit-scrollbar {
    display: none;
}

.unit-photo {
    flex: 0 0 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

/* Contact Section */
.contact-section {
    display: flex;
    gap: 12px;
}

.contact-btn,
.whatsapp-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contact-btn {
    background: #3498db;
    color: white;
}

.contact-btn:hover {
    background: #2980b9;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
}

.whatsapp-btn:hover {
    background: #128c7e;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #ecf0f1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(52, 152, 219, 0.2);
    border-left: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading::after {
    content: 'Loading premium properties...';
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Tablet Styles */
@media (min-width: 768px) {
    .property-card-container {
        max-width: 500px;
    }
    
    .property-images {
        height: 320px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .modal-content {
        max-width: 600px;
        margin: 20px auto;
        border-radius: 12px;
        min-height: auto;
        max-height: 90vh;
        overflow: hidden;
    }
    
    .main-image {
        height: 300px;
    }
    
    .nav-hint {
        font-size: 14px;
    }
    
    .property-controls {
        gap: 30px;
        margin-top: 32px;
    }
    
    .nav-btn {
        width: 56px;
        height: 56px;
    }
    
    /* Search Modal Responsive - Autocomplete */
    .search-modal {
        max-width: 450px;
    }
    
    .house-type-btn {
        padding: 12px 16px;
    }
    
    .house-type-btn i {
        font-size: 18px;
    }
    
    .house-type-btn span {
        font-size: 14px;
    }
    
    .quick-ranges {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .quick-range-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .search-step-header h4 {
        font-size: 15px;
    }
    
    .search-step-header p {
        font-size: 12px;
    }
    
    .range-display {
        font-size: 14px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .property-card-container {
        max-width: 600px;
    }
    
    .property-images {
        height: 360px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .featured-property {
        padding: 40px 0 60px;
    }
    
    .footer-contact {
        gap: 16px;
    }
    
    .contact-link {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .footer-tagline {
        font-size: 12px;
    }
}

/* Extra refinements for premium feel */
.property-card-main {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
}

.nav-btn {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

/* Subtle animations for native feel */
.property-card {
    animation: cardEntry 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardEntry {
    0% { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.nav-counter, .nav-hint {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Modal Styles - Autocomplete Dropdown */
.search-modal {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1500;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(52, 152, 219, 0.2);
    overflow: hidden;
    animation: autocompleteSlideDown 0.2s ease;
    max-width: 400px;
    margin: 0 auto;
}

.search-modal::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(52, 152, 219, 0.2);
}

.search-modal::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid white;
}

@keyframes autocompleteSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 400px;
    }
}

.search-modal-content {
    padding: 16px;
}

.search-step {
    animation: stepFadeIn 0.2s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-step-header {
    text-align: left;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
}

.search-step-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.search-step-header p {
    font-size: 11px;
    color: #7f8c8d;
    margin: 0;
}

/* House Type Options - Compact Autocomplete Style */
.house-type-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.house-type-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    text-align: left;
    width: 100%;
}

.house-type-btn:hover {
    background: #f1f8ff;
    color: #2980b9;
}

.house-type-btn:active {
    background: #3498db;
    color: white;
    transform: scale(0.98);
}

.house-type-btn i {
    font-size: 16px;
    opacity: 0.7;
    width: 16px;
    text-align: center;
}

.house-type-btn span {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

/* Rent Range Styles - Compact Autocomplete */
.rent-range-container {
    width: 100%;
}

.range-display {
    text-align: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    font-size: 13px;
}

.range-label {
    font-size: 13px;
    font-weight: 600;
}

.range-sliders {
    margin-bottom: 12px;
    padding: 0 4px;
}

.range-input {
    margin-bottom: 10px;
}

.range-input label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.range-input input[type="range"] {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #ecf0f1;
    outline: none;
    -webkit-appearance: none;
}

.range-input input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.range-input input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.quick-ranges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

.quick-range-btn {
    background: #f8f9fa;
    border: 1px solid #ecf0f1;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 10px;
    font-weight: 500;
    color: #34495e;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.quick-range-btn:hover {
    background: #e8f4fd;
    color: #2980b9;
    border-color: #3498db;
}

.quick-range-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.range-actions {
    text-align: center;
}

.apply-range-btn {
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

.apply-range-btn:hover {
    background: #229954;
}

.apply-range-btn:active {
    transform: scale(0.98);
}

/* Search Bar Positioning */
.search-bar {
    position: relative;
}

.search-bar.active .search-input {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-bar.active {
    z-index: 1600;
}

/* Micro-interactions */
.unit-badge {
    transition: all 0.2s ease;
}

.unit-badge:hover {
    background: #d5dbdb;
    transform: translateY(-1px);
}

.feature-tag {
    transition: all 0.2s ease;
}

.feature-tag:hover {
    background: #ecf0f1;
    transform: translateY(-1px);
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 24px 0 12px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 20px;
}

.footer-brand {
    flex: 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-logo i {
    color: #f39c12;
    font-size: 18px;
}

.footer-tagline {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 300;
}

.footer-contact {
    display: flex;
    gap: 12px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.contact-link:active {
    transform: translateY(0) scale(0.95);
}

.contact-link.whatsapp:hover {
    background: rgba(37, 211, 102, 0.2);
}

.contact-link i {
    font-size: 16px;
}

.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    opacity: 0.7;
    line-height: 1.3;
}

/* Native App Enhancements */
body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
}

/* Enhanced Native Feel */
.header {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95), rgba(52, 152, 219, 0.95));
}

.property-card {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.nav-btn, .contact-link, .property-card {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Hide Scrollbars - Mobile Optimization */
body {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

body::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

/* Hide scrollbars for all scrollable elements */
* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

/* Specific scrollbar hiding for image galleries */
.gallery-thumbnails,
.unit-photos {
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gallery-thumbnails::-webkit-scrollbar,
.unit-photos::-webkit-scrollbar {
    display: none;
}

/* iOS Safe Area Support */
@supports (padding: max(0px)) {
    .header {
        padding-top: max(16px, env(safe-area-inset-top));
    }
    
    .footer {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Mobile-Specific Scrollbar and Overflow Handling */
@media (max-width: 767px) {
    /* Ensure no horizontal scrolling on mobile */
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Hide scrollbars more aggressively on mobile */
    .container,
    .property-card,
    .modal-content,
    .search-modal {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .container::-webkit-scrollbar,
    .property-card::-webkit-scrollbar,
    .modal-content::-webkit-scrollbar,
    .search-modal::-webkit-scrollbar {
        display: none;
        width: 0 !important;
        height: 0 !important;
    }
    
    /* Prevent image overflow */
    .property-image,
    .main-image,
    .thumbnail,
    .unit-photo {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* Touch and Swipe Interactions */
@media (hover: none) and (pointer: coarse) {
    .property-card:hover {
        transform: none;
    }
    
    .property-card:active {
        transform: scale(0.98);
    }
    
    .nav-btn:hover {
        background: #3498db;
        color: white;
        border-color: #3498db;
        transform: none;
    }
    
    .nav-btn:active {
        transform: scale(0.9);
    }
    
    /* Mobile Search Modal Optimizations */
    .house-type-btn:hover {
        background: #f8f9fa;
        color: inherit;
        border-color: #ecf0f1;
        transform: none;
    }
    
    .house-type-btn:active {
        background: #3498db;
        color: white;
        border-color: #3498db;
        transform: scale(0.95);
    }
    
    .quick-range-btn:hover {
        background: #ecf0f1;
        color: #34495e;
        transform: none;
    }
    
    .quick-range-btn:active {
        background: #3498db;
        color: white;
        transform: scale(0.95);
    }
}