body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: white;
    padding: 10px 20px;
    text-align: left;
}

header .logo {
    max-width: 600px;
    height: auto;
    margin-left: 20px;
    cursor: pointer;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: 20px auto;
    flex: 1;
    padding-bottom: 60px;
}

.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.title-link {
    font-family: Arial, sans-serif;
    color: #2b4765;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    margin-left: 20px;
}

.title-link:hover {
    color: #667f99;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); /* Kartenbreite */
    gap: 20px;
}

.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    height: 360px;
}

.card p {
    font-size: 16px;
    color: #555;
    margin-bottom: 5px;
    flex-grow: 1;
    height: 130px;
    overflow: hidden;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 5px;
    height: 60px;
    overflow: hidden;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 150px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

button:disabled {
    background-color: #828282;
    cursor: not-allowed;
}

.primary-button {
    background-color: #485c7a;
    color: #fff;
}

.primary-button.loading,
button:disabled {
    background-color: #828282;
    cursor: not-allowed;
}

.primary-button.open {
    background-color: #485c7a;
}

footer {
    background-color: white;
    padding: 10px 20px;
    text-align: left;
    font-size: 14px;
    color: #555;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    z-index: 500;
}

footer p {
    margin: 0;
    margin-right: 5%;
}
footer button {
    margin: 0;
    margin-right: 5%;
 background-color: transparent; 
    border: none; 
    font-weight: bold;
    font-size: 16px; 
    cursor: pointer;
    transition: color 0.3s;
}

footer button:hover {
    color: #007BFF; /* Farbe beim Hover (z.B. Blau) */
}



.button-container {
    position: absolute;
    right: 20px;
    bottom: 10px;
}

footer #reset-progress-button {
    position: fixed;
    bottom: 10px;
    right: 20px;
}

.completed-message {
    color: #28a745;
    font-weight: bold;
    margin-top: 10px;
    position: initial;
    bottom: initial;
    left: initial;
    transform: none;
}

.completed-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background-color: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.completed-icon::before {
    content: '✔';
    color: #fff;
    font-size: 16px;
}

.position-relative {
    position: relative;
}

.course-container {
    display: flex;
    flex-direction: row;
    flex: 1;
    height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background-color: #8099ad;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar a {
    color: white;
    display: block;
    padding: 10px 0;
    text-decoration: none;
}

.sidebar a:hover {
    background-color: #485c7a;
}

.course-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.content-wrapper {
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
}

.left-aligned-wrapper {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 100%;
    margin-bottom: 20px;
    text-align: left;
    margin-left: 0;
}

.button-outer-wrapper {
    max-width: 900px;
    width: 100%;
    margin-left: 0;
    padding: 20px;
}

.button-wrapper {
    display: flex;
    justify-content: space-between;
    padding-left: 100px;
    padding-right: 100px;
    box-sizing: border-box;
    margin-top: 0;
    margin-bottom: 50px;
}

.button-wrapper button {
    margin: 0 10px;
}

#prev-part-button {
    visibility: hidden;
}

.back-link {
    font-weight: normal;
    margin-bottom: 20px;
    display: block;
    color: white;
}


.category {
    cursor: pointer;
    padding: 10px 0;
    color: white;
    font-weight: normal;
}

.category-content {
    display: none;
    padding-left: 20px;
}

.category.open .category-content {
    display: block;
}

.current-part-link {
    padding-left: 20px;
}

.current-part {
    padding-left: 20px !important;
    background-color: #485c7a;
    color: white;
    display: block;
    padding: 10px;
}

@media (max-width: 600px) {
    .container, .content-box {
        width: 90%;
        padding: 10px;
    }

    header, footer {
        padding: 5px 10px;
    }

    .button-wrapper {
        display: flex;
        justify-content: center;
        margin-top: 20px;
        padding: 0 75px;
        width: calc(100% - 150px);
        box-sizing: border-box;
    }
    
    .button-wrapper button {
        margin: 0 10px;
    }

    .sidebar {
        width: 100%;
        flex-shrink: 1;
    }

    .course-container {
        flex-direction: column;
    }
}

@media only screen and (max-width: 768px) {
  header {
    text-align: center;
  }
  
  header .logo {
    margin: 0 auto;
    max-width: 100%;
  }
  
  footer {
    text-align: center;
    padding: 0px;
    height: auto; /* Allow footer height to adjust based on content */
    flex-direction: column;
    align-items: center;
    position: relative; /* Change positioning for contained elements */
  }
  
  footer p, 
  footer button {
    margin: 0;
    margin-bottom: 5px;
  }
  
  .button-container {
    position: static; /* Remove absolute positioning on mobile */
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
  }

  .sidebar {
    height: auto; /* Allow footer height to adjust based on content */
    overflow-y: visible;
}
.course-content {
    height: auto;
    padding: 0%;
    overflow-y: visible;
    overflow-x: visible;
}
.course-content img {
max-width: 100%;
height: auto;
}
}