/* =========================================
   TEIL 1: BASIS, LAYOUT & NAVIGATION
   ========================================= */

:root {
    --color1: #ededed;
    --color2: #eaeaea;
    --color3: #ffffff;
    --color4: #1e1e1e;
    --color5: #000000;
    --color6: linear-gradient(180deg, #2b8853, #1f633e);
    --color7: #257034;
    --color-danger: #d90000;
    --color-warning: #ffcc00;
    --bg-card: #ffffff;
    --border-color: #000000;
}

* {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--color1);
    color: var(--color4);
    font-family: helvetica, arial, sans-serif;
    line-height: 1.5;
    overscroll-behavior-y: none;
    width: 100vw;
}

nav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    align-items: center;
    background: var(--color6);
    color: var(--color3);
    padding: 16px;
    border-bottom: 2px solid var(--border-color);
    z-index: 1000;
}

nav a {
    text-decoration: none;
    color: var(--color3);
    font-weight: bold;
    padding: 8px;
}

nav a:hover {
    text-decoration: underline;
}

footer{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: start;
    gap: 1rem;
    align-items: center;
    background: var(--color6);
    color: var(--color3);
    padding: 5px 16px;

    border-top: 1px solid var(--border-color);
}


main {
    display: flex;
    flex-direction: column;
    padding: 24px 10px;
    width: 100%;
    gap: 2rem;
}



.hero{
    position: relative;
    display: block;

    width: calc(100% - 5px);
    border: 1px solid var(--border-color);
    box-shadow: 5px 5px 0 var(--border-color);

    height: 50vh;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--color3);
    text-shadow: -1px -1px 5px var(--border-color);
}

.hero-titels{
    position: absolute;
    right: 5rem;
    bottom: 3rem;

}

.hero-titel {
    color: var(--color3);
    font-size: 4vh;
    background: var(--color6);
    padding: 0 10px;
    line-height: 1;
    width: fit-content;

}

.hero-subtitel {
    color: var(--color3);
    width: fit-content;
    font-size: 3vh;
    background: var(--color6);
    padding: 0 10px;
    line-height: 1;
}

@media (min-width: 768px) {
    main {
        padding: 32px 16px;
        max-width: 1200px;
        margin: 0 auto;
    }
}

h1, h2, h3, h4 {
    color: var(--color5);
    margin-top: 0;
    margin-bottom: 16px;
}

h1{
    margin: 0;
    padding: 0;
}

a {
    color: var(--color6);
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}




.header-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 16px;
}

