/* ========================================================================
   MEDPREPONLINE - COURSE DETAIL PAGE - VIBRANT & RESPONSIVE CSS
   ======================================================================== */

/* ===== CSS VARIABLES - THEME COLORS ===== */
:root {
    /* Primary Gradient & Colors */
    --primary-gradient: linear-gradient(135deg, #4fb3d9 0%, #5dbea3 100%);
    --primary-gradient-reverse: linear-gradient(135deg, #5dbea3 0%, #4fb3d9 100%);
    --primary-color: #4fb3d9;
    --primary-dark: #3a92b3;
    --secondary-color: #5dbea3;
    --secondary-dark: #4a9d8a;
    --accent-color: #2e8b8b;

    /* Text Colors */
    --text-dark: #2c3e50;
    --text-medium: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --text-lighter: #cbd5e1;

    /* Background Colors */
    --bg-primary: #f8fffe;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --white: #ffffff;

    /* Status Colors */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --error-color: #ef4444;
    --error-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(79, 179, 217, 0.08);
    --shadow-sm: 0 2px 8px rgba(79, 179, 217, 0.1);
    --shadow-md: 0 4px 16px rgba(79, 179, 217, 0.12);
    --shadow-lg: 0 10px 40px rgba(79, 179, 217, 0.15);
    --shadow-xl: 0 20px 60px rgba(79, 179, 217, 0.2);
    --shadow-hover: 0 8px 32px rgba(79, 179, 217, 0.2);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
}

/* ===== GLOBAL RESETS & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-dark);
    background: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ===== BREADCRUMB NAVIGATION ===== */
.breadcrumb-section {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--bg-tertiary);
    padding: 1rem 0;
    margin-bottom: 0;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--text-medium);
    font-size: 0.875rem;
    font-weight: 500;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
    padding: 0 0.5rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-light);
}

/* Responsive breadcrumb */
@media (max-width: 575px) {
    .breadcrumb-section {
        padding: 0.75rem 0;
    }

    .breadcrumb-item {
        font-size: 0.8rem;
    }

    .breadcrumb-item+.breadcrumb-item::before {
        padding: 0 0.35rem;
    }
}


.rating-stars {
    color: #fbbf24;
    font-size: 1.1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.rating-stars .fa-star {
    margin-right: 2px;
    animation: starPulse 2s ease-in-out infinite;
}

.rating-stars .fa-star:nth-child(1) {
    animation-delay: 0s;
}

.rating-stars .fa-star:nth-child(2) {
    animation-delay: 0.1s;
}

.rating-stars .fa-star:nth-child(3) {
    animation-delay: 0.2s;
}

.rating-stars .fa-star:nth-child(4) {
    animation-delay: 0.3s;
}

.rating-stars .fa-star:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes starPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* ===== COURSE TAGS ===== */
.course-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    margin: 0.25rem;
    transition: var(--transition-bounce);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.course-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
    text-decoration: none;
}

/* ===== MAIN CONTENT AREA ===== */
.container.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

/* Mobile Content Section Header */
@media (max-width: 991px) {

    /* Add visual header for content section on mobile */
    .col-lg-8::before {
        content: '📚 Course Details';
        display: block;
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 3px solid transparent;
        border-image: var(--primary-gradient) 1;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .col-lg-8::before {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
}

/* ===== LEFT COLUMN - COURSE CONTENT ===== */
.col-lg-8 h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.col-lg-8 h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

.col-lg-8 .content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-medium);
}

/* Learning Objectives */
.col-lg-8 .fa-check {
    color: var(--success-color);
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.col-lg-8 section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 1px solid rgba(79, 179, 217, 0.08);
}

.col-lg-8 section:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ===== COURSE SIDEBAR ===== */
.course-sidebar {
    position: sticky;
    top: 2rem;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== ENROLLMENT CARD ===== */
.course-sidebar .card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(79, 179, 217, 0.1);
    transition: var(--transition-base);
    background: var(--white);
}

.course-sidebar .card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: rgba(79, 179, 217, 0.3);
}

/* Course Image Preview */
.course-player-preview {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    height: 220px;
}

