/* ============================================
   Foundation Course — Roadmap Page
   Light theme — matching FiZenLab brand palette
   Emerald accent: #0a8a55
   ============================================ */

/* Base variables for this page */
:root {
    --emerald: #0a8a55;
    --emerald-glow: rgba(10, 138, 85, 0.25);
    --emerald-subtle: rgba(10, 138, 85, 0.4);
    --emerald-faint: rgba(10, 138, 85, 0.08);

    /* Light theme mappings (replaces old dark vars) */
    --bg-dark: #f0f7f4;
    --bg-primary: #ffffff;
    --text-light: #1a1a1a;
    --text-muted: #5a6b63;
    --ff-heading: 'Outfit', 'Manrope', sans-serif;
    --radius-xl: 16px;
    --radius-lg: 12px;
}

/* ============================================
   GLOBAL OVERRIDES for light theme
   ============================================ */

/* Make sure page body inherits light background */
body {
    background: #f8faf9;
}

/* Hero / Header */
.rm-hero {
    padding: 160px 0 56px;
    text-align: center;
    background: linear-gradient(180deg, #f0f7f4 0%, #ffffff 100%);
}

.rm-hero-overline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--emerald);
    margin-bottom: 16px;
}

.rm-hero-overline .material-symbols-outlined {
    font-size: 20px;
    color: var(--emerald);
}

.rm-hero-title {
    font-family: var(--ff-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.2;
}

.rm-hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Progress Card */
.rm-progress-card {
    max-width: 560px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid rgba(10, 138, 85, 0.15);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(10, 138, 85, 0.08);
}

/* Abstract background glow (from Stitch) */
.rm-progress-card::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 160px;
    height: 160px;
    background: rgba(10, 138, 85, 0.07);
    filter: blur(60px);
    border-radius: 50%;
    pointer-events: none;
}

.rm-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.rm-progress-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--emerald);
}

.rm-progress-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
}

.rm-progress-bar-track {
    width: 100%;
    height: 8px;
    background: #e8f4ef;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.rm-progress-bar-fill {
    height: 100%;
    width: 28.57%;
    /* 2/7 */
    background: var(--emerald);
    border-radius: 9999px;
    transition: width 0.6s ease;
}

/* Progress / CTA buttons — match site btn-primary style */
.rm-progress-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.85rem 1.75rem;
    background: var(--emerald);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(10, 138, 85, 0.25);
    position: relative;
    z-index: 1;
    letter-spacing: 0.01em;
}

.rm-progress-btn:hover {
    background: #087a4a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 138, 85, 0.35);
}

.rm-progress-btn:active {
    transform: scale(0.97);
}

.rm-progress-btn .material-symbols-outlined {
    font-size: 20px;
}

/* Roadmap Section */
.rm-roadmap {
    padding: 64px 0 80px;
    background: var(--bg-primary);
}

.rm-roadmap-inner {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}

/* Timeline Vertical Line */
.rm-timeline {
    position: relative;
    padding-left: 56px;
}

/* Base neutral line */
.rm-timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d1e8de;
    border-radius: 2px;
}

/* Green progress line (filled portion) */
.rm-timeline::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    height: 30%;
    width: 2px;
    background: var(--emerald);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Individual Step */
.rm-step {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    align-items: stretch;
}

.rm-step:last-child {
    margin-bottom: 0;
}

/* Step Status Indicator (the circle on the line) */
.rm-step-indicator {
    position: absolute;
    left: -56px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 20px;
    transition: all 0.3s ease;
}

/* Completed state — emerald bg */
.rm-step--completed .rm-step-indicator {
    background: var(--emerald);
    color: #fff;
    box-shadow: 0 4px 12px var(--emerald-glow);
}

/* In-progress state — emerald border with glow */
.rm-step--active .rm-step-indicator {
    background: #0a291b;
    border: 4px solid var(--emerald);
    color: #fff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
    animation: rm-pulse-ring 2s ease-in-out infinite;
}

/* Locked state — neutral light grey */
.rm-step--locked .rm-step-indicator {
    background: #e8ede9;
    color: #a0b0a6;
    border: 2px solid #c5d5ca;
}

@keyframes rm-pulse-ring {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    }

    50% {
        box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
    }
}

/* Step Card — light white card with subtle shadow */
.rm-step-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid #e8f0ec;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: default;
    gap: 16px;
}

/* Completed step card */
.rm-step--completed .rm-step-card {
    border-color: #d5e8df;
    background: #f5faf7;
}

.rm-step--completed .rm-step-card:hover {
    background: #eef7f2;
    transform: translateX(4px);
    cursor: pointer;
}