@media (min-width: 768px) {
    .header-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.header-actions h1 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.divider {
    border: 0;
    border-top: 2px solid var(--border-color);
    margin: 32px 0;
}

.bc_hint {
    display: none;
}

@media (min-width: 768px) {
    .bc_hint, .bc_hint a, .bc_hint div {
        display: flex;
        padding: 1px 12px;
        background: var(--color5);
        color: var(--color1);
        text-decoration: none;
        text-align: center;
        justify-content: space-between;
        align-items: center;
    }
}


/* =========================================
   TEIL 2: UI-KOMPONENTEN (Karten, Buttons, Editor)
   ========================================= */

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    min-height: 48px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid var(--border-color);
    background: var(--color1);
    color: var(--color2);
    border-radius: 0;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

.btn:hover, .btn:active {
    background: var(--color5);
    color: var(--color2);
    text-decoration: none;
}

.btn--primary { background: var(--color5); color: #fff; }
.btn--primary:hover, .btn--primary:active { background: var(--color5); }
.btn--secondary { background: var(--color6); color: var(--color2); }
.btn--success { background: var(--color6); color: #fff; }
.btn--success:hover, .btn--success:active { background: var(--color5); }
.btn--danger { background: var(--color-danger); color: #fff; }
.btn--danger:hover, .btn--danger:active { background: var(--color5); }
.btn-block { width: 100%; }

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 24px;
    }
}

.card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card-image {
    width: 100%;
    height: 25vh;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--border-color);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;

    justify-content: start;
    flex-grow: 1;
}

.card-actions{
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.card-header { margin-bottom: 12px; }
.card-title { font-size: 1.2rem; margin: 0 0 12px 0; }
.card-label { text-transform: uppercase; font-size: 0.85em; font-weight: bold; color: var(--color5); margin-bottom: 8px; display: block; }
.card-description { margin-bottom: 20px; flex-grow: 1; }
.card-description p { margin-top: 0; }
.card-notice { background: var(--color1); border: 1px solid var(--border-color); padding: 12px; font-size: 0.9rem; }

.layout-full { display: flex; flex-direction: column; gap: 24px; }
.card-full { flex-direction: column; }
.card-full .card-image { width: 100%; height: 200px; border-right: none; border-bottom: 2px solid var(--border-color); }

@media (min-width: 768px) {
    .card-full { flex-direction: row; }
    .card-full .card-image { width: 350px; height: auto; min-height: 250px; border-bottom: none; border-right: 2px solid var(--border-color); }
}

.meta-list {
    list-style: none; margin: 0 0 24px 0; padding: 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.meta-item {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.95rem;
}
.meta-item:last-child { border-bottom: none; }
.meta-label { font-weight: bold; margin-right: 16px; flex-shrink: 0; }
.meta-value { text-align: right; }
.meta-value a { display: block; font-size: 0.85em; margin-top: 4px; padding: 4px 0; }

.empty-state { background: var(--bg-card); border: 2px solid var(--border-color); padding: 32px; text-align: center; font-weight: bold; }

.detail-view {
    background: var(--bg-card); border: 2px solid var(--border-color);
    padding: 20px;
    margin: 0 auto 48px auto;
}

@media (min-width: 768px) {
    .detail-view { padding: 32px; max-width: 800px; }
}

.detail-header { border-bottom: 2px solid var(--border-color); padding-bottom: 24px; margin-bottom: 24px; }
.detail-title { font-size: 1.6rem; margin-bottom: 8px; }
@media (min-width: 768px) { .detail-title { font-size: 2rem; } }
.detail-subtitle { font-size: 1.1rem; font-weight: normal; margin-bottom: 16px; }
.detail-date { font-size: 0.9rem; font-weight: bold; background: var(--color1); border: 1px solid var(--border-color); padding: 4px 8px; display: inline-block; }
.detail-body { font-size: 1.05rem; line-height: 1.6; }
.detail-body img { max-width: 100%; height: auto; display: block; border: 2px solid var(--border-color); margin: 24px 0; }
.detail-end { margin-top: 32px; border-top: 2px solid var(--border-color); padding-top: 24px; }

.form-group { margin-bottom: 24px; display: flex; flex-direction: column; }
.form-group label { font-weight: bold; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color2); margin-bottom: 8px; }
.form-group input[type="text"], .form-group textarea {
    width: 100%; padding: 14px 16px;
    font-family: inherit; font-size: 1rem;
    background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 0;
    color: var(--color4); transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.form-group input[type="text"]:focus, .form-group textarea:focus { outline: none; border-color: var(--color5); box-shadow: 4px 4px 0px var(--border-color); }
.form-group input::placeholder, .form-group textarea::placeholder { color: #999; opacity: 1; }

.alert-success, .alert-error { padding: 16px; margin-bottom: 24px; font-weight: bold; border: 2px solid var(--border-color); }
.alert-success { background: var(--color6); color: var(--color3); }
.alert-error { background: var(--color-danger); color: #fff; }

.editor-layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) {
    .editor-layout { grid-template-columns: minmax(0, 2fr) 300px; gap: 32px; }
    .editor-sidebar-card { position: sticky; top: 24px; }
}
.editor-sidebar-card { background: var(--color1); border: 2px solid var(--border-color); padding: 20px; }
.editor-sidebar-card h3 { border-bottom: 2px solid var(--border-color); padding-bottom: 8px; margin-bottom: 20px; }
.checklist { list-style: none; padding: 0; margin: 0 0 24px 0; }
.check-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; font-size: 1rem; }
.check-icon {
    width: 28px; height: 28px;
    border: 2px solid var(--border-color); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); flex-shrink: 0; font-weight: bold; color: transparent;
    transition: all 0.3s;
}
.check-item.done .check-icon { background: var(--color6); border-color: var(--color6); color: #fff; }
.check-item input[type="checkbox"] { width: 28px; height: 28px; margin: 0; cursor: pointer; flex-shrink: 0; opacity: 0.01; position: absolute; }
.check-item label { cursor: pointer; padding-top: 2px; }
.check-item small { display: block; margin-top: 4px; opacity: 0.8; font-size: 0.85rem; }

.team-portrait {
    width: 160px; height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin: 24px auto 16px auto; display: block;
    border: 4px solid var(--border-color);
    box-shadow: 4px 4px 0px var(--border-color);
}
.contact-list { list-style: none; padding: 0; margin: 16px 0; }
.contact-list li { margin-bottom: 8px; font-size: 0.95em; }
.contact-list a { text-decoration: none; color: var(--color4); }
.contact-list a:hover { color: var(--color5); }

.course-list { list-style: none; padding: 0; margin-top: 12px; }
.course-list li {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 8px 12px; margin-bottom: 8px;
    font-size: 0.9em;
}
.course-list a { font-weight: bold; text-decoration: none; color: var(--color5); font-size: 1.05em; }
.course-list a:hover { text-decoration: underline; }
/* =========================================
   TEIL 3: WOCHENKALENDER (VOLLBILD 100vw/100vh)
   ========================================= */

.table-responsive {

    width: 100%;
    overflow: hidden;
}

.table {

    width: 100%;
    height: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    table-layout: fixed;
}

.table th, .table td {
    padding: 4px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
    overflow: hidden; /* Verhindert das Ausdehnen der Zellen durch lange Texte */
    word-wrap: break-word;
    font-size: 0.75rem; /* Kleiner für Mobile um mehr unterzubringen */
}

@media (min-width: 768px) {
    .table th, .table td {
        padding: 12px;
        font-size: 1rem;
    }
}

.table th {
    background: var(--color6);
    color: var(--color3);
    text-align: center;
}

.table tr:nth-child(odd) {
    background: var(--color2);
}

.table-time {
    width: 12vw;
    font-weight: bold;
    text-align: center !important;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .table-time {
        width: 80px;
    }
}

.slot {
    width: 100%;
    height: 100%;
    font-weight: bold;
    display: block;
    cursor: pointer;
    text-decoration: none;
    color: var(--color4);
}

.multiple-slot div:before {
    content: "\2023 \00A0";
}

.team-portrait {
    width: 160px; height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin: 24px auto 16px auto; display: block;
    border: 4px solid var(--border-color);
    box-shadow: 4px 4px 0px var(--border-color);
}
.contact-list { list-style: none; padding: 0; margin: 16px 0; }
.contact-list li { margin-bottom: 8px; font-size: 0.95em; }
.contact-list a { text-decoration: none; color: var(--color4); }
.contact-list a:hover { color: var(--color5); }

.course-list { list-style: none; padding: 0; margin-top: 12px; }
.course-list li {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 8px 12px; margin-bottom: 8px;
    font-size: 0.9em;
}
.course-list a { font-weight: bold; text-decoration: none; color: var(--color5); font-size: 1.05em; }
.course-list a:hover { text-decoration: underline; }

/* =========================================
   TEIL 4: CAROUSEL & KURS-DETAILS
   ========================================= */

/* --- Carousel Layout & Mobile Swipe --- */
.carousel-wrapper {
    position: relative;
    width: 100%;
}

.carousel-track {
    display: flex;
    width: 100%;
    gap: 16px; /* Der gleiche Abstand wie bei deinen News-Karten (Mobile) */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

/* Versteckt Scrollbar in Webkit (Chrome, Safari, iOS) */
.carousel-track::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .carousel-track {
        gap: 24px; /* Gleicht den Abstand an das Desktop-Grid an */
    }
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start; /* Hier rastet die Karte ein */
    margin: 0;
}

.carousel-empty-image {
    width: 100%;
    height: 25vh;
    background: var(--color2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color5);
    font-weight: bold;
    border-bottom: 2px solid var(--border-color);
}

/* --- Carousel Navigation (Desktop) --- */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--color5);
    color: var(--color3);
    border: 2px solid var(--border-color);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--border-color);
    transition: background 0.2s, transform 0.1s, box-shadow 0.1s;
}

.carousel-btn:hover, .carousel-btn:active {
    background: var(--color6);
}

.carousel-btn:active {
    transform: translateY(-50%) translate(4px, 4px);
    box-shadow: 0px 0px 0 var(--border-color);
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

/* Pfeile auf Mobile ausblenden (Wischgeste reicht völlig und spart Platz) */
@media (max-width: 767px) {
    .carousel-btn {
        display: none;
    }
}

/* --- Detail & Listen-Styles (Bilder & Trainer) --- */
.detail-image {
    width: 100%;
    height: 40vh;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

.trainers-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.trainer-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trainer-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.trainer-list-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.trainer-detail-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trainer-detail-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.trainer-detail-name {
    font-weight: bold;
    font-size: 1.1rem;
}

#course-table{
    display: none;
}

@media (min-width: 768px) {
    #course-table{
        display: table;
    }
    #course-carousel{
        display: none;
    }
}