/* =====================================================
   Propertype — Responsive Breakpoints (Mobile First)
   ===================================================== */

/* =====================================================
   MOBILE — up to 480px
   ===================================================== */
@media (max-width: 480px) {
    .container, .container-wide {
        padding: 0 var(--space-md);
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .hero {
        min-height: 75vh;
        padding-top: calc(var(--header-height) + var(--space-xl));
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    /* Search */
    .search-box {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 6px;
    }

    .search-field {
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        padding: 10px 14px;
    }

    .search-field:last-of-type {
        border-bottom: none;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        border-radius: var(--radius-md);
        padding: 14px;
    }

    .search-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: var(--space-xs);
        scrollbar-width: none;
    }

    .search-tabs::-webkit-scrollbar { display: none; }

    .search-tab {
        padding: 8px 20px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    /* Stats */
    .stats-bar {
        gap: var(--space-lg);
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Property Grid */
    .property-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .property-card-image {
        height: 200px;
    }

    /* Grid */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    /* Buttons */
    .btn-lg {
        padding: 14px 28px;
        font-size: 0.95rem;
    }

    /* City Scroll */
    .city-card {
        flex: 0 0 180px;
    }

    .city-card-image {
        height: 110px;
    }
}

/* =====================================================
   SMALL TABLETS — 481px to 768px
   ===================================================== */
@media (min-width: 481px) and (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .search-field {
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
    }

    .search-field:last-of-type {
        border-bottom: none;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        border-radius: var(--radius-md);
    }

    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .property-card-image {
        height: 180px;
    }

    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar {
        gap: var(--space-xl);
    }
}

/* =====================================================
   TABLETS — up to 768px (shared mobile/tablet)
   ===================================================== */
@media (max-width: 768px) {
    /* Header — Mobile */
    .nav-links {
        display: none;
    }

    .nav-actions .btn:not(.btn-icon) {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    /* Section headers */
    .section-header {
        margin-bottom: var(--space-xl);
    }

    .section-label {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
}

/* =====================================================
   TABLET-LANDSCAPE — 769px to 1024px
   ===================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        min-height: 75vh;
    }

    .search-field {
        padding: 10px 14px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.88rem;
    }

    .nav-links {
        gap: var(--space-xs);
    }
}

/* =====================================================
   DESKTOP — 1025px to 1280px
   ===================================================== */
@media (min-width: 1025px) and (max-width: 1280px) {
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =====================================================
   WIDE DESKTOP — 1281px+
   ===================================================== */
@media (min-width: 1281px) {
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =====================================================
   ULTRA WIDE — 1600px+
   ===================================================== */
@media (min-width: 1600px) {
    .property-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .container {
        max-width: 1400px;
    }
}

/* =====================================================
   HEIGHT ADJUSTMENTS
   ===================================================== */
@media (max-height: 700px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--space-xl));
        padding-bottom: var(--space-xl);
    }
}

/* =====================================================
   HOVER vs TOUCH — disable hover effects on touch
   ===================================================== */
@media (hover: none) {
    .property-card:hover {
        transform: none;
        box-shadow: var(--shadow-card);
    }

    .glass-card:hover {
        transform: none;
    }

    .city-card:hover {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .header, .footer, .search-container, .mobile-nav, .mobile-nav-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .main-content {
        padding-top: 0;
    }

    .property-card {
        break-inside: avoid;
        border: 1px solid #ddd;
    }
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
