/* Lộ trình học tập: dùng chung cho roadmaps.html và roadmap.html */

/* ---------- Hero ---------- */
.roadmaps-hero,
.roadmap-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.roadmaps-hero {
    padding: 80px 0;
    text-align: center;
}

.roadmaps-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
}

.roadmaps-hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 760px;
    margin: 0 auto;
}

.roadmap-hero {
    padding: 50px 0 60px;
}

.roadmap-hero .back-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.9;
    display: inline-block;
    margin-bottom: 20px;
}

.roadmap-hero .back-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.roadmap-hero-head {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.roadmap-hero-icon {
    font-size: 44px;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 20px;
}

.roadmap-hero h1 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.roadmap-hero p {
    font-size: 18px;
    opacity: 0.92;
    max-width: 760px;
}

.roadmap-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.roadmap-chips span {
    background: rgba(255, 255, 255, 0.18);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Danh sách lộ trình ---------- */
.roadmaps-section {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

.roadmaps-intro {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.intro-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.intro-item span {
    font-size: 28px;
    line-height: 1;
}

.intro-item strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.intro-item p {
    font-size: 14px;
    color: var(--text-light);
}

.roadmaps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.roadmap-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.roadmap-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.roadmap-card.featured {
    border: 2px solid var(--primary);
}

.roadmap-card .featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.roadmap-card-icon {
    font-size: 36px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 16px;
    margin-bottom: 18px;
}

.roadmap-card h2 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
}

.roadmap-card h2 a {
    color: var(--primary-dark);
    text-decoration: none;
}

.roadmap-card h2 a:hover {
    color: var(--primary);
}

.roadmap-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.roadmap-card .roadmap-desc {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 18px;
}

.roadmap-steps-preview {
    list-style: none;
    margin-bottom: 24px;
    flex-grow: 1;
    counter-reset: step;
}

.roadmap-steps-preview li {
    counter-increment: step;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 14px;
    color: var(--text-dark);
}

.roadmap-steps-preview li::before {
    content: counter(step);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roadmap-card .btn {
    align-self: flex-start;
}

/* ---------- Chi tiết lộ trình ---------- */
.roadmap-section {
    padding: 50px 0 80px;
    background: var(--bg-light);
}

.roadmap-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.timeline {
    list-style: none;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 23px;
    width: 2px;
    background: var(--border);
}

.timeline-step {
    position: relative;
    padding-left: 70px;
    margin-bottom: 30px;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.step-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.step-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.step-card > p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 14px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.skill-tags span {
    background: var(--bg-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.video-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.video-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.15);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-play::before {
    content: "";
    width: 52px;
    height: 36px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.92);
    transition: transform 0.25s;
}

.video-play::after {
    content: "";
    position: absolute;
    border-style: solid;
    border-width: 8px 0 8px 13px;
    border-color: transparent transparent transparent white;
    margin-left: 3px;
}

.video-card:hover .video-play::before {
    transform: scale(1.1);
}

.video-type {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.video-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.video-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
}

.video-channel {
    font-size: 12px;
    color: var(--text-light);
}

.video-open {
    margin-top: auto;
    padding-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* ---------- Sidebar ---------- */
.roadmap-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
}

.roadmap-sidebar .sidebar-card {
    background: white;
    padding: 26px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.roadmap-sidebar h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 14px;
}

.roadmap-sidebar p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.outcome-list {
    list-style: none;
}

.outcome-list li {
    padding: 8px 0 8px 26px;
    position: relative;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.outcome-list li:last-child {
    border-bottom: none;
}

.outcome-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
}

.other-roadmaps {
    list-style: none;
}

.other-roadmaps a {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.other-roadmaps li:last-child a {
    border-bottom: none;
}

.other-roadmaps a:hover {
    color: var(--primary);
}

.source-note {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 30px;
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .roadmap-layout {
        grid-template-columns: 1fr;
    }

    .roadmap-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .roadmaps-hero h1 {
        font-size: 36px;
    }

    .roadmaps-hero p {
        font-size: 17px;
    }

    .roadmaps-intro,
    .roadmaps-grid {
        grid-template-columns: 1fr;
    }

    .roadmap-hero h1 {
        font-size: 30px;
    }

    .roadmap-hero-head {
        flex-direction: column;
    }

    .timeline::before {
        left: 17px;
    }

    .timeline-step {
        padding-left: 50px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .step-card {
        padding: 20px;
    }
}
