/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1400px) {
    .container { max-width: 1200px; }
}

@media (max-width: 1200px) {
    .container { padding: 0 20px; }
    .hero-content h1 { font-size: 3.8rem; }
    .section-header h2 { font-size: 2.8rem; }
    .about-grid { gap: 60px; }
    .team-grid { gap: 40px; }
    .footer-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-about { grid-column: span 2; }
}

@media (max-width: 1024px) {
    .hero-content h1 { font-size: 3.2rem; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .faq-grid { grid-template-columns: 1fr; }
    .property-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
    .section-padding { padding: 100px 0; }
    .service-process-grid { grid-template-columns: repeat(2, 1fr); }
    .service-process::before { display: none; }
    .service-process-item { margin-bottom: 40px; }
    .service-process-item::before { top: -20px; }
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-about { grid-column: span 2; }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    .top-bar .container { justify-content: center; }
    .top-bar .top-socials { display: none; }
    
    header { height: var(--mobile-header-height); }
    header.scrolled { height: 70px; }
    
    .nav-menu {
        position: fixed; 
        top: var(--mobile-header-height); 
        left: -100%; 
        width: 100%; 
        height: calc(100vh - var(--mobile-header-height));
        background: var(--white); 
        flex-direction: column; 
        padding: 40px 20px; 
        transition: 0.4s;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
        gap: 0;
    }
    [dir="rtl"] .nav-menu { left: auto; right: -100%; }
    [dir="rtl"] .nav-menu.active { right: 0; }
    .nav-menu.active { left: 0; }
    .nav-link { 
        padding: 18px 0; 
        width: 100%; 
        border-bottom: 1px solid #eee;
        font-size: 1.1rem;
    }
    .lang-switch { 
        border: none; 
        padding: 25px 0 0; 
        justify-content: center;
        border-top: 1px solid #eee;
        margin-top: 20px;
    }
    
    .hamburger { display: flex; }
    
    .hero { 
        min-height: 85vh; 
        padding: 100px 0 60px;
        background-attachment: scroll;
    }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.2rem; }
    .hero-search { 
        flex-direction: column; 
        padding: 20px; 
        gap: 15px;
    }
    .hero-search select, .hero-search input, .hero-search button { 
        width: 100%; 
        height: 55px; 
        border-radius: var(--border-radius);
    }
    
    .section-header h2 { font-size: 2.3rem; }
    .section-padding { padding: 80px 0; }
    .section-padding-sm { padding: 60px 0; }
    .section-padding-xs { padding: 40px 0; }
    
    .about-badge { 
        position: relative; 
        bottom: 0; 
        left: 0; 
        margin-top: 30px; 
        max-width: 100%;
    }
    [dir="rtl"] .about-badge { right: 0; }
    
    .stats-grid { grid-template-columns: 1fr; gap: 30px; }
    .stat-item h3 { font-size: 3rem; }
    
    .team-grid { grid-template-columns: 1fr; }
    
    .property-grid { grid-template-columns: 1fr; }
    
    .testimonial-content { padding: 30px 25px; }
    
    .form-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .contact-form-container { padding: 40px 30px; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-about { grid-column: span 1; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-bottom-links { justify-content: center; }
    
    .service-process-grid { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 2.5rem; }
    .legal-section h2 { font-size: 1.8rem; }
    .legal-section h3 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2rem; }
    .section-header h2 { font-size: 1.8rem; }
    .btn { padding: 14px 28px; }
    .services-grid { grid-template-columns: 1fr; }
    .contact-details-top { flex-direction: column; align-items: center; gap: 10px; }
    .contact-details-top span { margin-right: 0; margin-bottom: 5px; }
    [dir="rtl"] .contact-details-top span { margin-left: 0; }
    .top-bar .container { padding: 15px 0; }
    .property-filters { padding: 20px; }
    .filter-actions { flex-direction: column; }
    .filter-actions .btn { width: 100%; }
    .pagination { flex-wrap: wrap; }
    .page-header { padding: 70px 0; }
    .page-header h1 { font-size: 2rem; }
    .testimonial-author { flex-direction: column; text-align: center; gap: 15px; }
}

/* --- DARK MODE SUPPORT --- */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #f0f0f0;
        --text-light: #b0b0b0;
        --bg-light: #1a1a1a;
        --bg-grey: #2a2a2a;
        --secondary: #f0f0f0;
        --white: #2a2a2a;
    }
    
    .service-card,
    .property-card,
    .team-card,
    .contact-form-container,
    .faq-item {
        background: #333;
    }
    
    .form-control {
        background: #2a2a2a;
        border-color: #444;
        color: #f0f0f0;
    }
    
    .service-card:hover,
    .property-card:hover,
    .team-card:hover,
    .faq-item:hover {
        background: #3a3a3a;
    }
}

/* --- HIGH CONTRAST MODE --- */
@media (prefers-contrast: high) {
    :root {
        --primary: #ff9900;
        --secondary: #000000;
        --text: #000000;
        --text-light: #333333;
    }
    
    .btn {
        border-width: 3px;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

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