/* ==========================================================================
   PNUEL GROUP - RESPONSIVE ENHANCEMENTS
   Mobile-First Responsive Design
   ========================================================================== */

/* Base Mobile Styles (320px+) */
@media (max-width: 640px) {
    /* Navigation */
    .nav-logo-text {
        font-size: 1.25rem !important;
    }
    
    /* Hero Sections */
    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.75rem !important;
    }
    
    .section-subtitle {
        font-size: 0.95rem !important;
    }
    
    /* Property/Investment Cards */
    .property-card,
    .investment-card {
        margin-bottom: 1rem;
    }
    
    .property-image,
    .investment-image {
        height: 180px !important;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Forms */
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Statistics */
    .stat-box {
        padding: 1rem !important;
        margin-bottom: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
    
    /* Footer */
    .footer-column {
        margin-bottom: 2rem;
    }
    
    .footer-title {
        font-size: 1rem !important;
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    /* Search & Filter Bars */
    .search-bar,
    .filter-bar {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .search-input,
    .filter-select {
        width: 100% !important;
    }
    
    /* Property Details */
    .property-details-grid {
        grid-template-columns: 1fr !important;
    }
    
    .property-info-box {
        padding: 0.75rem !important;
    }
    
    /* Modal */
    .modal-content {
        margin: 1rem !important;
        max-height: calc(100vh - 2rem) !important;
    }
    
    /* Spacing */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .section-spacing {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Tablet Styles (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    /* Hero */
    .hero-title {
        font-size: 2.25rem !important;
    }
    
    /* Grids */
    .property-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* Navigation */
    .desktop-nav {
        gap: 1.5rem !important;
    }
    
    /* Property Details */
    .property-details-sidebar {
        position: relative !important;
        top: 0 !important;
    }
}

/* Large Screens (1025px+) */
@media (min-width: 1025px) {
    /* Property Grid */
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Sticky Sidebar */
    .sticky-sidebar {
        position: sticky;
        top: 5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .nav-link,
    .card-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    .property-card:hover .property-image img,
    .investment-card:hover .investment-image img {
        transform: none;
    }
    
    /* Larger tap targets for mobile */
    .mobile-nav-item {
        padding: 1rem !important;
    }
}

/* Landscape Mobile (568px+ landscape) */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .modal-content {
        max-height: 85vh !important;
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    .no-print,
    nav,
    footer,
    .sidebar,
    .btn,
    .modal {
        display: none !important;
    }
    
    .property-card,
    .investment-card {
        page-break-inside: avoid;
    }
}

/* High DPI Displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images for retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Optional - for future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Small Mobile (320px - 375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .property-card {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
    }
}

/* iPad Pro and Larger Tablets (1024px+) */
@media (min-width: 1024px) and (max-width: 1366px) {
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .container {
        max-width: 1200px;
    }
}

/* Ultra-wide Screens (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .property-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* iOS Safari Fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix 100vh issue on iOS */
    .min-h-screen {
        min-height: -webkit-fill-available;
    }
    
    /* Fix input zoom on iOS */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Android Chrome Fixes */
@supports (-webkit-appearance: none) {
    /* Fix input styling on Android */
    input,
    select,
    textarea {
        -webkit-appearance: none;
        appearance: none;
    }
}