.course-player-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.course-player-preview:hover img {
    transform: scale(1.1);
}

.player-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.course-player-preview:hover .player-preview-overlay {
    opacity: 1;
}

.player-preview-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: var(--primary-color);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.player-preview-btn:hover {
    transform: scale(1.15);
    background: var(--white);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.player-preview-btn i {
    margin-left: 4px;
}

/* ===== PRICE DISPLAY ===== */
.card-body h3 {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.card-body h3.text-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-body h3 small {
    font-size: 1.2rem;
    color: var(--text-muted) !important;
    -webkit-text-fill-color: var(--text-muted) !important;
}

/* ===== ENROLLMENT STATUS ===== */
.alert-success {
    background: linear-gradient(135deg, var(--success-light) 0%, #a7f3d0 100%);
    border: 2px solid var(--success-color);
    color: #065f46;
    border-radius: var(--radius-lg);
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* ===== PROGRESS PREVIEW ===== */
.course-progress-preview {
    background: linear-gradient(135deg, rgba(79, 179, 217, 0.08) 0%, rgba(93, 190, 163, 0.08) 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(79, 179, 217, 0.2);
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.progress-stat {
    text-align: center;
}

.progress-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.progress {
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(79, 179, 217, 0.15);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    transition: width 0.6s ease;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ===== ACTION BUTTONS ===== */
.btn {
    border-radius: var(--radius-lg);
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-base);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-player-primary {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(79, 179, 217, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-player-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 179, 217, 0.5);
    background: var(--primary-gradient-reverse);
    color: var(--white);
}

.btn-outline-danger {
    border-color: var(--error-color);
    color: var(--error-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--error-color);
    border-color: var(--error-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-outline-secondary {
    border-color: var(--text-lighter);
    color: var(--text-medium);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--text-medium);
    border-color: var(--text-medium);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
    color: var(--white);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

/* ===== COURSE INCLUDES LIST ===== */
.card-body ul.list-unstyled li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(79, 179, 217, 0.1);
    font-size: 0.95rem;
    color: var(--text-medium);
    transition: var(--transition-fast);
}

.card-body ul.list-unstyled li:last-child {
    border-bottom: none;
}

.card-body ul.list-unstyled li:hover {
    padding-left: 0.5rem;
    color: var(--primary-color);
}

.card-body ul.list-unstyled li i {
    width: 24px;
    font-size: 1rem;
}

/* ===== INSTRUCTORS SECTION ===== */
.card-body h6 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.rounded-circle {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition-base);
}

.rounded-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 179, 217, 0.3);
}

/* ===== CONTACT COMPACT CARD ===== */
.contact-compact {
    background: linear-gradient(135deg, rgba(79, 179, 217, 0.05) 0%, rgba(93, 190, 163, 0.05) 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.contact-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

/* Mobile-specific contact card styling */
@media (max-width: 991px) {
    .contact-compact {
        margin-top: 1.5rem;
        box-shadow: var(--shadow-md);
        border: 1px solid rgba(79, 179, 217, 0.2);
    }
}

@media (max-width: 575px) {
    .contact-compact {
        box-shadow: var(--shadow-lg);
        border: 2px solid rgba(79, 179, 217, 0.3);
    }

    .contact-compact::before {
        height: 4px;
    }

    /* Pulse animation for contact card on mobile */
    .contact-compact-header h6 {
        animation: subtle-pulse 3s ease-in-out infinite;
    }

    @keyframes subtle-pulse {

        0%,
        100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.02);
        }
    }
}

.contact-compact-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(79, 179, 217, 0.15);
}

.contact-compact-header h6 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.contact-compact-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.contact-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-compact-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--white);
    transition: var(--transition-bounce);
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.contact-compact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
}

.contact-compact-item:hover::before {
    left: 100%;
}

.contact-compact-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: var(--white);
}

.contact-compact-item.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.contact-compact-item.phone {
    background: var(--primary-gradient);
}

.contact-compact-item.email {
    grid-column: 1 / -1;
    background: var(--primary-gradient-reverse);
}

.contact-compact-item i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.contact-compact-info {
    flex: 1;
    min-width: 0;
}

.contact-compact-label {
    font-weight: 700;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-compact-value {
    font-size: 0.7rem;
    opacity: 0.95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-compact-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(79, 179, 217, 0.15);
}

.contact-compact-footer small {
    color: var(--text-light);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

/* ===== CURRICULUM SECTION ===== */
.course-content-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    position: relative;
}

.course-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(79, 179, 217, 0.3),
            transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.section-header .section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ===== CURRICULUM CONTAINER ===== */
.course-curriculum {
    max-width: 100%;
}

/* ===== CURRICULUM SECTION CARDS ===== */
.curriculum-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: var(--transition-base);
}

.curriculum-section:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 179, 217, 0.2);
    transform: translateY(-2px);
}

