/* =========================================
   Eco Space Realtors - MOBILE OVERHAUL (V3.0)
   Specific focus: Android viewports (360px-412px)
   ========================================= */

/* --- MOBILE NAVIGATION --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    z-index: 2000;
    padding: 100px 30px 40px;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.mobile-nav-drawer.active {
    right: 0;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-links a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--c-text);
    text-transform: uppercase;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 900px) {
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
}

/* --- PREMIUM BOTTOM ACTION BAR (ANDROID) --- */
.mobile-action-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--c-border);
    padding: 10px 20px 25px; /* Extra bottom padding for home indicators */
    z-index: 900;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.mobile-action-bar .action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--c-text-light);
}

.mobile-action-bar .action-item i {
    font-size: 1.2rem;
}

.mobile-action-bar .action-item.active {
    color: var(--c-primary);
}

/* --- GLOBAL PADDING & ALIGNMENTS --- */
@media (max-width: 900px) {
.container, 
section, 
.content-section, 
.main-content, 
.prop-main, 
.blog-content,
.about-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* --- FOOTER: ROW-WISE (VERTICAL STACK) --- */
.footer .container > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
    text-align: justify !important;
}

.footer .container > div > div {
    grid-column: span 1 !important;
}

.footer p, 
.footer div[style*="text-align: left"] p {
    text-align: justify !important;
}

/* --- HERO: SLEEK SINGLE ROW BUTTONS --- */
.hero-content .btn-group, 
.hero-actions,
.property-header .nav-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    justify-content: center !important;
    padding: 0 10px !important;
}

.hero-content .btn, 
.property-header .btn {
    flex: 1 !important;
    font-size: 0.85rem !important;
    padding: 12px 10px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
}

/* --- CONTACT & BLOG ICONS --- */
.contact-item i, 
.blog-meta i {
    width: 20px !important;
    height: 20px !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
}

.contact-item {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

/* --- PARTNER PAGE GRIDS --- */
.builder-grid, 
.partner-grid, 
.feature-grid,
.legal-service-grid,
.grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    width: 100% !important;
}

.grid > div {
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 20px;
}

/* --- CONTACT INFO PADDING --- */
.info-card {
    padding: 0 5px !important;
    gap: 15px !important;
}

.icon-box {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.2rem !important;
    border-radius: 12px !important;
}

/* --- TEXT FORMATTING & ALIGNMENT --- */
.blog-content,
.main-content,
.about-content,
.prop-main,
#info-desc,
#info-adv,
#info-amenities {
    text-align: justify !important;
    line-height: 1.6 !important;
    font-size: 1.05rem !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.prop-main p,
.blog-content p,
#info-desc p {
    margin-bottom: 1.5rem !important;
}

/* --- BLOG HERO & ICONS --- */
.blog-hero h1 {
    font-size: 1.8rem !important;
    padding: 0 10px !important;
    line-height: 1.2 !important;
}

/* Fix Blog Icons being cut off/missing */
.blog-meta {
    font-size: 0.8rem !important;
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    padding: 10px 0 !important;
}

.blog-meta i {
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
}

/* --- BUTTON REFINEMENT (SLEEK SINGLE ROW) --- */
.hero-content div[style*="flex"], 
.hero-actions,
.btn-group,
.property-header .nav-actions,
.cta-section div[style*="flex"] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    justify-content: center !important;
    padding: 0 10px !important;
    width: 100% !important;
}

.hero-cta {
    flex-wrap: wrap !important;
}

.hero-cta .btn {
    white-space: normal !important;
}

.btn {
    flex: 1 !important;
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    height: auto !important;
    white-space: nowrap !important;
    text-align: center !important;
    min-width: 0 !important;
}

.btn i {
    width: 14px !important;
    margin-right: 4px !important;
}
}

