/* =============================================================
   Simple Video Courses — frontend styles
   Layout + shields + responsive behavior for [svc_course].
   ============================================================= */

.svc-course-fe,
.svc-course-fe *,
.svc-course-fe *::before,
.svc-course-fe *::after {
    box-sizing: border-box;
}

.svc-course-fe {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 28px;
    width: 100%;
    background: transparent;
    color: #1d2327;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

/* Viewport-width breakout so narrow theme content containers don't squash us. */
.svc-course-fe--fullwidth {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 20px 32px;
}

@media (max-width: 960px) {
    .svc-course-fe {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .svc-course-fe--fullwidth {
        padding: 16px;
    }
}

/* =============================================================
   Sidebar
   ============================================================= */

.svc-course-fe__sidebar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    align-self: start;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

@media (max-width: 960px) {
    .svc-course-fe__sidebar {
        position: static;
        max-height: none;
    }
}

.svc-course-fe__header {
    padding: 18px 20px 8px;
    border-bottom: 1px solid #f1f2f4;
}

.svc-course-fe__eyebrow {
    display: block;
    color: #8c8f94;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    font-weight: 600;
}

.svc-course-fe__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1d2327;
    line-height: 1.25;
}

.svc-course-fe__section-title {
    padding: 14px 20px;
    background: #1d2937;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.svc-course-fe__count {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 2px 9px;
}

.svc-course-fe__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.svc-course-fe__item {
    margin: 0;
    border-bottom: 1px solid #f1f2f4;
}

.svc-course-fe__item:last-child { border-bottom: none; }

.svc-course-fe__item > a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    color: #1d2327;
    text-decoration: none;
    transition: background .12s ease;
}

.svc-course-fe__item > a:hover { background: #f6f7f9; color: #1d2327; }
.svc-course-fe__item > a:focus { outline: 2px solid #2271b1; outline-offset: -2px; }

.svc-course-fe__item.is-active > a {
    background: #eff6ff;
    border-left: 3px solid #2271b1;
    padding-left: 17px;
}

.svc-course-fe__item-status { margin-top: 2px; flex: 0 0 auto; }

.svc-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 2px solid #c3c4c7;
    border-radius: 50%;
    background: #fff;
    font-size: 10px;
    line-height: 1;
    color: transparent;
    transition: all .15s ease;
}

.svc-dot--active {
    border-color: #2271b1;
    background: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.18);
}

.svc-dot--done {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.svc-course-fe__item-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.svc-course-fe__item-title {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
    word-break: break-word;
    line-height: 1.35;
}

.svc-course-fe__item.is-active .svc-course-fe__item-title { color: #0b3a6b; }

.svc-course-fe__item-sub {
    color: #2271b1;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.svc-course-fe__play { color: #2271b1; font-size: 9px; }

/* =============================================================
   Main column
   ============================================================= */

.svc-course-fe__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.svc-course-fe__main-header { margin: 0; }

.svc-course-fe__lesson-title {
    font-size: clamp(22px, 3.2vw, 32px);
    font-weight: 700;
    margin: 2px 0 0;
    color: #1d2327;
    line-height: 1.2;
}

.svc-course-fe__video {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px -12px rgba(0,0,0,0.25);
}

.svc-course-fe__video .svc-embed { border-radius: 12px; }

.svc-course-fe__notes {
    padding: 20px 22px;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.svc-course-fe__notes h3 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #50575e;
}

.svc-course-fe__notes-body { font-size: 15px; line-height: 1.65; }
.svc-course-fe__notes-body p { margin: 0 0 0.9em; }
.svc-course-fe__notes-body p:last-child { margin-bottom: 0; }
.svc-course-fe__notes-body a { color: #2271b1; }

/* Navigation row */
.svc-course-fe__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.svc-course-fe__finished {
    color: #16a34a;
    font-weight: 600;
    font-size: 14px;
}

.svc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .12s ease, transform .08s ease, box-shadow .12s ease;
    line-height: 1;
}

.svc-btn--primary {
    background: #2271b1;
    color: #fff !important;
    border-color: #2271b1;
    box-shadow: 0 2px 6px rgba(34,113,177,0.25);
}
.svc-btn--primary:hover,
.svc-btn--primary:focus { background: #135e96; color: #fff !important; transform: translateY(-1px); text-decoration: none; }

.svc-btn--secondary {
    background: #fff;
    color: #1d2327 !important;
    border-color: #c3c4c7;
}
.svc-btn--secondary:hover,
.svc-btn--secondary:focus { background: #f0f0f1; color: #1d2327 !important; text-decoration: none; }

/* =============================================================
   Embed boxes + responsive aspect ratios
   ============================================================= */

.svc-embed {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.svc-embed--16x9      { padding-bottom: 56.25%; }
.svc-embed--1x1       { padding-bottom: 100%; }
.svc-embed--instagram { padding-bottom: 125%; }

.svc-embed iframe,
.svc-embed video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
    display: block;
}

/* Shields hide the YouTube / Facebook / Instagram click-out areas
   (title bar at top, logo/open-externally link at the corner). */
.svc-embed__shield {
    position: absolute;
    z-index: 3;
    background: transparent;
    pointer-events: auto;
    /* Small visual nudge only on hover so nothing looks off. */
    transition: background .15s ease;
}

.svc-embed__shield--top {
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
}

.svc-embed__shield--logo {
    bottom: 0;
    right: 0;
    width: 72px;
    height: 22px;
}

/* =============================================================
   Audio player (for MP3 / audio source)
   ============================================================= */
.svc-audio {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    color: #fff;
    border-radius: 12px;
    min-height: 120px;
}

.svc-audio__icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    font-size: 28px;
    color: #cbd5e1;
}

.svc-audio audio {
    width: 100%;
    flex: 1;
    height: 44px;
}

/* Error/empty states */
.svc-course-fe--error,
.svc-course-fe--empty,
.svc-empty,
.svc-error {
    padding: 24px;
    text-align: center;
    background: #fafbfc;
    border: 1px dashed #c3c4c7;
    border-radius: 10px;
    color: #50575e;
}

.svc-error { border-color: #d63638; color: #d63638; }
