/**
 * WENTZ IMÓVEIS V3 - RESPONSIVE STYLES
 */

/* ==================== TABLET ==================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hyper-hero-title {
        font-size: 2.5rem;
    }
    
    .hyper-section-title {
        font-size: 2rem;
    }
}

/* ==================== TABLET ==================== */
@media (max-width: 1024px) {
    .header-install-text {
        display: none;
    }
    
    .header-install-btn {
        padding: 0.5rem;
        min-width: 36px;
        justify-content: center;
    }
}

/* ==================== MOBILE ==================== */
@media (max-width: 768px) {
    /* Header Mobile */
    .hyper-header {
        padding: 0.5rem 0;
    }

    .hyper-logo img {
        height: 56px;
        width: auto;
        display: block;
    }

    .hyper-nav {
        position: fixed;
        top: var(--header-h, 70px);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-h, 70px));
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-lg) var(--spacing-md);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .hyper-nav.active {
        left: 0;
    }
    
    .hyper-nav-link {
        width: 100%;
        padding: var(--spacing-sm);
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .header-mobile-actions {
        display: flex;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .header-mobile-install-btn {
        display: flex;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
        margin-top: var(--spacing-md);
    }
    
    .header-install-btn {
        width: auto;
        min-width: 36px;
        padding: 0.5rem;
        justify-content: center;
    }
    
    .header-install-text {
        display: none;
    }
    
    /* Em telas muito pequenas, pode esconder o texto e deixar so o icone */
    @media (max-width: 480px) {
        .header-install-text {
            font-size: 0.9rem;
        }
    }
    
    /* Hero Mobile */
    .hyper-hero {
        padding: var(--spacing-lg) var(--spacing-sm);
        padding-top: calc(var(--header-h, 70px) + var(--spacing-md));
        min-height: 90vh;
    }
    
    .hyper-hero-title {
        font-size: 2rem;
    }
    
    .hyper-hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Sections Mobile */
    .hyper-section {
        padding: var(--spacing-lg) 0;
        min-height: auto;
    }
    
    .hyper-section-title {
        font-size: 1.8rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Cards Mobile */
    .hyper-card {
        padding: var(--spacing-sm);
    }
    
    /* Mapa Mobile */
    #hyper-map {
        height: 400px;
        min-height: 340px;
        /* Garantir estabilidade no mobile */
        max-height: 50vh;
    }
    
    /* ==================== CONTROLES DO MAPA - COMPACTO MOBILE ==================== */
    .map-controls {
        margin-bottom: 0.75rem !important;
    }
    
    /* Card dos botoes de filtro - layout compacto mobile */
    .map-filters-card {
        padding: 0.6rem !important;
        gap: 0.6rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    /* Botoes em linha horizontal - mobile */
    .map-filter-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.4rem !important;
        width: 100% !important;
    }
    
    /* Botoes de filtro compactos - mobile */
    .map-filter-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 0.45rem 0.3rem !important;
        font-size: 0.7rem !important;
        gap: 0.25rem !important;
    }
    
    .map-filter-btn i {
        font-size: 0.75rem !important;
    }
    
    /* Campo de pesquisa compacto - mobile */
    .map-search {
        max-width: 100% !important;
        min-width: 100% !important;
    }
    
    #map-search-input {
        padding: 0.5rem 4.5rem 0.5rem 0.8rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Card do contador - compacto mobile */
    .map-stats-wrapper {
        padding: 0.4rem 0.6rem !important;
        margin-top: 0.5rem !important;
    }
    
    .map-stats-card {
        padding: 0.4rem 0.6rem !important;
    }
    
    .map-stats-main {
        gap: 0.5rem !important;
    }
    
    .map-stats-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
    }
    
    .map-stats-icon i {
        font-size: 0.8rem !important;
    }
    
    .map-stats-card .stat-number {
        font-size: 1.3rem !important;
    }
    
    .map-stats-card .stat-label {
        font-size: 0.75rem !important;
    }
    
    /* Sobre Mobile */
    .sobre-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Consultores Mobile */
    .consultores-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        max-width: 100%;
    }
    
    #consultores .consultant-photo {
        width: 120px;
        height: 120px;
    }
    
    /* Grid Mobile */
    .properties-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    /* Container Mobile */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Botões Mobile */
    .hyper-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    /* Footer Mobile */
    footer.hyper-section {
        padding: var(--spacing-md) 0;
    }
}

/* ==================== MOBILE PEQUENO ==================== */
@media (max-width: 480px) {
    .hyper-hero-title {
        font-size: 1.5rem;
    }
    
    .hyper-section-title {
        font-size: 1.5rem;
    }
    
    .map-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .map-stats-card {
        padding: 0.85rem 0.9rem;
    }

    .map-stats-main {
        gap: 0.75rem;
    }

    .map-stats-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .map-stats-card .stat-number {
        font-size: 1.85rem;
    }

}

/* ==================== LANDSCAPE MOBILE ==================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hyper-hero {
        min-height: 100vh;
        padding: var(--spacing-md) 0;
        padding-top: calc(var(--header-h, 70px) + var(--spacing-sm));
    }
}

/* ==================== FOOTER RESPONSIVO ==================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-company {
        text-align: center;
        align-items: center;
    }
    
    .footer-nav,
    .footer-contact,
    .footer-social {
        align-items: center;
        text-align: center;
    }
    
    .footer-contact-item {
        justify-content: center;
    }
    
    .footer-social-icons {
        justify-content: center;
    }
}

/* ==================== PRINT ==================== */
@media print {
    .hyper-header,
    .nav-toggle,
    .hero-scroll,
    .hyper-btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ==================== MODAL DE DETALHES RESPONSIVO ==================== */
@media (max-width: 768px) {
    .property-details-modal {
        padding: 0;
        height: 100dvh;
    }
    
    .property-details-overlay {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .property-details-container {
        margin: 0;
        border-radius: 0;
        padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
    }
    
    .property-details-close {
        top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
        right: 0.5rem;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .property-details-back {
        position: absolute;
        top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
        left: 0.5rem;
        height: 35px;
        padding: 0 0.85rem;
        border: 1px solid var(--glass-border);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.1);
        color: white;
        display: none;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
        z-index: 10002;
        backdrop-filter: blur(10px);
    }

    body[data-map-shell="1"][data-view-mode="detail"] .property-details-back {
        display: inline-flex;
    }
    
    .property-details-content {
        flex-direction: column;
        gap: 1.5rem;
        padding-top: 2rem;
    }
    
    .property-details-images {
        position: relative;
        width: 100%;
        order: 1;
    }
    
    .property-details-main-image {
        height: 40vh;
        min-height: 250px;
        max-height: 400px;
        margin-bottom: 0.75rem;
    }
    
    .property-details-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        opacity: 1;
    }
    
    .property-details-image-counter {
        bottom: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .property-details-thumbnails {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        flex-wrap: nowrap;
        overscroll-behavior-x: contain;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .property-details-thumbnails img {
        width: 70px;
        height: 70px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    
    .property-details-info {
        order: 2;
        padding: 0;
        width: 100%;
    }
    
    .property-details-info h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .property-details-price {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .property-details-address,
    .property-details-city {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .property-details-description {
        margin-top: 1rem;
    }
    
    .property-details-description h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .property-details-description p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .property-details-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .property-details-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .property-details-main-image {
        height: 35vh;
        min-height: 200px;
        max-height: 300px;
    }
    
    .property-details-info h2 {
        font-size: 1.3rem;
    }
    
    .property-details-price {
        font-size: 1.1rem;
    }
    
    .property-details-thumbnails img {
        width: 60px;
        height: 60px;
    }
}

