/**
 * Mobile Responsive V5 - PREMIUM EDITION
 * 
 * Perfekte Mobile-Optimierung für alle Breakpoints
 * Touch-optimiert, Performance-optimiert
 * 
 * @package DATAsoft_Escort_Core
 * @version 5.0.13
 */

/* ===== Breakpoints =====
 * xs: 0-480px (Mobile Portrait)
 * sm: 481-768px (Mobile Landscape / Small Tablet)
 * md: 769-1024px (Tablet)
 * lg: 1025-1440px (Desktop)
 * xl: 1441px+ (Large Desktop)
 */

/* ===== Mobile Portrait (0-480px) ===== */
@media (max-width: 480px) {
    
    /* Hero Slider */
    .ds-hero-v5 {
        height: 400px;
    }
    
    .ds-hero-title {
        font-size: var(--text-2xl) !important;
    }
    
    .ds-hero-subtitle {
        font-size: var(--text-sm) !important;
    }
    
    /* Search Bar */
    .ds-hero-search {
        margin-top: -30px;
        padding: 0 var(--spacing-sm);
    }
    
    .ds-search-container {
        padding: var(--spacing-sm);
    }
    
    .ds-search-form {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-xs);
    }
    
    .ds-search-field {
        padding: 0.625rem 0.75rem;
    }
    
    .ds-search-input,
    .ds-search-select {
        font-size: 14px;
    }
    
    .ds-search-btn {
        padding: 0.75rem 1rem;
        font-size: 14px;
    }
    
    /* Quick Actions Bar */
    .ds-quick-actions {
        padding: var(--spacing-sm);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .ds-category-chips {
        flex-wrap: nowrap;
        gap: var(--spacing-xs);
    }
    
    .ds-category-chip {
        flex-shrink: 0;
        padding: 0.5rem 0.875rem;
        font-size: var(--text-xs);
    }
    
    /* Filter Sidebar - Hidden, use Drawer */
    .ds-filter-sidebar {
        display: none;
    }
    
    /* Profile Grid */
    .ds-grid-container {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
    }
    
    .ds-grid-info h2 {
        font-size: var(--text-lg);
    }
    
    .ds-grid-controls {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .ds-grid-columns {
        display: none !important;
    }
    
    /* Profile Cards */
    .ds-profile-card {
        max-width: 100%;
    }
    
    .ds-card-title {
        font-size: var(--text-base);
    }
    
    .ds-card-meta {
        font-size: var(--text-xs);
    }
    
    .ds-card-btn {
        padding: 0.75rem 1rem;
        font-size: var(--text-sm);
    }
    
    /* Customer Menu */
    .ds-customer-menu {
        width: 100%;
        max-width: 100%;
    }
    
    .ds-menu-toggle {
        top: 80px;
        right: 10px;
        padding: 10px 14px;
    }
    
    /* Ad Sidebar */
    .ds-werbung-sidebar {
        display: none;
    }
    
    /* Footer */
    .ds-footer-container {
        padding: 0 var(--spacing-sm);
    }
    
    .ds-footer-column h4 {
        font-size: var(--text-lg);
    }
    
    .ds-back-to-top {
        bottom: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }
}

/* ===== Mobile Landscape / Small Tablet (481-768px) ===== */
@media (min-width: 481px) and (max-width: 768px) {
    
    /* Hero */
    .ds-hero-v5 {
        height: 450px;
    }
    
    .ds-hero-title {
        font-size: var(--text-3xl);
    }
    
    /* Search Bar */
    .ds-search-form {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ds-search-btn {
        grid-column: 1 / -1;
    }
    
    /* Profile Grid */
    .ds-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--spacing-lg);
    }
    
    /* Filter Sidebar - Drawer */
    .ds-filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        background: var(--color-surface);
        box-shadow: var(--shadow-2xl);
        z-index: var(--z-modal);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .ds-filter-sidebar.open {
        left: 0;
    }
    
    /* Ad Sidebar */
    .ds-werbung-sidebar {
        display: none;
    }
}

/* ===== Tablet (769-1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    
    /* Hero */
    .ds-hero-v5 {
        height: 500px;
    }
    
    /* Search Bar */
    .ds-search-form {
        grid-template-columns: repeat(3, 1fr) auto;
    }
    
    /* Profile Grid */
    .ds-grid-container[data-cols="5"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .ds-grid-container[data-cols="4"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* Filter Sidebar */
    .ds-filter-sidebar {
        width: 240px;
    }
    
    /* Ad Sidebar */
    .ds-werbung-sidebar {
        width: 240px;
    }
}

/* ===== Desktop (1025-1440px) ===== */
@media (min-width: 1025px) and (max-width: 1440px) {
    
    /* Profile Grid */
    .ds-grid-container[data-cols="5"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ===== Touch Optimizations ===== */
@media (hover: none) and (pointer: coarse) {
    
    /* Larger touch targets */
    button,
    a,
    input,
    select {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects */
    .ds-profile-card:hover {
        transform: none;
    }
    
    /* Tap highlight */
    * {
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    }
    
    /* Smooth scrolling */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== Landscape Orientation ===== */
@media (max-width: 768px) and (orientation: landscape) {
    
    /* Hero */
    .ds-hero-v5 {
        height: 350px;
    }
    
    /* Search Bar */
    .ds-hero-search {
        margin-top: -40px;
    }
    
    /* Customer Menu */
    .ds-customer-menu {
        width: 280px;
    }
}

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

/* ===== Dark Mode (Optional) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #1a202c;
        --color-surface: #2d3748;
        --color-text: #e2e8f0;
        --color-text-secondary: #cbd5e0;
        --color-border: #4a5568;
    }
}

/* ===== Print Styles ===== */
@media print {
    .ds-hero-v5,
    .ds-filter-sidebar,
    .ds-werbung-sidebar,
    .ds-customer-menu,
    .ds-back-to-top,
    .ds-footer-v5 {
        display: none !important;
    }
    
    .ds-profile-card {
        break-inside: avoid;
    }
}

