/* ===================================
   GEWERBEGRUNDKURS - KURS SEITE STYLES
   Basierend auf dem bestehenden Western/Gold-Rush Design
   =================================== */

/* ===== MAIN LAYOUT ===== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

/* ===== SECTION HEADER ===== */
.section-header {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.section-title {
    font-size: 2.5rem;
    color: #F4C066;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.kurs-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.zeitaufwand,
.kategorien-anzahl {
    background: rgba(244, 192, 102, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: #D8C5B0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* ===== SEARCH SECTION ===== */
.search-section {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.search-form {
    margin-bottom: 1rem;
}

.search-input-group {
    display: flex;
    gap: 0;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-right: none;
    border-radius: 8px 0 0 8px;
    background: rgba(30, 26, 23, 0.8);
    color: #F5F5F5;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #F4C066;
    box-shadow: 0 0 0 2px rgba(244, 192, 102, 0.2);
}

.search-button {
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, #F4C066 0%, #D99C45 100%);
    color: #2C2623;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 192, 102, 0.3);
}

/* ===== SEARCH RESULTS ===== */
.search-results {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

.search-results h3 {
    color: #F4C066;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.search-result-item {
    background: rgba(203, 131, 88, 0.1);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: rgba(203, 131, 88, 0.2);
    border-color: #F4C066;
}

.result-type {
    background: #F4C066;
    color: #2C2623;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.search-result-item h4 {
    color: #F5F5F5;
    margin: 0.5rem 0;
}

.search-result-item small {
    color: #CB8358;
    font-style: italic;
}

.search-result-item p {
    color: #D8C5B0;
    margin: 0.5rem 0 0 0;
    line-height: 1.4;
}

.no-results {
    text-align: center;
    color: #D8C5B0;
    font-style: italic;
    padding: 1rem;
}

/* ===== KATEGORIE SECTIONS ===== */
.kategorie-section {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.kategorie-section:hover {
    border-color: #F4C066;
    box-shadow: 0 8px 24px rgba(244, 192, 102, 0.2);
}

.kategorie-header {
    padding: 1.5rem 2rem;
    background: rgba(203, 131, 88, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.kategorie-header:hover {
    background: rgba(203, 131, 88, 0.2);
}

.kategorie-titel {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kategorie-nummer {
    background: #F4C066;
    color: #2C2623;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.kategorie-titel h2 {
    color: #F5F5F5;
    margin: 0;
    font-size: 1.4rem;
}

.zeitaufwand-badge {
    background: rgba(244, 192, 102, 0.2);
    color: #F4C066;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.toggle-icon {
    color: #F4C066;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.kategorie-beschreibung {
    padding: 0 2rem 1rem 2rem;
    color: #D8C5B0;
    font-style: italic;
    background: rgba(203, 131, 88, 0.05);
}

.kategorie-content {
    padding: 1rem 2rem 2rem 2rem;
    display: none;
}

/* ===== ABSCHNITTE ===== */
.abschnitt {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.abschnitt:hover {
    border-color: rgba(244, 192, 102, 0.5);
    box-shadow: 0 4px 12px rgba(244, 192, 102, 0.1);
}

.abschnitt-header {
    background: rgba(203, 131, 88, 0.1);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.abschnitt-titel {
    color: #F4C066;
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.abschnitt-untertitel {
    color: #CB8358;
    font-style: italic;
    font-size: 0.9rem;
}

.zeit-badge {
    background: rgba(168, 95, 61, 0.3);
    color: #A85F3D;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: auto;
}

.abschnitt-inhalt {
    padding: 1.5rem;
    color: #F5F5F5;
    line-height: 1.6;
    background: rgba(30, 26, 23, 0.3);
    white-space: pre-line;
}

.abschnitt-actions {
    padding: 0.8rem 1.5rem;
    background: rgba(203, 131, 88, 0.05);
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.action-btn {
    background: linear-gradient(135deg, #CB8358 0%, #A85F3D 100%);
    color: #F5F5F5;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.action-btn:hover {
    background: linear-gradient(135deg, #A85F3D 0%, #8B4513 100%);
    transform: translateY(-1px);
}

.action-btn.primary {
    background: linear-gradient(135deg, #F4C066 0%, #D99C45 100%);
    color: #2C2623;
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #D99C45 0%, #B8832E 100%);
}

.empty-kategorie {
    text-align: center;
    padding: 2rem;
    color: #D8C5B0;
}

.add-link {
    color: #F4C066;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(244, 192, 102, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.add-link:hover {
    background: rgba(244, 192, 102, 0.1);
    border-color: #F4C066;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar-section {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.3);
}

.sidebar-title {
    color: #F4C066;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(244, 192, 102, 0.2);
    padding-bottom: 0.5rem;
}

/* ===== KURS STATS ===== */
.kurs-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.stat-label {
    color: #D8C5B0;
    font-size: 0.9rem;
}

.stat-value {
    color: #F4C066;
    font-weight: bold;
    background: rgba(244, 192, 102, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.quick-action-btn {
    background: linear-gradient(135deg, #F4C066 0%, #D99C45 100%);
    color: #2C2623;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 192, 102, 0.3);
}

/* ===== RECENT COURSES ===== */
.recent-courses {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.recent-course-item {
    background: rgba(203, 131, 88, 0.1);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.8rem;
    transition: all 0.3s ease;
}

.recent-course-item:hover {
    background: rgba(203, 131, 88, 0.2);
    border-color: rgba(244, 192, 102, 0.3);
}

.course-date {
    color: #F4C066;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.course-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.course-details strong {
    color: #F5F5F5;
    font-size: 0.9rem;
}

.course-details span {
    color: #D8C5B0;
    font-size: 0.8rem;
}

.no-data {
    color: #D8C5B0;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* ===== IMPORTANT NOTES ===== */
.important-notes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-item {
    background: rgba(255, 130, 50, 0.1);
    border: 1px solid rgba(255, 130, 50, 0.2);
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.note-item i {
    color: #FF8232;
    font-size: 1.2rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.note-item p {
    color: #F5F5F5;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 26, 23, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: linear-gradient(135deg, #2C2623 0%, #1E1A17 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.modal-header {
    background: rgba(203, 131, 88, 0.1);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header h3 {
    color: #F4C066;
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: #C8491D;
    color: #F5F5F5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #FF8232;
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

#notizen-text {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(30, 26, 23, 0.8);
    color: #F5F5F5;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

#notizen-text:focus {
    outline: none;
    border-color: #F4C066;
    box-shadow: 0 0 0 2px rgba(244, 192, 102, 0.2);
}

.modal-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.toast.success {
    background: #35A2A2;
    color: #F5F5F5;
}

.toast.info {
    background: #F4C066;
    color: #2C2623;
}

.toast.error {
    background: #FF8232;
    color: #F5F5F5;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar {
        position: static;
        order: -1;
    }
    
    .sidebar-section {
        margin-bottom: 1rem;
    }
    
    .kurs-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .section-header {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .kategorie-header {
        padding: 1rem 1.5rem;
    }
    
    .kategorie-titel {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .kategorie-titel h2 {
        font-size: 1.2rem;
    }
    
    .kategorie-content {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
    }
    
    .abschnitt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .zeit-badge {
        margin-left: 0;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input {
        border-radius: 8px;
        border-right: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 0.5rem;
    }
    
    .search-button {
        border-radius: 8px;
    }
    
    .quick-actions {
        gap: 0.5rem;
    }
    
    .quick-action-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .abschnitt-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .kategorie-section,
    .abschnitt,
    .action-btn,
    .quick-action-btn,
    .toggle-icon,
    .modal {
        transition: none !important;
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    .kategorie-section,
    .sidebar-section,
    .search-section {
        border: 2px solid #F4C066;
    }
    
    .abschnitt {
        border: 1px solid #F4C066;
    }
    
    .action-btn,
    .quick-action-btn {
        border: 1px solid currentColor;
    }
}