/* ═══════════════════════════════════════
   ALLIANCE ESTATE — Responsive Styles
   Breakpoints: 1200 / 1024 / 768 / 480
   ═══════════════════════════════════════ */

/* ── Large Desktop Tweaks ── */
@media (max-width: 1200px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    .services-stack {
        gap: 3rem;
    }
    .footer-grid {
        gap: 2rem;
    }
    .newsletter-card {
        padding: 3rem;
    }
}

/* ── Tablet / Small Laptop ── */
@media (max-width: 1024px) {
    :root {
        --container: 100%;
    }

    /* Nav */
    .nav-links { display: none; }
    .nav-actions { display: none; }
    .mobile-toggle { display: flex; }

    /* Hero */
    .hero { min-height: 90vh; padding: 7rem 0 3rem; }
    .hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
    .hero-sub { font-size: 1rem; }
    .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
    .stat strong { font-size: 1.3rem; }

    /* Listings */
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Services */
    .service-row {
        min-height: 400px;
    }
    .service-content {
        padding: 2.5rem;
    }
    .service-content h3 {
        font-size: 1.6rem;
    }

    /* Newsletter */
    .newsletter-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2.5rem;
    }
    .newsletter-left h2 { font-size: 1.8rem; }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-brand p { max-width: 100%; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

    /* Chatbot */
    .chatbot-window {
        width: 340px;
        height: 480px;
        right: 1rem;
        bottom: 5.5rem;
    }
    .chatbot-fab {
        right: 1rem;
        bottom: 1.5rem;
        width: 54px;
        height: 54px;
        font-size: 1.15rem;
    }
}