/* Active step card — light emerald tint with border */
.rm-step--active .rm-step-card {
    background: #f0f9f4;
    border-color: var(--emerald);
    box-shadow: 0 0 0 1px rgba(10, 138, 85, 0.2), 0 4px 20px rgba(10, 138, 85, 0.1);
}

/* Locked step card — lightly dimmed */
.rm-step--locked .rm-step-card {
    opacity: 0.7;
    background: #f5f5f5;
    border-color: #e5e5e5;
}

/* Step content */
.rm-step-content {
    flex: 1;
}

/* "IN PROGRESS" badge — emerald bg */
.rm-step-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: var(--emerald);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
}

/* Step title */
.rm-step-title {
    font-family: var(--ff-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

/* Completed title — strikethrough & dimmed */
.rm-step--completed .rm-step-title {
    text-decoration: line-through;
    color: #9ab0a6;
}

/* Locked title — grey */
.rm-step--locked .rm-step-title {
    color: #9ab0a6;
}

.rm-step-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Active step desc — italic + emerald-tinted */
.rm-step--active .rm-step-desc {
    font-style: italic;
    color: #0a8a55;
}

/* Locked desc — light grey */
.rm-step--locked .rm-step-desc {
    color: #b0c0b8;
}

/* Step icon (right side) */
.rm-step-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.rm-step-icon .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
}

/* Completed step icon — emerald tinted */
.rm-step--completed .rm-step-icon .material-symbols-outlined {
    color: var(--emerald-subtle);
}

/* Active step icon — emerald bright */
.rm-step--active .rm-step-icon .material-symbols-outlined {
    color: #34d399;
    /* emerald-400 */
}

/* Locked step icon — neutral grey */
.rm-step--locked .rm-step-icon .material-symbols-outlined {
    color: #c5d5ca;
}

/* Bottom CTA Section */
.rm-bottom-cta {
    padding: 48px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-dark) 100%);
}

.rm-bottom-cta-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 32px;
    background: #ffffff;
    border: 1px solid rgba(10, 138, 85, 0.15);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 32px rgba(10, 138, 85, 0.08);
}

.rm-bottom-cta-title {
    font-family: var(--ff-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
}

.rm-bottom-cta-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.rm-bottom-cta .rm-progress-btn {
    max-width: 320px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .rm-hero {
        padding: 140px 16px 36px;
    }

    .rm-progress-card {
        margin: 0 16px;
        padding: 22px 20px;
    }

    .rm-roadmap {
        padding: 48px 16px 64px;
    }

    .rm-timeline {
        padding-left: 48px;
    }

    .rm-timeline::before,
    .rm-timeline::after {
        left: 15px;
    }

    .rm-step-indicator {
        left: -48px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .rm-step-card {
        padding: 16px 18px;
    }

    .rm-bottom-cta-card {
        margin: 0 16px;
        padding: 32px 22px;
    }
}

/* ============================================
   DYNAMIC VIDEO CARDS (Roadmap Integration)
   ============================================ */
.rm-step {
    flex-direction: column;
}

.rm-step-videos {
    margin-top: 16px;
    width: 100%;
    display: none;
    /* Controlled by JS but we add transition support below */
    grid-template-columns: 1fr;
    gap: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.rm-step--active .rm-step-videos {
    display: grid;
    opacity: 1;
    transform: translateY(0);
}

.rm-step--active .rm-step-card {
    border-color: var(--emerald);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

/* Reusing Resource Library Card styles but adapted for Roadmap */
.rm-step-videos .rl-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.rm-step-videos .rl-card-thumb {
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rm-step-videos .rl-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.3);
}

.video-embed-container {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rm-step-videos .rl-card-body {
    padding: 16px;
}

.rm-step-videos .rl-card-title {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.rm-step-videos .rl-card-desc {
    font-size: 0.8rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rm-step-videos .rl-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

/* Video Previews & Overlays */
.rl-card-video-preview {
    transition: transform 0.5s ease;
}

.rl-card:hover .rl-card-video-preview {
    transform: scale(1.05);
}

.rl-card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1px);
    color: #fff;
    z-index: 2;
    transition: all 0.3s ease;
}

.rl-card:hover .rl-card-play-overlay {
    background: rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(0);
}

.rl-card-play-overlay span {
    font-size: 3.5rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.rl-card:hover .rl-card-play-overlay span {
    transform: scale(1.15);
    color: var(--emerald);
}

.video-placeholder iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 580px) {
    .rm-step-videos .rl-card {
        flex-direction: column;
    }

    .rm-step-videos .rl-card-thumb {
        width: 100%;
        height: 140px;
    }
}