/* ========================================
   RESPONSIVE STYLES
   Mobile-First Approach
   ======================================== */

/* Tablet Devices (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .nav-links {
        gap: 20px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .section-title {
        font-size: 32px;
    }

    .property-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Mobile Devices (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Navigation */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-actions {
        gap: 10px;
    }

    .nav-actions .btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .user-dropdown-toggle {
        padding: 6px 12px;
        font-size: 14px;
    }

    .user-dropdown-toggle span {
        display: none;
    }

    /* Hero Section */
    .hero {
        padding: 60px 0;
    }

    .hero-content h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 16px;
    }

    /* Search Box */
    .search-box {
        padding: 20px;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Section */
    .section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    /* Property Grid */
    .property-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .property-image {
        height: 220px;
    }

    .property-price {
        font-size: 20px;
    }

    .property-title {
        font-size: 16px;
    }

    .property-features {
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 10px;
    }

    /* Flash Message */
    .flash-message {
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 12px 30px;
        font-size: 16px;
    }

    /* Forms */
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }

    /* Cards */
    .card {
        margin-bottom: 20px;
    }

    /* Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Small Mobile Devices (max-width: 480px) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .logo img {
        height: 40px;
    }

    .logo-text {
        font-size: 20px;
    }

    .hero-content h1 {
        font-size: 26px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
    }

    .property-image {
        height: 200px;
    }

    .property-content {
        padding: 15px;
    }

    .property-price {
        font-size: 18px;
    }

    .property-features {
        font-size: 13px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .search-box {
        padding: 15px;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 14px;
    }

    .nav-actions .btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .user-dropdown-menu {
        width: 200px;
        right: -20px;
    }

    .flash-content {
        padding: 12px 15px;
        font-size: 14px;
    }

    .property-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .property-footer .btn {
        width: 100%;
    }
}

/* Landscape Mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }

    .section {
        padding: 40px 0;
    }

    .nav-links {
        height: calc(100vh - 60px);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .search-box,
    .btn,
    .action-btn,
    .flash-message,
    .mobile-menu-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .property-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
    }

    .property-card,
    .form-control,
    .btn {
        border: 2px solid #000;
    }
}