/* ── Tablet Portrait ── */
@media (max-width: 768px) {
    .section-container {
        padding: 0 1.25rem;
    }

    /* Banner */
    .top-banner { padding: 0.5rem 2.5rem 0.5rem 1rem; }
    .banner-content { 
        font-size: 0.72rem; 
        gap: 0.5rem; 
        flex-wrap: wrap;
        justify-content: center;
    }
    .banner-content p { max-width: none; text-align: center; line-height: 1.5; }
    .banner-badge { font-size: 0.6rem; padding: 0.15rem 0.5rem; }
    .banner-close { right: 0.5rem; font-size: 1.1rem; }

    /* Nav */
    .nav-inner { padding: 0 1.25rem; }
    .nav-logo { font-size: 1.05rem; }
    .nav-logo svg { width: 26px; height: 26px; }

    /* Hero */
    .hero {
        min-height: 85vh;
        padding: 6rem 0 2.5rem;
    }
    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    .hero-tag { font-size: 0.7rem; margin-bottom: 4.5rem; }
    .hero-sub { font-size: 0.95rem; margin-bottom: 2rem; }
    .hero-cta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .hero .btn-primary, .hero .btn-ghost {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1.5rem;
    }
    .hero-stats {
        gap: 1.25rem;
        margin-top: 2.5rem;
        padding-top: 2rem;
    }
    .stat strong { font-size: 1.2rem; }
    .stat span { font-size: 0.7rem; }
    .stat-divider { height: 30px; }

    /* Ticker */
    .ticker-section { padding: 1.5rem 0; }
    .ticker-item { font-size: 0.85rem; }

    /* Sections */
    .listings-section,
    .features-section,
    .newsletter-section,
    .footer-cta {
        padding: 4rem 0;
    }
    .testimonials-section {
        padding: 0;
    }
    .section-header { margin-bottom: 2.5rem; }
    .section-header h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
    .section-header p { font-size: 0.9rem; }

    /* Listings */
    .listings-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .listing-img { height: 180px; }
    .listing-body { padding: 1rem; }
    .listing-body h3 { font-size: 1rem; }
    .listing-price { font-size: 1rem; }
    .listing-meta { gap: 0.6rem; font-size: 0.7rem; }
    .listing-filters { gap: 0.35rem; }
    .filter-btn { padding: 0.45rem 1rem; font-size: 0.8rem; }

    /* Services */
    .service-row {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .service-row.reverse {
        direction: ltr;
    }
    .service-img {
        height: 300px;
    }
    .service-content {
        padding: 2rem;
    }
    .service-content h3 {
        font-size: 1.5rem;
    }
    .feature-icon { width: 44px; height: 44px; font-size: 1rem; }
    
    

    /* Testimonials */
    .testi-slide {
        grid-template-columns: 1fr;
        height: auto;
        grid-template-rows: 45vh auto;
    }
    .testi-split {
        height: auto;
        min-height: auto;
    }
    .testi-slide:not(.active) {
        position: absolute;
        inset: 0;
        height: 100%;
    }
    .testi-image {
        height: 100%;
        width: 100%;
    }
    .testi-image img {
        object-position: center center;
    }
    .testi-quote {
        justify-content: flex-start;
        padding: 1.75rem 1.5rem 1rem;
    }
    .testi-quote blockquote {
        font-size: 1.2rem;
        font-weight: 500;
        margin-bottom: 0.5rem;
    }
    .testi-nav {
        position: relative;
        top: auto;
        bottom: auto;
        right: auto;
        left: auto;
        transform: none;
        justify-content: center;
        margin-top: 1rem;
        margin-bottom: 1.5rem;
        gap: 1rem;
    }
    .testi-arrow {
        width: 42px;
        height: 42px;
    }
    .testi-dots {
        display: flex;
    }
    .testi-progress {
        display: none;
    }

    /* Newsletter */
    .newsletter-card {
        padding: 2rem;
        border-radius: var(--radius-md);
    }
    .newsletter-left h2 { font-size: 1.6rem; }
    .input-group {
        flex-direction: column;
    }
    .input-group input { width: 100%; }
    .input-group .btn-primary { width: 100%; justify-content: center; }

    /* Footer CTA */
    .footer-cta h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
    .footer-cta p { font-size: 0.95rem; margin-bottom: 2rem; }
    .footer-cta .hero-cta-row {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .footer-cta .btn-primary,
    .footer-cta .btn-ghost {
        width: 260px;
        max-width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Footer */
    .site-footer { padding: 3rem 0 1.5rem; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .footer-col h4 { margin-bottom: 0.8rem; }
    .footer-col a { font-size: 0.85rem; }

    /* Chatbot */
    .chatbot-window {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
        bottom: 5rem;
        height: 65vh;
        max-height: 500px;
    }

    /* List Property Modal */
    .lp-modal {
        padding: 1.75rem;
        max-height: 88vh;
    }
    .lp-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
    .lp-type-inner {
        padding: 1.15rem;
        gap: 0.15rem;
    }
    .lp-type-inner i { font-size: 1.25rem; margin-bottom: 0.25rem; }
    .lp-type-inner strong { font-size: 0.95rem; margin-bottom: 0.1rem; }
    .lp-type-inner span { font-size: 0.82rem; line-height: 1.4; }
    .lp-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .lp-amenities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .lp-step-header h2 { font-size: 1.4rem; }
    .lp-btn-next { width: 100%; }
    .lp-success-stats { gap: 1.5rem; }

    /* Learn More */
    .lm-stats-row { gap: 1.25rem; }
    .lm-stat strong { font-size: 1.25rem; }
    .lm-feature { padding: 1rem; }
    .lm-feature-icon { width: 38px; height: 38px; font-size: 0.9rem; }
    .lm-cta-row { flex-direction: column; align-items: stretch; }
    .lm-cta-row .btn-primary,
    .lm-cta-row .btn-ghost,
    .lm-cta-row .lm-close-btn { justify-content: center; text-align: center; }

    /* Escrow & Demo */
    .esc-review-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
    .esc-review-row strong { text-align: left; max-width: 100%; }
    .demo-interests { grid-template-columns: repeat(2, 1fr) !important; }
    .demo-datetime-row { grid-template-columns: 1fr; }

    /* Prevent iOS auto-zoom on input focus */
    .input-group input,
    .chat-input,
    .lp-field input,
    .lp-field select,
    .lp-field textarea {
        font-size: 16px;
    }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .section-container {
        padding: 0 1rem;
    }

    /* Banner */
    .top-banner {
        padding: 0.5rem 2rem 0.5rem 0.75rem;
    }
    .banner-content {
        font-size: 0.65rem;
        flex-direction: column;
        gap: 0.2rem;
        align-items: center;
        text-align: center;
    }
    .banner-content p {
        line-height: 1.5;
        max-width: none;
    }
    .banner-badge { 
        font-size: 0.55rem; 
        padding: 0.1rem 0.45rem; 
    }
    .banner-close { right: 0.4rem; font-size: 1rem; }

    /* Hero */
    .hero {
        min-height: 80vh;
        padding: 5.5rem 0 2rem;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero-sub { font-size: 0.9rem; }
    .hero-tag { font-size: 0.65rem; padding: 0.35rem 0.8rem; }
    .hero-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .stat-divider {
        width: 40px;
        height: 1px;
    }

    /* Listings */
    .listings-grid {
        grid-template-columns: 1fr;
    }
    .listing-img { height: 220px; }
    .listing-filters {
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    .filter-btn { flex-shrink: 0; }

    /* Features */
    .services-stack {
        gap: 2rem;
    }
    .service-img {
        height: 240px;
    }
    .service-content {
        padding: 1.5rem;
    }
    .service-content h3 {
        font-size: 1.3rem;
    }
    .service-content p {
        font-size: 0.88rem;
    }
    .service-cta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Testimonials */
    .testi-slide {
        grid-template-rows: 35vh auto;
    }
    .testi-quote {
        padding: 1.5rem 1.25rem 0.75rem;
    }
    .testi-quote blockquote {
        font-size: 1.1rem;
        margin-bottom: 0.375rem;
    }
    .testi-attribution {
        font-size: 0.7rem;
    }
    .testi-nav {
        margin-top: 0.75rem;
        margin-bottom: 1.25rem;
        gap: 0.75rem;
    }
    .testi-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.7rem;
    }
    .testi-dots {
        gap: 5px;
    }
    .testi-dot {
        width: 5px;
        height: 5px;
    }
    .testi-dot.active {
        width: 16px;
    }

    /* Newsletter */
    .newsletter-card { padding: 1.5rem; }
    .newsletter-left h2 { font-size: 1.4rem; }
    .newsletter-left p { font-size: 0.85rem; }

    /* Footer CTA */
    .footer-cta { padding: 3.5rem 0; }
    .footer-cta h2 { font-size: 1.5rem; }
    .footer-cta p { font-size: 0.88rem; }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-brand {
        grid-column: auto;
        text-align: center;
    }
    .footer-brand p { margin: 0.75rem auto 0; }
    .footer-socials { justify-content: center; }
    .footer-col { text-align: center; }
    .footer-col ul { align-items: center; }
    .footer-bottom {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }

    /* Chatbot */
    .chatbot-fab {
        width: 50px;
        height: 50px;
        font-size: 1.05rem;
        right: 0.75rem;
        bottom: 0.75rem;
    }
    .chat-badge { width: 18px; height: 18px; font-size: 0.6rem; }
    .chatbot-window {
        width: calc(100vw - 1.5rem);
        left: 0.75rem;
        right: 0.75rem;
        bottom: 4.5rem;
        height: 60vh;
        border-radius: var(--radius-md);
    }
    .chat-header { padding: 0.75rem 1rem; }
    .chat-body { padding: 1rem; }
    .chat-footer { padding: 0.75rem 1rem; }
    .chat-suggestion-btn { font-size: 0.75rem; padding: 0.4rem 0.7rem; }

    /* List Property Modal */
    .lp-overlay { padding: 0.75rem; }
    .lp-modal {
        padding: 1.25rem;
        max-height: 92vh;
        border-radius: var(--radius-md);
    }
    .lp-step-header h2 { font-size: 1.25rem; }
    .lp-step-header p { font-size: 0.82rem; }
    .lp-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .lp-type-inner {
        padding: 0.9rem 0.6rem;
        gap: 0.1rem;
    }
    .lp-type-inner i { font-size: 1.1rem; margin-bottom: 0.2rem; }
    .lp-type-inner strong { font-size: 0.85rem; margin-bottom: 0.1rem; }
    .lp-type-inner span { font-size: 0.75rem; line-height: 1.4; }
    .lp-form-grid {
        grid-template-columns: 1fr;
    }
    .lp-field.full { grid-column: auto; }
    .lp-amenities-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }
    .lp-amenity span { font-size: 0.72rem; padding: 0.45rem 0.6rem; }
    .lp-upload-zone { padding: 2rem 1rem; }
    .lp-upload-zone i { font-size: 1.5rem; }
    .lp-steps-indicator { gap: 0.5rem; margin-bottom: 1.5rem; }
    .lp-step-dot { width: 24px; height: 24px; font-size: 0.6rem; }
    .lp-nav { margin-top: 1.5rem; padding-top: 1rem; }
    .lp-review-img { height: 140px; }
    .lp-success h2 { font-size: 1.4rem; }
    .lp-success-stats {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .lp-preview-thumb { width: 60px; height: 60px; }

    /* Learn More */
    .lm-stats-row {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 0;
    }
    .lm-stat strong { font-size: 1.2rem; }
    .lm-feature { flex-direction: column; gap: 0.75rem; align-items: center; text-align: center; }
    .lm-feature-body h4 { font-size: 0.9rem; }
    .lm-feature-body p { font-size: 0.88rem; }
    .lm-header h2 { font-size: 1.3rem; }
    .lm-cta-row { flex-direction: column; align-items: stretch; }
    .lm-cta-row .btn-primary,
    .lm-cta-row .btn-ghost,
    .lm-cta-row .lm-close-btn { justify-content: center; text-align: center; }

    /* AI Match */
    .ai-scanning h3 { font-size: 1.1rem; }
    .ai-radar { width: 96px; height: 96px; }
    .ai-radar-ring--1 { width: 32px; height: 32px; }
    .ai-radar-ring--2 { width: 64px; height: 64px; }
    .ai-radar-ring--3 { width: 96px; height: 96px; }
    .ai-matches h2 { font-size: 1.3rem; }

    /* Escrow & Demo */
    .esc-review-group { padding: 1rem; }
    .esc-review-group h4 { font-size: 0.68rem; }
    .esc-review-row span { font-size: 0.78rem; }
    .esc-review-row strong { font-size: 0.8rem; }
    .esc-agree span { font-size: 0.78rem; }
    .demo-interests { grid-template-columns: 1fr 1fr !important; }
    .demo-success h2 { font-size: 1.3rem; }

    /* Login */
    .login-modal { max-width: 100%; }
    .login-header h2 { font-size: 1.3rem; }
    .login-options { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
}

/* ── Very small screens ── */
@media (max-width: 360px) {
    .hero h1 { font-size: 1.7rem; }
    .hero-sub { font-size: 0.85rem; }
    .section-header h2 { font-size: 1.5rem; }
    .newsletter-left h2 { font-size: 1.25rem; }
    .footer-cta h2 { font-size: 1.3rem; }
    .listing-body h3 { font-size: 0.95rem; }
    .listing-price { font-size: 0.9rem; }
}

/* ── Hover & Active disabled on touch devices ── */
@media (hover: none) {
    /* Banner */
    .banner-close:hover { opacity: 0.85; background: rgba(255, 255, 255, 0.15); }

    /* Nav */
    .nav-links a:hover { color: var(--text-secondary); }
    .nav-links a:hover::after { width: 0; }
    .btn-nav-outline:hover { border-color: rgba(255, 255, 255, 0.66); color: rgba(255, 255, 255, 0.66); }
    .btn-nav-solid:hover { background: var(--accent); transform: none; box-shadow: none; }
    .mobile-menu a:hover { color: var(--text-secondary); }
    .mobile-menu .btn-nav-solid:hover { background: var(--accent); }

    /* Buttons */
    .btn-primary:hover { background: var(--accent); transform: none; box-shadow: none; }
    .lp-modal .btn-primary:hover { background: #0A0A0F; box-shadow: none; }
    .login-modal .btn-primary:hover { background: #0A0A0F; box-shadow: none; }
    .btn-ghost:hover { border-color: rgba(255, 255, 255, 0.66); color: rgba(255, 255, 255, 0.66); }

    /* Listings */
    .filter-btn:hover { background: transparent; color: var(--text-secondary); border-color: var(--border); }
    .listing-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
    .listing-card:hover .listing-img img { transform: none; }
    .listing-save:hover { background: rgba(10, 10, 11, 0.6); color: #fff; }
    .pagination-btn:hover { border-color: var(--border); color: var(--text-secondary); }

    /* Light section listings */
    .light-section .listing-card:hover { transform: none; box-shadow: none; }
    .light-section .filter-btn:hover { background: transparent; color: var(--text-dark-secondary); border-color: var(--border-light); }
    .light-section .pagination-btn:hover { border-color: var(--border-light); color: var(--text-dark-secondary); }
    .light-section .btn-ghost:hover { border-color: rgba(26, 26, 42, 0.15); color: var(--text-dark-secondary); }

    /* Services */
    .service-row:hover .service-img img { transform: none; }

    /* Testimonials */
    .testi-arrow:hover { border-color: rgba(26, 26, 42, 0.15); color: var(--text-dark-secondary); }
    .testi-arrow:hover::before { transform: scale(0); opacity: 0; }
    .testi-arrow:hover i { transform: none; }
    #prevTestimonial:hover i { transform: none; }
    #nextTestimonial:hover i { transform: none; }
    .testi-arrow:active { transform: none; }
    .testi-arrow:active::before { transform: scale(0); opacity: 0; }

    /* Footer */
    .footer-socials a:hover { border-color: var(--border); color: var(--text-muted); transform: none; }
    .footer-col a:hover { color: var(--text-secondary); }
    .credit-link:hover { color: var(--text-muted); }

    /* Chatbot */
    .chatbot-fab:hover { transform: none; box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35); }
    .chat-close:hover { color: var(--text-muted); background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.08); }
    .chat-suggestion-btn:hover { border-color: var(--border); color: var(--text-secondary); background: transparent; }
    .chat-send:hover { opacity: 1; }

    /* List Property Modal */
    .lp-close:hover { color: var(--text-muted); }
    .lp-type-inner:hover { border-color: var(--border); }
    .lp-upload-zone:hover { border-color: var(--border); }
    .lp-preview-remove:hover { transform: none; }
    .lp-amenity span:hover { border-color: var(--border); color: var(--text-secondary); }
    .lp-btn-back:hover { color: var(--text-secondary); }
    .lp-btn-next.publish:hover { background: #0A0A0F; box-shadow: none; }

    /* Learn More Modal */
    .lm-close-btn:hover { border-color: rgba(26, 26, 42, 0.2) !important; color: var(--text-dark-secondary) !important; }
    .lp-modal .btn-ghost:hover { color: var(--text-dark-secondary); border-color: rgba(26, 26, 42, 0.2); }

    /* Escrow Modal */
    .esc-agree:hover { border-color: var(--border); }

    /* Login Modal */
    .login-forgot-link:hover { opacity: 1; }
    .login-social:hover { border-color: var(--border); }
    .login-signup-link:hover { opacity: 1; }
    .login-back-link:hover { color: var(--text-secondary); }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .ticker-slide { animation: none; }
    .typewriter-cursor { animation: none; }
    .dot-pulse { animation: none; }
}
