/* ============================================
   LEARNING ROADMAP STYLES - ENHANCED TAB VERSION
   ============================================ */

/* --- Nút bấm kích hoạt --- */
.roadmap-trigger-container {
    text-align: center;
    margin: 30px 0;
}

.roadmap-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    border-radius: 50px;
    border: 2px solid transparent;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background-color: #00bcd4;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.4);
}

.roadmap-trigger-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 188, 212, 0.5);
}

body.dark-theme .roadmap-trigger-btn {
    background-color: #00ff9d;
    color: #1e1e1e;
    box-shadow: 0 8px 25px rgba(0, 255, 157, 0.35);
}
body.dark-theme .roadmap-trigger-btn:hover {
    box-shadow: 0 12px 35px rgba(0, 255, 157, 0.45);
}

/* --- Khung Lộ trình chính --- */
#roadmap-main-container {
    max-width: 950px;
    margin: 40px auto;
    background-color: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    /* Hiệu ứng ẩn/hiện */
    max-height: 0;
    opacity: 0;
    transition: max-height 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.6s ease-in-out, margin 0.6s ease;
    border: 1px solid #e0f7fa;
}

#roadmap-main-container.visible {
    max-height: 2000px;
    opacity: 1;
    margin: 50px auto;
    padding-bottom: 20px; /* Thêm chút padding dưới */
}

body.dark-theme #roadmap-main-container {
    background-color: #1e293b;
    border-color: #26a69a;
}

.roadmap-header {
    padding: 30px 25px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.1), rgba(0, 255, 157, 0.1));
    border-bottom: 1px solid #b2ebf2;
}
body.dark-theme .roadmap-header {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.15), rgba(0, 188, 212, 0.15));
    border-bottom-color: #4db6ac;
}

.roadmap-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
body.dark-theme .roadmap-header h2 {
    color: #00ff9d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.roadmap-subtitle {
    font-size: 1.2rem;
    color: #546e7a;
    font-style: italic;
}
body.dark-theme .roadmap-subtitle {
    color: #b0bec5;
}

/* --- Thanh điều hướng Tab --- */
.roadmap-tab-nav {
    display: flex;
    background-color: #e0f7fa;
    padding: 10px;
    border-radius: 16px;
    margin: 20px;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.2);
}
body.dark-theme .roadmap-tab-nav {
    background-color: #26a69a;
    box-shadow: 0 4px 15px rgba(0, 255, 157, 0.2);
}

.roadmap-tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background-color: transparent;
    color: #37474f;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}
body.dark-theme .roadmap-tab-btn {
    color: #cfd8dc;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.roadmap-tab-btn.active {
    background-color: #00bcd4;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.5);
}
body.dark-theme .roadmap-tab-btn.active {
    background-color: #00ff9d;
    color: #1e1e1e;
    box-shadow: 0 6px 20px rgba(0, 255, 157, 0.4);
}

.roadmap-tab-btn:not(.active):hover {
    background-color: #b2ebf2;
    transform: translateY(-2px);
}
body.dark-theme .roadmap-tab-btn:not(.active):hover {
    background-color: #4db6ac;
}

/* --- Khung nội dung Tab --- */
.roadmap-tab-content {
    padding: 30px 25px;
}

.roadmap-tab-panel {
    display: none;
    animation: fadeInUp 0.6s ease;
    border-left: 3px solid #00bcd4;
    padding-left: 20px;
    margin-bottom: 20px;
}
body.dark-theme .roadmap-tab-panel {
    border-left-color: #00ff9d;
}

.roadmap-tab-panel.active {
    display: block;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.roadmap-tab-panel p {
    color: #546e7a;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 15px;
}
body.dark-theme .roadmap-tab-panel p {
    color: #b0bec5;
}

.roadmap-goals {
    margin: 25px 0;
    text-align: left;
}
.roadmap-goals strong {
    font-weight: 700;
    color: var(--text-dark);
    display: block;
    margin-bottom: 10px;
}
body.dark-theme .roadmap-goals strong {
    color: var(--text-light);
}

.roadmap-goals ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 10px;
}
.roadmap-goals li {
    margin-bottom: 10px;
    color: #455a64;
    position: relative;
}
body.dark-theme .roadmap-goals li {
    color: #cfd8dc;
}
.roadmap-goals li i.fas {
    color: #4caf50;
    margin-right: 10px;
    position: absolute;
    left: -20px;
    top: 2px;
}

.roadmap-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border: none;
    background-color: #00bcd4;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
}
.roadmap-filter-btn:hover {
    background-color: #0097a7;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.5);
}
body.dark-theme .roadmap-filter-btn {
    background-color: #00ff9d;
    color: #1e1e1e;
    box-shadow: 0 4px 15px rgba(0, 255, 157, 0.3);
}
body.dark-theme .roadmap-filter-btn:hover {
    background-color: #00e68a;
    box-shadow: 0 6px 20px rgba(0, 255, 157, 0.4);
}
.roadmap-filter-btn i.fas {
    font-size: 1.1rem;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .roadmap-tab-nav {
        flex-direction: column;
        margin: 15px;
        border-radius: 16px;
        box-shadow: none;
        background-color: transparent;
    }
    .roadmap-tab-btn {
        margin-bottom: 10px;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    }
    .roadmap-header h2 {
        font-size: 2rem;
    }
    .roadmap-subtitle {
        font-size: 1rem;
    }
    .roadmap-tab-content {
        padding: 20px;
    }
    .roadmap-tab-panel {
        padding-left: 15px;
        border-left-width: 2px;
    }
    .roadmap-filter-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

/* =================================
   LAYOUT FOR HORIZONTAL CENTERING
   ================================= */

.horizontal-center-wrapper {
    display: flex; /* Kích hoạt Flexbox để xếp các mục con theo hàng */
    justify-content: center; /* Căn giữa các mục con theo chiều ngang */
    align-items: center; /* Căn thẳng hàng các mục con theo chiều dọc */
    flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
    gap: 20%; /* Tạo khoảng cách 30px giữa hai khối */
    margin: 30px 0; /* Tạo khoảng cách trên và dưới cho cả cụm */
}

/* Điều chỉnh lại margin của các khối con để chúng không tự căn giữa nữa */
.roadmap-trigger-container,
.gift-code-container {
    margin: 0; /* Reset margin để Flexbox toàn quyền kiểm soát */
}

/* --- Responsive cho màn hình di động --- */
@media screen and (max-width: 900px) {
    .horizontal-center-wrapper {
        flex-direction: column; /* Xếp theo chiều dọc trên màn hình nhỏ */
        gap: 20px; /* Giảm khoảng cách khi xếp dọc */
    }
}