/* =====================================================
   EC WEBSITE - RESPONSIVE STYLES
   Adaptive Layout für alle Bildschirmgrößen
   ===================================================== */

/* ===== HAMBURGER MENU BUTTON (Mobile Only) ===== */
.hamburger-btn {
    display: none;
    background: none;
    border: 1px solid var(--primary, #ff7c01);
    color: var(--primary, #ff7c01);
    font-size: 1.5rem;
    padding: 5px 12px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: 0.3s;
    z-index: 200;
}

.hamburger-btn:hover {
    background: rgba(255, 124, 1, 0.2);
}

/* ===== MOBILE SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100;
}

.sidebar-overlay.active {
    display: block;
}

/* Close button for mobile sidebar */
.sidebar-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.sidebar-close:hover {
    color: var(--primary, #ff7c01);
}

/* =====================================================
   TABLET BREAKPOINT (max-width: 1024px)
   ===================================================== */
@media (max-width: 1024px) {
    /* Reduce sidebar width */
    .sidebar {
        width: 200px !important;
        min-width: 200px !important;
    }
    
    /* Smaller cards */
    .trello-list {
        min-width: 240px !important;
        width: 240px !important;
    }
    
    .trainee-card,
    .card {
        width: 280px !important;
        min-width: 280px !important;
    }
    
    /* Reduce header padding */
    .header {
        padding: 12px 20px !important;
    }
    
    /* Smaller fonts in header */
    .header h1,
    .header .logo-text {
        font-size: 1rem !important;
    }
}

/* =====================================================
   MOBILE BREAKPOINT (max-width: 768px)
   ===================================================== */
@media (max-width: 768px) {
    /* Show hamburger button */
    .hamburger-btn {
        display: block;
    }
    
    /* Hide sidebar by default, show when active */
    .sidebar {
        position: fixed !important;
        left: -280px;
        top: 0;
        height: 100vh !important;
        width: 260px !important;
        min-width: 260px !important;
        z-index: 150 !important;
        transition: left 0.3s ease;
        padding-top: 50px !important;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-close {
        display: block;
    }
    
    /* Main content takes full width */
    .main {
        padding: 10px !important;
        flex-direction: column !important;
    }
    
    /* DATEN.HTML - Trello Board vertical on mobile */
    .board-container {
        flex-direction: column !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        align-items: stretch !important;
        gap: 15px !important;
        padding-bottom: 20px !important;
    }
    
    .trello-list {
        width: 100% !important;
        min-width: 100% !important;
        max-height: none !important;
    }
    
    .list-cards {
        max-height: 300px !important;
    }
    
    /* TRAININGSPLAN.HTML - Cards stack vertically */
    .content-viewport {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    .training-grid {
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }
    
    .trainee-card {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    /* WARTUNGEN.HTML - Grid becomes column */
    .grid {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
    }
    
    .card {
        width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        min-height: 150px !important;
    }
    
    /* VERWALTUNG.HTML - User grid single column */
    .user-grid,
    .role-grid {
        grid-template-columns: 1fr !important;
    }
    
    .container-box {
        width: 100% !important;
        height: 100vh !important;
        border-radius: 0 !important;
        padding: 15px !important;
    }
    
    /* Header adjustments */
    .header {
        padding: 10px 15px !important;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header h1,
    .header .logo-text {
        font-size: 0.9rem !important;
        letter-spacing: 2px !important;
    }
    
    /* Larger touch targets for buttons */
    .btn,
    .system-link {
        padding: 12px 15px !important;
        font-size: 0.8rem !important;
        min-height: 44px;
    }
    
    /* Form inputs larger for touch */
    input,
    select,
    textarea {
        padding: 12px !important;
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    /* Modal full width on mobile */
    .modal {
        width: 95% !important;
        max-width: none !important;
        margin: 10px;
    }
    
    /* Allow body scroll on mobile */
    body {
        overflow: auto !important;
        height: auto !important;
        min-height: 100vh;
    }
}

/* =====================================================
   SMALL MOBILE BREAKPOINT (max-width: 480px)
   ===================================================== */
@media (max-width: 480px) {
    /* Even smaller header */
    .header {
        padding: 8px 10px !important;
    }
    
    .header h1,
    .header .logo-text {
        font-size: 0.75rem !important;
        letter-spacing: 1px !important;
    }
    
    /* Sidebar narrower */
    .sidebar {
        width: 240px !important;
        min-width: 240px !important;
    }
    
    /* Container padding reduced */
    .container-box {
        padding: 10px !important;
    }
    
    h2 {
        font-size: 1.1rem !important;
        letter-spacing: 2px !important;
    }
    
    h3 {
        font-size: 1rem !important;
    }
    
    /* Card labels smaller */
    .card-labels .label {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
    }
    
    /* Activity list text smaller */
    .activity-item {
        font-size: 0.7rem !important;
    }
}

/* =====================================================
   TOUCH DEVICE IMPROVEMENTS
   ===================================================== */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects that don't work on touch */
    .trello-card:hover,
    .card:hover,
    .trainee-card:hover,
    .user-card:hover {
        transform: none !important;
    }
    
    /* Add active state instead */
    .trello-card:active,
    .card:active,
    .trainee-card:active,
    .user-card:active {
        transform: scale(0.98) !important;
        opacity: 0.9;
    }
    
    .btn:active,
    .system-link:active {
        background: rgba(255, 124, 1, 0.3) !important;
    }
    
    /* Better scrolling */
    .board-container,
    .grid,
    .training-grid,
    .scroll-area {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Disable drag cursors on mobile (daten.html) */
    .list-header {
        cursor: default !important;
    }
    
    .trello-card {
        cursor: pointer !important;
        user-select: none;
    }
}

/* =====================================================
   LANDSCAPE MOBILE ADJUSTMENTS
   ===================================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 200px !important;
    }
    
    .list-cards {
        max-height: 200px !important;
    }
    
    .modal {
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
}

/* =====================================================
   INDEX.HTML SPECIFIC (Login Page)
   ===================================================== */
@media (max-width: 768px) {
    #auth-container {
        width: 95% !important;
        max-width: none !important;
        padding: 25px !important;
    }
    
    #auth-container h3 {
        font-size: 1.3rem !important;
    }
}

/* =====================================================
   PRINT STYLES (Optional)
   ===================================================== */
@media print {
    .sidebar,
    .hamburger-btn,
    .header button,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card,
    .trello-card,
    .user-card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        background: white !important;
    }
}