/* --- MEDIA QUERIES --- */
@media (max-width: 900px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    .nav-links {
        display: none !important;
    }

    .nav-actions {
        display: none !important;
    }

    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
    }

    .hero-tagline {
        font-size: 0.85rem !important;
        letter-spacing: 0.1em !important;
    }

    .hero-description {
        font-size: 0.95rem !important;
    }

    .mobile-action-bar {
        display: none !important;
    }

    main {
        margin-bottom: 0 !important;
    }

    /* Properties Filter Fix */
    .filters-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .whatsapp-float, .global-whatsapp {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .hero-cta .btn {
        width: 100% !important;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .section-title {
        font-size: 1.8rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }

    .ecospace-grid {
        display: flex !important;
        flex-direction: column !important;
    }
}

/* --- ANDROID CONTENT FIT FOR HOME + ABOUT --- */
@media (max-width: 420px) {
    p,
    .hero-description,
    .hero-proof-card p,
    .journey-head p,
    .journey-card p,
    .alliance-card p,
    .alliance-mini p,
    .kpi-card p,
    .buyers-card p,
    .process-card p,
    .intro-copy p,
    .intro-badge p,
    .persona-item p,
    .section-subtitle,
    .about-hero-subtitle,
    .story-text p,
    .value-card p,
    .alliance-panel p,
    .team-content p,
    .founder-copy p,
    .operating-card p,
    .cta-band p,
    .footer p,
    .stat-item p {
        text-align: justify !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
    }

    .hero,
    .about-hero {
        min-height: auto !important;
    }

    .hero-content,
    .about-hero-content {
        padding-top: 28px !important;
        padding-bottom: 24px !important;
    }

    .hero-title {
        font-size: 1.7rem !important;
        line-height: 1.18 !important;
        max-width: 100% !important;
    }

    .about-hero-title,
    .cta-band h2,
    .cta-section h2 {
        font-size: 1.9rem !important;
        line-height: 1.2 !important;
    }

    .about-hero-subtitle,
    .hero-description {
        font-size: 0.98rem !important;
        max-width: 100% !important;
    }

    .hero-proof {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .hero-proof-card,
    .journey-card,
    .buyers-card,
    .process-card,
    .value-card,
    .operating-card,
    .alliance-panel,
    .alliance-mini,
    .team-content {
        padding: 18px !important;
    }

    .journey-section {
        margin-top: 10px !important;
    }

    .journey-shell,
    .alliance-shell,
    .alliances-shell {
        padding: 18px !important;
        border-radius: 22px !important;
    }

    .journey-head h2,
    .section-title,
    .story-text h2,
    .section-lead h2 {
        font-size: 1.6rem !important;
        line-height: 1.2 !important;
    }

    .stats-section {
        padding: 56px 0 !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }

    .stat-item h2 {
        font-size: 2rem !important;
        line-height: 1.05 !important;
        margin-bottom: 8px !important;
    }

    .stat-item p {
        font-size: 0.86rem !important;
        line-height: 1.35 !important;
        text-align: center !important;
    }

    .chip-cloud span,
    .hero-points span {
        width: 100% !important;
        text-align: center !important;
        font-size: 0.88rem !important;
    }

    .story-image-note,
    .intro-badges {
        position: static !important;
        inset: auto !important;
        margin-top: 14px !important;
    }

    .team-card,
    .story-grid,
    .founder-note,
    .alliances-grid,
    .operating-grid,
    .values-grid,
    .journey-grid,
    .buyers-grid,
    .process-grid,
    .intro-layout,
    .persona-strip {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .cta-band,
    .cta-section {
        padding: 64px 0 !important;
    }
}

/* Chatbot Fullscreen on Mobile */
@media (max-width: 600px) {
    body {
        padding-bottom: 110px !important;
    }

    .smart-fab {
        left: 14px !important;
        bottom: calc(14px + env(safe-area-inset-bottom)) !important;
        gap: 10px !important;
    }

    .smart-fab-primary {
        width: 46px !important;
        height: 46px !important;
    }

    .smart-fab-primary-glyph {
        width: 28px !important;
        height: 28px !important;
    }

    .smart-fab-action {
        min-height: 42px !important;
        padding: 9px 14px !important;
    }

    .smart-icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
    }

    .smart-fab-label {
        font-size: 0.82rem !important;
    }

    .smart-fab-share-menu {
        left: 0 !important;
        right: auto !important;
        bottom: calc(100% + 10px) !important;
        min-width: 170px !important;
    }

    .esrs-faq-modal {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .esrs-faq-dialog {
        position: relative !important;
        width: 100% !important;
        height: min(88vh, 100%) !important;
        border-radius: 24px 24px 0 0 !important;
        transform: translateY(24px) !important;
        left: auto !important;
        top: auto !important;
    }

    .esrs-faq-modal.is-open .esrs-faq-dialog {
        transform: translateY(0) !important;
    }

    .esrs-faq-modal-head {
        padding: 20px 18px 16px !important;
        gap: 14px !important;
        cursor: default !important;
    }

    .esrs-faq-modal-body {
        padding: 16px 18px 20px !important;
    }

    .esrs-faq-heading h2 {
        font-size: 1.55rem !important;
        line-height: 1.18 !important;
    }

    .esrs-faq-heading p,
    .esrs-faq-answer p {
        text-align: justify !important;
    }

    .esrs-faq-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    .esrs-faq-close .smart-icon {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
    }

    .esrs-faq-item summary {
        padding: 16px 18px !important;
        font-size: 0.95rem !important;
    }

    .esrs-faq-answer {
        padding: 0 18px 18px !important;
    }

    #esr-chat {
        bottom: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
    }

    body.chat-open {
        overflow: hidden;
    }
}

/* --- PARTNER PAGE: IMAGE FIRST ON MOBILE --- */
@media (max-width: 900px) {
    .benefit-row { 
        flex-direction: column-reverse !important; 
        gap: 30px !important; 
    }
    .benefit-img { 
        margin-bottom: 0 !important; 
        width: 100% !important;
    }
    .benefit-img img {
        width: 100% !important;
        border-radius: 24px !important;
    }
    .benefit-content h2 { 
        margin-top: 20px !important; 
        font-size: 2rem !important;
    }
}
