/* Course Detail Page - Fixed Icon Alignment */

/* Main Container */
.course-detail-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #F6FDFF 0%, #ffffff 100%);
    position: relative;
}

.course-detail-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(135deg, rgba(23, 155, 215, 0.03) 0%, rgba(255, 165, 0, 0.02) 100%);
    pointer-events: none;
    z-index: 0;
}

.course-detail-section .container-xl {
    display: flex;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

/* Left Sidebar - Course Navigation */
.course-navigation-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #1C1C1C;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.course-nav-card {
    background: transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-nav-header {
    background: linear-gradient(135deg, #179BD7 0%, #147bbd 100%);
    color: #fff;
    padding: 32px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.course-nav-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    50% { transform: translate(20px, 20px) scale(1.1); opacity: 0.5; }
}

.course-nav-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #FFA500, transparent);
    border-radius: 2px;
}

.course-nav-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    z-index: 1;
}

.course-nav-list {
    padding: 25px 0;
    flex: 1;
    overflow-y: auto;
}

.course-nav-item {
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: relative;
}

.course-nav-item:last-child {
    border-bottom: none;
}

.course-nav-item a {
    color: #C8D0D9;
    text-decoration: none;
    font-size: 0.93rem;
    display: block;
    padding: 18px 26px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    line-height: 1.6;
}

.course-nav-item a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, #FFA500, rgba(255, 165, 0, 0.5));
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-nav-item a::after {
    content: '→';
    position: absolute;
    right: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    color: #FFA500;
    font-weight: bold;
}

.course-nav-item:hover a {
    background: linear-gradient(90deg, rgba(23, 155, 215, 0.1), transparent);
    color: #fff;
    padding-left: 32px;
}

.course-nav-item:hover a::before {
    width: 5px;
}

.course-nav-item:hover a::after {
    opacity: 1;
    transform: translateX(0);
}

.course-nav-item.active a {
    background: linear-gradient(90deg, rgba(23, 155, 215, 0.15), transparent);
    color: #fff;
    font-weight: 600;
    padding-left: 32px;
}

.course-nav-item.active a::before {
    width: 5px;
    background: #FFA500;
}

.course-nav-item.active a::after {
    opacity: 1;
    transform: translateX(0);
    color: #FFA500;
}

/* Main Content Area */
.course-main-content {
    flex: 1;
    background: #fff;
    padding: 55px;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.course-main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #179BD7, #FFA500, #179BD7);
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

/* Course Header */
.course-header-section {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 2px solid #E8ECF0;
    position: relative;
}

.course-header-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, #179BD7, #FFA500);
}

.course-code-section {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.course-code-badge {
    background: linear-gradient(135deg, #179BD7 0%, #147bbd 100%);
    color: #fff;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: 0 6px 20px rgba(23, 155, 215, 0.3);
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
}

.course-code-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: shimmer-badge 3s ease-in-out infinite;
}

@keyframes shimmer-badge {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

.course-duration-badge {
    background: linear-gradient(135deg, #FFA500 0%, #ff9500 100%);
    color: #fff;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.3);
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
}

.course-duration-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: shimmer-badge 3s ease-in-out infinite;
}

.course-title {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1C1C1C 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.8px;
}

/* Course Modules Section */
.course-modules-section {
    margin-top: 50px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1C1C1C;
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 2px solid #E8ECF0;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #179BD7, #FFA500);
}

.module-grid {
    display: grid;
    gap: 28px;
}

.module-card {
    background: linear-gradient(135deg, #ffffff 0%, #F6FDFF 100%);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #E8ECF0;
    border-left: 5px solid #179BD7;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #179BD7, #FFA500);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-card:hover {
    box-shadow: 0 12px 32px rgba(23, 155, 215, 0.15);
    transform: translateY(-5px);
    border-color: #179BD7;
}

.module-card:hover::before {
    transform: scaleX(1);
}

.module-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1C1C1C;
    margin-bottom: 20px;
    position: relative;
    padding-left: 26px;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.module-card-title::before {
    content: '';
    position: absolute;
    left: 0;
    width: 12px;
    height: 12px;
    background: #FFA500;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 165, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 165, 0, 0.8); }
}

.module-topics {
    display: grid;
    gap: 12px;
}

.topic-item {
    padding: 16px 20px;
    background: #fff;
    border-radius: 10px;
    color: #7B7E86;
    font-size: 0.96rem;
    border: 1px solid #E8ECF0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding-left: 46px;
    line-height: 1.6;
    display: flex;
    align-items: center;
}

.topic-item::before {
    content: '✓';
    position: absolute;
    left: 18px;
    color: #FFA500;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic-item:hover {
    background: linear-gradient(90deg, rgba(23, 155, 215, 0.06), #fff);
    border-color: #179BD7;
    color: #179BD7;
    padding-left: 50px;
    box-shadow: 0 4px 12px rgba(23, 155, 215, 0.12);
    transform: translateX(5px);
}

/* Enrollment Card */
.course-enrollment-card {
    background: linear-gradient(135deg, #179BD7 0%, #147bbd 100%);
    color: #fff;
    padding: 50px;
    border-radius: 16px;
    margin-top: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(23, 155, 215, 0.3);
}

.course-enrollment-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -40%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: rotate-glow 15s linear infinite;
}

@keyframes rotate-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.course-enrollment-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #FFA500, transparent);
}

.course-enrollment-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.course-enrollment-card p {
    font-size: 1.1rem;
    margin-bottom: 35px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

.enrollment-actions {
    display: flex;
    gap: 18px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.enrollment-actions .btn-p {
    padding: 16px 40px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.4px;
}

.enrollment-actions .btn-blue {
    background: #fff;
    color: #179BD7;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.enrollment-actions .btn-blue:hover {
    background: #F6FDFF;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.enrollment-actions .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.enrollment-actions .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.2);
}

/* Scrollbar */
.course-nav-list::-webkit-scrollbar {
    width: 8px;
}

.course-nav-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.course-nav-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #179BD7, #FFA500);
    border-radius: 4px;
}

.course-nav-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FFA500, #179BD7);
}

/* Responsive */
@media (max-width: 992px) {
    .course-detail-section .container-xl {
        flex-direction: column;
        gap: 30px;
    }
    
    .course-navigation-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
    
    .course-main-content {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .course-detail-section {
        padding: 50px 0;
    }
    
    .course-title {
        font-size: 1.9rem;
    }
    
    .course-code-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .enrollment-actions {
        flex-direction: column;
    }
    
    .course-main-content {
        padding: 35px 25px;
    }
    
    .module-card {
        padding: 25px;
    }
    
    .course-enrollment-card {
        padding: 35px 25px;
    }
}