.curriculum-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    background: linear-gradient(135deg,
            rgba(79, 179, 217, 0.05) 0%,
            rgba(93, 190, 163, 0.05) 100%);
    border-bottom: 3px solid transparent;
    border-image: var(--primary-gradient) 1;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
}

.curriculum-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.curriculum-section-header:hover::before {
    transform: scaleY(1);
}

.curriculum-section-header:hover {
    background: linear-gradient(135deg,
            rgba(79, 179, 217, 0.1) 0%,
            rgba(93, 190, 163, 0.1) 100%);
}

.section-header-content {
    flex: 1;
}

.section-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f4b66;
    background: var(--primary-gradient);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(79, 179, 217, 0.3);
}

.curriculum-section-header .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.section-description {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.section-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-weight: 500;
}

.section-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-meta i {
    color: var(--primary-color);
}

.section-toggle-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.section-toggle-btn:hover {
    background: var(--primary-gradient);
    color: var(--white);
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(79, 179, 217, 0.4);
}

.curriculum-section.collapsed .section-toggle-btn i {
    transform: rotate(-90deg);
}

.section-toggle-btn i {
    transition: transform 0.3s ease;
}

/* ===== CURRICULUM CONTENT ===== */
.curriculum-section-content {
    padding: 1rem;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease;
}

.curriculum-section.collapsed .curriculum-section-content {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

/* ===== CURRICULUM ITEMS ===== */
.curriculum-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    transition: var(--transition-base);
    border: 2px solid transparent;
    background: rgba(79, 179, 217, 0.02);
}

.curriculum-item:hover {
    background: rgba(79, 179, 217, 0.08);
    border-color: rgba(79, 179, 217, 0.2);
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
}

.curriculum-item.preview-available {
    cursor: pointer;
    background: linear-gradient(135deg,
            rgba(79, 179, 217, 0.05) 0%,
            rgba(93, 190, 163, 0.05) 100%);
}

.curriculum-item.preview-available:hover {
    background: linear-gradient(135deg,
            rgba(79, 179, 217, 0.12) 0%,
            rgba(93, 190, 163, 0.12) 100%);
}

.curriculum-item-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            rgba(79, 179, 217, 0.15) 0%,
            rgba(93, 190, 163, 0.15) 100%);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: var(--transition-bounce);
}

.curriculum-item:hover .curriculum-item-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(79, 179, 217, 0.3);
}

.curriculum-item-icon i {
    font-size: 1.5rem;
}

.curriculum-item-content {
    flex: 1;
    min-width: 0;
}

.item-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.preview-btn {
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition-bounce);
}

.preview-btn:hover {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 179, 217, 0.4);
}

.item-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.item-meta i {
    color: var(--primary-color);
}

