/* Mobile-spezifische CSS-Datei für HoPlaDi */

/* Touch-Target-Größen (Apple/Google Guidelines) */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Touch-optimierte Buttons */
.btn-mobile {
    min-height: 48px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.btn-mobile:active {
    transform: scale(0.96);
    background-color: rgba(0,0,0,0.1);
}

/* Touch-optimierte Formulare */
.form-mobile {
    font-size: 16px; /* Verhindert Zoom auf iOS */
}

.form-control-mobile {
    min-height: 48px;
    font-size: 16px;
    border-radius: 0.5rem;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease;
}

.form-control-mobile:focus {
    border-color: #a02826;
    box-shadow: 0 0 0 0.2rem rgba(160, 40, 38, 0.25);
    outline: none;
}

/* Mobile Navigation */
.navbar-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-mobile .navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.navbar-mobile .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(160, 40, 38, 0.25);
    outline: none;
}

.navbar-mobile .navbar-collapse {
    background-color: white;
    border-top: 1px solid #e0e0e0;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.navbar-mobile .nav-link {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.1rem;
    font-weight: 500;
}

.navbar-mobile .nav-link:last-child {
    border-bottom: none;
}

/* Mobile Cards */
.card-mobile {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.card-mobile .card-body {
    padding: 1.25rem;
}

.card-mobile .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-mobile .card-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #666;
}

/* Mobile Grid System */
.grid-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
}

.grid-mobile-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-mobile-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Mobile Typografie */
.text-mobile-h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-mobile-h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.text-mobile-h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.text-mobile-body {
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}

.text-mobile-small {
    font-size: 0.875rem;
    line-height: 1.4;
    color: #666;
}

/* Mobile Abstände */
.spacing-mobile-xs { margin: 0.25rem; padding: 0.25rem; }
.spacing-mobile-sm { margin: 0.5rem; padding: 0.5rem; }
.spacing-mobile-md { margin: 1rem; padding: 1rem; }
.spacing-mobile-lg { margin: 1.5rem; padding: 1.5rem; }
.spacing-mobile-xl { margin: 2rem; padding: 2rem; }

/* Mobile Utility-Klassen */
.d-mobile-none { display: none !important; }
.d-mobile-block { display: block !important; }
.d-mobile-flex { display: flex !important; }
.d-mobile-grid { display: grid !important; }

.text-mobile-center { text-align: center !important; }
.text-mobile-left { text-align: left !important; }
.text-mobile-right { text-align: right !important; }

.justify-mobile-center { justify-content: center !important; }
.justify-mobile-between { justify-content: space-between !important; }
.justify-mobile-around { justify-content: space-around !important; }

.align-mobile-center { align-items: center !important; }
.align-mobile-start { align-items: flex-start !important; }
.align-mobile-end { align-items: flex-end !important; }

/* Mobile Touch-Gesten */
.touch-swipe {
    touch-action: pan-x pan-y;
}

.touch-pinch {
    touch-action: pinch-zoom;
}

.touch-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Mobile Performance-Optimierungen */
@media (max-width: 768px) {
    /* Reduzierte Schatten für bessere Performance */
    .card-mobile {
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
    
    /* Reduzierte Animationen */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Optimierte Scroll-Performance */
    .scrollable {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* Mobile Accessibility */
@media (prefers-reduced-motion: reduce) {
    .btn-mobile,
    .card-mobile,
    .navbar-mobile .nav-link {
        transition: none;
    }
    
    .btn-mobile:active {
        transform: none;
    }
}

/* Mobile High-Contrast */
@media (prefers-contrast: high) {
    .card-mobile {
        border: 2px solid #000;
    }
    
    .btn-mobile {
        border: 2px solid #000;
    }
    
    .navbar-mobile .nav-link {
        border-bottom: 2px solid #000;
    }
}

/* Mobile Landscape-Optimierung */
@media (max-width: 768px) and (orientation: landscape) {
    .navbar-mobile .navbar-collapse {
        max-height: 50vh;
    }
    
    .grid-mobile-2 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-mobile-3 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .card-mobile {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .navbar-mobile {
        background-color: #1a1a1a;
        border-bottom: 1px solid #404040;
    }
    
    .navbar-mobile .nav-link {
        color: #ffffff;
        border-bottom: 1px solid #404040;
    }
    
    .form-control-mobile {
        background-color: #2d2d2d;
        color: #ffffff;
        border-color: #404040;
    }
}
