/* ==================== RESPONSIVE DESIGN ==================== */

/* Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Medium devices (tablets, 992px to 1199px) */
@media (max-width: 1199.98px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    nav ul li {
        margin-left: 20px;
    }
}

/* Small devices (landscape phones, 768px to 991px) */
@media (max-width: 991.98px) {
    /* Header and Navigation */
    .header-container {
        padding: 15px 0;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
        text-align: center;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 12px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Hero Section */
    .hero {
        height: 70vh;
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    /* Content Layouts */
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .properties-grid,
    .services-grid,
    .testimonials-grid,
    .team-grid,
    .blog-grid,
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Search Form */
    .search-form {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Extra small devices (portrait phones, less than 768px) */
@media (max-width: 767.98px) {
    body {
        padding-top: 70px;
    }
    
    /* Header */
    .header-container {
        padding: 10px 0;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .cta-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero {
        height: 60vh;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Page Header */
    .page-header {
        padding: 80px 0;
        margin-bottom: 40px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    /* Section Titles */
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
    }
    
    /* Content Layouts */
    .properties-grid,
    .services-grid,
    .testimonials-grid,
    .team-grid,
    .blog-grid,
    .values-grid,
    .process-steps,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Property Cards */
    .property-card,
    .service-card,
    .testimonial-card,
    .team-member,
    .blog-card,
    .value-card {
        margin: 0 10px;
    }
    
    /* Property List View */
    .property-list-item {
        grid-template-columns: 1fr;
    }
    
    /* Filter Section */
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .view-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    /* Form Elements */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Blog Layout */
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-top: 40px;
    }
    
    /* FAQ */
    .faq-question {
        padding: 15px;
    }
    
    /* Team Members */
    .team-image {
        width: 150px;
        height: 150px;
    }
    
    /* Section Padding */
    section {
        padding: 60px 0;
    }
}

/* Very small devices (phones, 480px and below) */
@media (max-width: 480px) {
    /* Header */
    .logo {
        font-size: 22px;
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 1.8rem;
    }
    
    /* Page Header */
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .breadcrumb li {
        font-size: 0.9rem;
    }
    
    /* Section Titles */
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    /* Property Features */
    .property-features {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .property-features span {
        flex: 1 0 45%;
    }
    
    /* Testimonials */
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* Contact Details */
    .contact-details li {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-details i {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2rem;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-item {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    /* Back to Top Button */
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* Orientation-specific styles */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 80px 0;
    }
    
    .header-container {
        padding: 8px 0;
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Use higher resolution images if available */
    .hero {
        background-image: linear-gradient(rgba(10, 35, 66, 0.7), rgba(10, 35, 66, 0.7)), url('https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80');
    }
}

/* Print styles */
@media print {
    header, 
    .hero, 
    .search-bar, 
    .cta-section, 
    footer, 
    .mobile-menu-btn,
    .back-to-top {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .property-card, 
    .service-card, 
    .testimonial-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}