/* ===== CONTENT TYPE BADGES ===== */
.content-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.content-type-video {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.content-type-text {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.content-type-quiz {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.content-type-pdf {
    background: rgba(147, 51, 234, 0.15);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.3);
}

/* ===== MODALS ===== */
.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    padding: 1.5rem 2rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.5rem;
}

.btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

/* Video Modal */
.video-modal .modal-dialog {
    max-width: 95vw;
    margin: 1.75rem auto;
}

.video-modal .modal-content {
    background: #000;
}

.video-modal .modal-header {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-modal .modal-body {
    padding: 0;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== TOAST NOTIFICATIONS ===== */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 420px;
}

.toast-notification {
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktops */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Tablets - Landscape */
@media (max-width: 1199px) {

    .section-header .section-title {
        font-size: 2rem;
    }
}

/* Tablets - Portrait - REORDER LAYOUT */
@media (max-width: 991px) {


    /* Make row a flex container and reorder columns */
    .container.my-5>.row {
        display: flex;
        flex-direction: column;
    }

    /* Content appears first on mobile */
    .col-lg-8 {
        order: 1;
        margin-bottom: 2rem;
    }

    /* Sidebar appears second on mobile */
    .col-lg-4 {
        order: 2;
    }

    .course-sidebar {
        position: static;
        margin-top: 0;
    }

    .curriculum-section-header {
        padding: 1.5rem;
    }

    .curriculum-item {
        padding: 1.25rem;
    }
}


/* Mobile - Landscape */
@media (max-width: 767px) {



    /* Add visual separator after content section on mobile */
    .col-lg-8 {
        margin-bottom: 3rem;
        position: relative;
    }

    .col-lg-8::after {
        content: '';
        position: absolute;
        bottom: -1.5rem;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg,
                transparent,
                var(--primary-color),
                transparent);
        opacity: 0.3;
    }

    .col-lg-8 section {
        padding: 1.5rem;
    }

    .col-lg-8 h2 {
        font-size: 1.75rem;
    }

    .section-header .section-title {
        font-size: 1.75rem;
    }

    .curriculum-section-header .section-title {
        font-size: 1.25rem;
    }

    .curriculum-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-compact-grid {
        grid-template-columns: 1fr;
    }

    .contact-compact-item.email {
        grid-column: 1;
    }
}

/* Mobile - Portrait */
@media (max-width: 575px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
    }



    /* Enhanced sidebar on mobile - add attention-grabbing effect */
    .course-sidebar .card {
        box-shadow: var(--shadow-xl);
        border: 2px solid var(--primary-color);
        position: relative;
        overflow: visible;
    }

    /* Add "Enroll Now" badge on mobile */
    .course-sidebar .card::before {
        content: '⭐ Course Enrollment';
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--primary-gradient);
        color: var(--white);
        padding: 0.375rem 1rem;
        border-radius: var(--radius-full);
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 12px rgba(79, 179, 217, 0.4);
        white-space: nowrap;
    }

    .card-body h3 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Make primary CTA more prominent on mobile */
    .btn-player-primary {
        font-size: 1.05rem;
        padding: 1rem 1.5rem;
        box-shadow: 0 6px 20px rgba(79, 179, 217, 0.5);
    }

    .curriculum-item {
        flex-direction: column;
        padding: 1rem;
    }

    .item-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .preview-btn {
        align-self: flex-end;
    }

    #toastContainer {
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.btn:focus,
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Print Styles */
@media print {

    .course-sidebar,
    .contact-compact,
    .btn,


}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gradient-reverse);
}

/* ===== UTILITY CLASSES ===== */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* =========================================================
   MOBILE ORDER FIX:
   1) Enrollment card
   2) About/Left content
   3) Need Help (last)
   ========================================================= */
@media (max-width: 991px) {

    /* Ensure the row stacks vertically */
    .container.my-5>.row {
        display: flex;
        flex-direction: column;
    }

    /* Flatten the right column and sidebar wrapper on mobile
     so the cards become reorderable flex items */
    .container.my-5>.row>.col-lg-4 {
        display: contents;
    }

    .course-sidebar {
        display: contents;
        position: static;
        /* neutralize sticky behavior on mobile */
        top: auto;
    }

    /* 2) Left column content (About / Curriculum etc.) */
    .container.my-5>.row>.col-lg-8 {
        order: 2;
    }

    /* 1) Enrollment card FIRST */
    .course-sidebar>.card.bg-white {
        order: 1;
        margin-bottom: 1.5rem;
    }

    /* 3) Need Help card LAST */
    .course-sidebar>.card.mt-3 {
        order: 3;
        margin-top: 1.5rem;
    }
}