/* ========================================
   MOBILE RESPONSIVE STYLES - LUVIA
   ======================================== */

/* Mobile Menu Hamburger Animation */
.mobile-menu-open {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Navigation Fixes */
@media (max-width: 768px) {
    /* Navigation */
    nav {
        height: auto !important;
    }
    
    nav .h-20 {
        height: 4rem !important;
        padding: 0.5rem 0;
    }
    
    /* Logo Size */
    nav img {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    nav .text-2xl {
        font-size: 1.25rem !important;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    /* Search Bar Mobile */
    .search-bar {
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 1rem !important;
    }
    
    .search-bar > div {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 0.75rem !important;
    }
    
    .search-bar > div:last-child {
        border-bottom: none !important;
    }
    
    .search-bar button {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.75rem 1rem !important;
    }

    .home-search-bar {
        border-radius: 24px !important;
    }

    .home-search-field {
        padding: 0.9rem 1rem !important;
    }

    .home-search-action {
        padding: 0.75rem 1rem !important;
        display: flex !important;
        justify-content: flex-end !important;
    }

    .home-search-submit {
        width: 3.25rem !important;
        height: 3.25rem !important;
        padding: 0 !important;
        border-radius: 9999px !important;
    }

    .home-search-submit svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    
    /* Listing Cards Grid */
    .listings-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* Listing Card */
    .listing-card img {
        height: 250px !important;
    }
    
    /* Listing Detail Page */
    .listing-detail-grid {
        grid-template-columns: 1fr !important;
    }
    
    .listing-images {
        height: 300px !important;
        border-radius: 0 !important;
        margin: 0 -1rem !important;
    }
    
    .listing-info-card {
        position: static !important;
        margin-top: 1rem !important;
    }
    
    /* Booking Page */
    .booking-grid {
        grid-template-columns: 1fr !important;
    }
    
    .price-summary {
        position: static !important;
        margin-top: 1rem !important;
    }
    
    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    /* Modals */
    .modal-content {
        width: 95% !important;
        margin: 0.5rem !important;
        padding: 1.5rem !important;
    }

    body.dropdown-open {
        overflow: hidden !important;
    }

    .dropdown-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 55;
    }

    #calendar-dropdown,
    #guests-dropdown,
    #destination-dropdown {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100vw !important;
        max-height: 85vh !important;
        margin-top: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-top-left-radius: 24px !important;
        border-top-right-radius: 24px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        z-index: 60 !important;
    }

    #calendar-dropdown {
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18) !important;
    }

    #guests-dropdown {
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18) !important;
    }

    #calendar-dropdown .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    #month1-days button,
    #month2-days button {
        height: 44px !important;
        min-height: 44px !important;
    }

    #calendar-dropdown > .border-t {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 1;
    }

    /* Filters Modal */
    .filters-modal {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
    }
    
    /* Account Page */
    .account-tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .account-tabs button {
        white-space: nowrap !important;
    }
    
    /* Property Add/Edit Forms */
    .property-form-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    
    /* Hide desktop elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile elements */
    .mobile-only {
        display: block !important;
    }
    
    /* Spacing adjustments */
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .py-12 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Typography */
    h1 {
        font-size: 1.875rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* Buttons */
    button,
    .btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Cards */
    .card {
        padding: 1rem !important;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.875rem !important;
    }
    
    nav .text-2xl {
        font-size: 1.125rem !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    button,
    a,
    input,
    select {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .hover\:scale-105:hover {
        transform: none !important;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 50vh !important;
    }
}
