/* 
 * Kurs-Detailseite CSS
 * Für: Microsoft365-Trainer
 */

/* ----- Breadcrumb Navigation ----- */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: #999;
}

.breadcrumb a {
    color: #0078d4;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ----- Course Header ----- */
.course-header {
    background-color: #f9f9f9;
    padding: 3rem 0;
    border-bottom: 1px solid #eaeaea;
}

.course-header-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.course-info {
    flex: 1;
}

.course-category {
    display: inline-block;
    background-color: #0078d4;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.course-info h1 {
    font-size: 2.5rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    color: #333;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    color: #555;
    font-size: 0.95rem;
}

.meta-item i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.course-image {
    flex: 0 0 40%;
    max-width: 500px;
}

.course-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ----- Course Overview Grid Layout ----- */
.course-overview {
    padding: 3rem 0;
}

.course-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* ----- Course Details Content ----- */
.detail-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.2rem;
}

.course-description {
    line-height: 1.6;
    color: #555;
}

/* ----- Course Modules Accordion ----- */
.modules-accordion {
    margin-top: 1.5rem;
}

.module {
    margin-bottom: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.module-header {
    background-color: #f5f5f5;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-header:hover {
    background-color: #eaeaea;
}

/* Stellt sicher, dass die Modul-Dauer immer direkt neben dem Titel angezeigt wird */
.module-header h3 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
}

.module-header h3 .module-duration {
    margin-left: 0.8rem; /* Abstand zur Modulbezeichnung */
    background-color: #f0f7ff; /* Weicherer Hintergrund */
    color: #0078d4; /* Standardfarbe */
    padding: 0.3rem 0.8rem; /* Etwas mehr Padding */
    border-radius: 16px; /* Abgerundete Ecken */
}

.module-number {
    background-color: #0078d4;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    margin-right: 0.8rem;
}

/* ----- Modul Dauer Styles ----- */
.module-duration {
    font-size: 1rem; /* Größere Schriftgröße für bessere Sichtbarkeit */
    font-weight: bold; /* Fett für die Dauer */
    color: #0078d4; /* Passende Farbe, die zur Branding-Farbe des Kurses passt */
    margin-left: 1rem;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    background-color: #eaf4ff; /* Helles Blau für Hintergrund */
    display: inline-block;
}

/* Optional: Beim Hover über das Modul-Header die Dauer hervorheben */
.module-header:hover .module-duration {
    background-color: #cfe7ff; /* Etwas dunklerer Blauton bei Hover */
    color: #004f8b; /* Dunklere Farbe bei Hover */
}

.toggle-icon {
    font-size: 1.5rem;
    color: #0078d4;
}

.module-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.module.active .module-content {
    padding: 1.2rem;
    max-height: 500px;
}

.modules-summary {
    margin-top: 1rem;
    font-size: 1.0rem; /* Etwas größere Schrift */
    color: #333; /* Dunklere Farbe für den Text */
    text-align: right; /* Rechtsbündig für das Gesamtbild */
    font-weight: bold; /* Fett, um die Information hervorzuheben */
}

.modules-summary strong {
    color: #0078d4; /* Stilvolle Farbe für das Wort "Module" */
    font-size: 1.0rem; /* Größerer Text für den Titel */
}

/* ----- Trainer Section ----- */
.trainer-info {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.trainer-image {
    flex: 0 0 100px;
}

.trainer-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.trainer-details {
    flex: 1;
}

.trainer-details h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.trainer-details p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
}

/* ----- Reviews Section ----- */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.average-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rating-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.rating-stars {
    font-size: 1.5rem;
    color: #f8c01a;
    margin: 0.3rem 0;
}

.review-count {
    font-size: 0.9rem;
    color: #666;
}

.reviews-list {
    margin-top: 1.5rem;
}

.review-item {
    padding: 1.2rem;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.reviewer-name {
    font-weight: 500;
}

.review-date {
    font-size: 0.85rem;
    color: #777;
}

.review-rating {
    font-size: 1.1rem;
    color: #f8c01a;
    margin-bottom: 0.5rem;
}

.review-comment {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.more-reviews {
    text-align: center;
    margin-top: 1.5rem;
}

/* ----- Sidebar Sections ----- */
.sidebar-section {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #333;
}

.course-booking {
    border: 2px solid #0078d4;
    background-color: #f0f7ff;
}

.course-price {
    text-align: center;
    margin-bottom: 1.2rem;
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.price-info {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.3rem;
}

.btn-large {
    display: block;
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.booking-info {
    margin-top: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.info-item i {
    margin-right: 0.7rem;
    color: #0078d4;
}

.info-item:last-child {
    margin-bottom: 0;
}

/* ----- Course Dates ----- */
.dates-list {
    margin-top: 1rem;
}

.date-item {
    border-bottom: 1px solid #eaeaea;
    padding: 0.8rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-item:last-child {
    border-bottom: none;
}

.date {
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.location {
    font-size: 0.85rem;
    color: #666;
}

.seats-info {
    text-align: right;
}

.seats {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.all-dates {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.all-dates a {
    color: #0078d4;
    text-decoration: none;
}

.all-dates a:hover {
    text-decoration: underline;
}

/* ----- Share Buttons ----- */
.share-buttons {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.share-btn:hover {
    opacity: 0.9;
}

.share-btn i {
    margin-right: 0.5rem;
}

.linkedin {
    background-color: #0077b5;
}

.twitter {
    background-color: #1da1f2;
}

.email {
    background-color: #555;
}

/* ----- Similar Courses ----- */
.similar-courses {
    background-color: #f5f5f5;
    padding: 3rem 0;
}

.similar-courses h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.similar-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ----- CTA Section ----- */
.cta-section {
    background-color: #0078d4;
    color: white;
    padding: 3.5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ----- Responsive Adjustments ----- */
@media (max-width: 992px) {
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .course-header-content {
        flex-direction: column;
    }
    
    .course-image {
        max-width: 100%;
        order: -1;
    }
}

@media (max-width: 768px) {
    .course-info h1 {
        font-size: 2rem;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .trainer-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .trainer-image {
        margin-bottom: 1rem;
    }
    
    .similar-courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cta-buttons {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .course-header {
        padding: 2rem 0;
    }
    
    .course-info h1 {
        font-size: 1.8rem;
    }
    
    .date-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .seats-info {
        margin-top: 0.8rem;
        text-align: left;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}