/* Public course detail for guests; builds on landing_page.css */

a.lang-switch-btn {
    text-decoration: none;
}

.public-course {
    position: relative;
    z-index: 1;
    padding: 8rem 5% 5rem;
}

.public-course-container {
    max-width: 1300px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.course-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.course-tab {
    padding: 0.5rem 1rem;
    border: 1px solid #a9b1b6;
    border-radius: 9999px;
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.course-tab:hover {
    border-color: var(--primary-color);
}

.course-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.public-course-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: flex-start;
}

.public-course-content {
    flex: 999 1 560px;
    min-width: 0;
    color: var(--text-dark);
}

.public-course-content h1 {
    font-family: 'Roboto Slab', serif;
    font-size: 2.6rem;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.public-course-content .lead {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.trailer {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 2.5rem;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--primary-dark);
}

.trailer iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Description HTML comes from the course editor and uses the app theme's grid classes */
.course-description .box {
    margin-bottom: 2rem;
}

.course-description .row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2.5rem;
}

.course-description .row > h3:first-child {
    flex-basis: 100%;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.course-description .col-6 {
    flex: 1 1 calc(50% - 1.25rem);
    min-width: 0;
}

.course-description h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 0 0 0.75rem;
}

.course-description p,
.course-description ul,
.course-description ol {
    margin-bottom: 1.75rem;
}

.course-description ul {
    list-style: none;
}

.course-description ol {
    padding-left: 1.4em;
}

.course-description li {
    margin-bottom: 0.4rem;
}

.course-description a {
    color: var(--primary-color);
    font-weight: 600;
}

.public-course-aside {
    flex: 1 1 320px;
    min-width: 0;
    position: sticky;
    top: 7rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.purchase-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.75rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(47, 69, 80, 0.1);
}

.purchase-card .btn {
    text-align: center;
    white-space: nowrap;
    padding-left: 1rem;
    padding-right: 1rem;
}

.purchase-price {
    font-family: 'Roboto Slab', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.purchase-note {
    margin-bottom: 0.5rem;
}

.purchase-hint {
    font-size: 0.875rem;
    text-align: center;
}

.bundle-card {
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    background: #fbefe7;
    color: var(--text-dark);
}

.bundle-card p {
    margin-bottom: 0.5rem;
}

.bundle-title {
    font-weight: 600;
    color: #8a3b0f;
}

.bundle-card a {
    font-weight: 600;
    color: #8a3b0f;
}

.mobile-buy-bar {
    display: none;
}

@media screen and (max-width: 768px) {
    .mobile-buy-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.75rem 5%;
        background: white;
        box-shadow: 0 -6px 20px rgba(47, 69, 80, 0.1);
    }

    .mobile-buy-bar .purchase-price {
        font-size: 1.3rem;
        white-space: nowrap;
    }

    .mobile-buy-bar .btn {
        padding: 0.8rem 1.2rem;
    }

    .footer {
        padding-bottom: 6rem;
    }

    .public-course {
        padding: 6rem 5% 3rem;
    }

    .public-course-content h1 {
        font-size: 2rem;
    }

    .course-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .course-tab {
        white-space: nowrap;
    }

    .course-description .col-6 {
        flex-basis: 100%;
    }

    .public-course-aside {
        position: static;
    }
}
