/*
 * 21estate - Responsive Stylesheet
 */

/* Large Screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Regular Desktops (992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    /* About section - 4 columns to 2 on smaller desktops */
    .about-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Lending grid - 4 to 2 columns */
    .lending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        gap: 1.5rem;
    }
}

/* Tablets (768px to 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 2.5rem;
    }
    
    /* Mobile Menu */
    .mobile-menu-btn {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background-color: var(--primary-color);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 80px 20px 30px;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul li {
        margin-left: 0;
    }
    
    /* Service Cards */
    .services {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Process Steps */
    .lending-process {
        flex-direction: column;
    }
    
    .process-step {
        margin-bottom: 2rem;
    }
    
    .process-step:not(:last-child):after {
        display: none;
    }
    
    /* Partnership Steps */
    .partnership-steps-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Layout */
    .contact-top-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Large Mobile Phones and Small Tablets (576px to 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    /* Typography */
    .section-title {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    /* Hero Buttons */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-secondary {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    /* Services/Portfolio */
    .services {
        grid-template-columns: 1fr;
    }
    
    /* About */
    .about-grid-4col {
        grid-template-columns: 1fr;
    }
    
    /* Lending */
    .lending-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Fix contact info spacing */
    .contact-info {
        margin-bottom: 1rem;
    }
    
    .lending-cta {
        padding: 2rem 1rem;
    }
}

/* Mobile Phones (up to 575px) */
@media (max-width: 575px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    /* Typography */
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    /* Header */
    .logo {
        font-size: 1.5rem;
    }
    
    /* Steps Layout */
    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .step-icon {
        margin-bottom: 1rem;
    }
    
    /* Contact Layout */
    .contact-detail {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    /* Social Links in footer */
    .social-links {
        justify-content: center;
    }
    
    /* Fix the language selector to remain inline */
    .language-selector {
        margin-left: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    /* Further typography reductions */
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    /* Button sizes */
    .btn {
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
    }
}

/* Height based media queries */
@media (max-height: 700px) {
    .hero {
        height: auto;
        min-height: 500px;
        padding-bottom: 2rem;
    }
}

/* Special Case: Mobile landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 450px;
    }
    
    .hero-content {
        padding: 100px 0 30px;
    }
    
    .hero-buttons {
        flex-direction: row;
    }
}

/* Fix mobile menu scrolling issues */
@media (max-width: 991px) {
    body.menu-open {
        overflow: hidden;
    }
    
    nav.active li {
        animation: fadeInRight 0.5s ease forwards;
        opacity: 0;
        transform: translateX(20px);
    }
}

/* Animations */
@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}