/* ==================== ROADMAP STYLES ==================== */

:root {
    /* Warna dialiaskan ke palet resmi EPIC Academy (lihat style.css) supaya
       seluruh halaman punya identitas visual yang sama persis dengan homepage. */
    --primary-color: var(--primary-900);
    --secondary-color: var(--primary-600);
    --gold: var(--accent-500);
    --blue: var(--primary-600);
    --purple: #0A4E64;
    --light-bg: var(--cream);
}

/* ==================== HERO SECTION ==================== */

.roadmap-hero {
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(12,112,137,.35), transparent 60%),
        radial-gradient(700px 400px at 100% 100%, rgba(63,185,212,.18), transparent 55%),
        var(--brand-gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.roadmap-hero h1 {
    font-size: 2.1rem;
}

/* ==================== FILTER SECTION ==================== */

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.65rem 1.3rem;
    border: 2px solid #DDE7EA;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4A6069;
}

.filter-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
    box-shadow: 0 4px 12px rgba(12,100,125, 0.3);
}

.filter-btn i {
    font-size: 1.1rem;
}

/* ==================== LEGEND ==================== */

.legend-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.7rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #DDE7EA;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #4A6069;
}

.legend-badge {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

/* ==================== TIMELINE CONTAINER ==================== */

.timeline-container {
    position: relative;
    padding: 1.7rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--gold), var(--blue), var(--purple));
    transform: translateX(-50%);
    z-index: 0;
}

.roadmap-timeline {
    position: relative;
    z-index: 1;
}

/* ==================== TIMELINE ITEMS ==================== */

.timeline-item {
    margin-bottom: 2.4rem;
    display: flex;
    align-items: center;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }
.timeline-item:nth-child(10) { animation-delay: 1.0s; }
.timeline-item:nth-child(11) { animation-delay: 1.1s; }

/* Odd items align left, even align right */
.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

/* ==================== TIMELINE MARKER ==================== */

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    background: white;
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 5px rgba(12,100,125, 0.1);
}

.timeline-item.hidden .timeline-marker {
    opacity: 0.4;
}

.timeline-marker i {
    font-size: 1.05rem;
    color: var(--gold);
}

/* ==================== PROGRAM CARD ==================== */

.program-card {
    background: white;
    border-radius: 12px;
    padding: 1.35rem 1.4rem;
    margin: 0 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--gold);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 290px;
    min-height: 250px;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.program-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

.program-card:hover::before {
    opacity: 1;
}

.program-card.hidden {
    opacity: 0.3;
    pointer-events: none;
}

/* Level badge */
.level-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    background: rgba(12,100,125, 0.1);
    color: var(--gold);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.program-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.65rem 0 0.85rem;
    color: var(--primary-color);
    line-height: 1.35;
}

.program-duration {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.86rem;
    color: #6B818A;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.program-duration i {
    color: var(--gold);
}

.program-category {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    background: #F1F6F8;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #5E7982;
    margin-top: 1rem;
    line-height: 1.35;
}

/* Program prerequisites indicator */
.program-prereq {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6B818A;
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid #DDE7EA;
    line-height: 1.65;
}

.program-prereq i {
    color: #0C7089;
    font-size: 0.9rem;
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(12,100,125, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(12,100,125, 0);
    }
}

/* ==================== MODAL STYLES ==================== */

.modal-header {
    border-bottom: 2px solid #F1F6F8;
    background: linear-gradient(135deg, rgba(12,100,125, 0.05), rgba(12,112,137, 0.05));
}

.modal-header .modal-title {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.modal-body {
    padding: 1.7rem;
}

.program-detail-section {
    margin-bottom: 1.5rem;
}

.program-detail-section h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.program-detail-section h5 i {
    color: var(--gold);
    font-size: 1.25rem;
}

.program-detail-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.program-detail-section li {
    margin-bottom: 0.5rem;
    color: #4A6069;
    line-height: 1.6;
}

/* Syarat & Ketentuan: daftar bernomor dengan lingkaran (selaras dengan modal program di beranda) */
.program-detail-section .req-list {
    list-style: none;
    margin-left: 0;
    counter-reset: reqnum;
}

.program-detail-section .req-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    counter-increment: reqnum;
}

.program-detail-section .req-list li::before {
    content: counter(reqnum);
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    margin-top: 1px;
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: #F1F6F8;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.detail-meta-item {
    display: flex;
    flex-direction: column;
}

.detail-meta-item strong {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.detail-meta-item span {
    color: #6B818A;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 992px) {
    .timeline-line {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
        margin-left: 60px;
    }

    .timeline-marker {
        left: 20px;
        transform: translateX(-50%);
    }

    .program-card {
        margin: 0;
        max-width: 100%;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
    }

    .filter-btn i {
        display: none;
    }
}

@media (max-width: 768px) {
    .timeline-container {
        padding: 1rem 0;
    }

    .timeline-line {
        left: 15px;
    }

    .timeline-item {
        margin-bottom: 2rem;
        margin-left: 50px;
    }

    .timeline-marker {
        left: 15px;
        width: 26px;
        height: 26px;
        border-width: 3px;
    }

    .timeline-marker i {
        font-size: 0.9rem;
    }

    .program-card {
        padding: 1.05rem;
        border-left-width: 4px;
        max-width: 100%;
    }

    .program-card h3 {
        font-size: 1rem;
    }

    .legend-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .roadmap-hero h1 {
        font-size: 1.35rem;
    }

    .timeline-line {
        left: 12px;
    }

    .timeline-item {
        margin-left: 40px;
    }

    .timeline-marker {
        left: 12px;
        width: 22px;
        height: 22px;
        border-width: 2px;
    }

    .timeline-marker i {
        font-size: 0.75rem;
    }

    .program-card {
        padding: 0.9rem;
        margin: 0;
    }

    .program-card h3 {
        font-size: 0.95rem;
    }

    .level-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* ==================== UTILITY CLASSES ==================== */

.hidden {
    display: none !important;
}

.fade-out {
    opacity: 0.3;
}

.text-gold {
    color: var(--gold) !important;
}

.text-blue {
    color: var(--blue) !important;
}

.text-purple {
    color: var(--purple) !important;
}
