/* Updated custom CSS for LMS learning portal with Bongo Academy style */

/* Featured Courses Heading */
.featured-courses-heading {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* Featured Course Card */
.featured-course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background-color: #fff;
}

.featured-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Course Image Container */
.course-image-container {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.course-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-course-card:hover .course-thumbnail {
    transform: scale(1.05);
}

/* FIXED: Instructor avatar styles */
.instructor-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto 15px;
    border-radius: 50%;
}

/* Course price styling */
.course-original-price {
    text-decoration: line-through;
    color: #777;
    margin-left: 8px;
    font-size: 0.85em;
}

.course-current-price {
    font-weight: bold;
    color: #333;
}

/* Course price container on listing page */
.course-price-container {
    display: flex;
    align-items: center;
}

/* Price tag in course details */
.price-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* LEARNING PORTAL STYLES - BONGO STYLE */

/* Main container for the learning portal */
.learning-portal-container {
    display: flex;
    height: calc(100vh - 56px);
    overflow: hidden;
    position: relative;
}

/* Course Content Header */
.course-content-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    background-color: #fff;
}

.course-content-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.course-stats {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

/* Expand/Collapse button styling */
#expand-all-sections {
    color: #0d6efd;
    background: #fff;
    border: 1px solid #0d6efd;
    border-radius: 4px;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

#expand-all-sections:hover {
    background-color: #0d6efd;
    color: white;
}

/* Sidebar styling */
.course-sidebar {
    width: 400px;
    overflow-y: auto;
    border-right: 1px solid #e5e5e5;
    background-color: #fff;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    z-index: 200;
}

/* Content area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
    height: 100%;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.content-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading indicator */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    visibility: visible;
    opacity: 1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e9ecef;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Module and Lesson styling - Bongo Style */
.modules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-row {
    border-bottom: 1px solid #eee;
}

.module-header {
    padding: 15px 20px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.module-header:hover {
    background-color: #f8f9fa;
}

/* Module toggle styling - Bongo Style */
.module-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 15px;
    font-weight: bold;
    color: #0d6efd;
    font-size: 18px;
}

.module-title {
    flex: 1;
    font-weight: 500;
    font-size: 16px;
    color: #333;
}

.module-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #6c757d;
    font-size: 14px;
}

/* Module content display - Fixed */
.module-content {
    display: none;
    background-color: #f9f9f9;
}

.module-content.show {
    display: block;
}

/* Class item styling */
.class-item {
    border-bottom: 1px solid #f5f5f5;
}

.class-item:last-child {
    border-bottom: none;
}

.class-link {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 60px;
    color: #333;
    text-decoration: none;
    position: relative;
    transition: background-color 0.2s;
}

.class-link:hover {
    background-color: #f0f0f0;
    color: #0d6efd;
    text-decoration: none;
}

.class-link.active {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.class-status {
    position: absolute;
    left: 30px;
    font-size: 16px;
    color: #6c757d;
}

.class-status .completed {
    color: #28a745;
}

.class-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.class-title {
    font-size: 14px;
    margin-right: 10px;
    flex: 1;
}

.class-duration {
    font-size: 14px;
    color: #6c757d;
    white-space: nowrap;
}

/* Empty module display */
.empty-module {
    padding: 15px 20px 15px 60px;
    color: #6c757d;
    font-style: italic;
}

/* Course progress footer */
.course-progress-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-label {
    font-weight: 500;
    color: #333;
}

.progress-value {
    font-weight: 600;
    color: #28a745;
}

.progress-details {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #6c757d;
}

/* Progress bar styling */
.progress {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #e9ecef;
    margin-bottom: 8px;
}

.progress-bar {
    background-color: #28a745;
    height: 100%;
}

/* Sidebar toggle button for mobile */
.toggle-sidebar {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 150;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* FIXED: Instructor Introduction Section */
.card .instructor-introduction {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .card .instructor-introduction {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .instructor-avatar-container {
        width: 25%;
        padding-right: 15px;
    }
    
    .instructor-details {
        width: 75%;
    }
}

/* FIXED: Video Title Container - Always ensure it's displayed */
.video-title-container {
    width: calc(100% - 40px) !important;
    max-width: 900px !important;
    margin: 20px auto 0 !important;
    padding: 10px 15px !important;
    background-color: #fff !important;
    border: 2px solid #ff0000 !important;
    border-radius: 8px 8px 0 0 !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: bold !important;
    color: #333 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    display: block !important;
    visibility: visible !important;
    z-index: 5 !important;
}

/* FIXED: Professional video container with uniform spacing */
.video-container-wrapper {
    width: calc(100% - 40px) !important;
    max-width: 900px !important;
    margin: 0 auto 20px !important;
    padding: 20px !important;
    overflow: hidden !important;
    background-color: #ffffff !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    display: block !important;
    visibility: visible !important;
    z-index: 4 !important;
}

/* FIXED: Fixed size container for video - with !important */
.fixed-size-container {
    position: relative !important;
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
    height: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    background-color: #000 !important;
    display: block !important;
    visibility: visible !important;
    z-index: 3 !important;
}

/* FIXED: Force iframe and video elements to maintain proper size */
.fixed-size-container iframe,
.fixed-size-container video,
.video-player-fixed,
iframe.adilo-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 8px !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
    visibility: visible !important;
    z-index: 2 !important;
}

/* FIXED: Completion button */
.completion-button-container {
    text-align: center !important;
    margin: 20px auto !important;
    max-width: 900px !important;
    padding: 15px !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    display: block !important;
    visibility: visible !important;
    z-index: 5 !important;
}

/* FIXED: Hide any "View Full Video" or fullscreen buttons */
.view-full-screen-btn,
a[href*="full-screen"],
a[href*="fullscreen"],
button:contains("Full Screen"),
.fullscreen-button,
.view-full-video-btn,
a:contains("View Full Video") {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .course-sidebar {
        width: 350px;
    }
    .video-title-container,
    .video-container-wrapper,
    .completion-button-container {
        max-width: 800px !important;
    }
}

@media (max-width: 768px) {
    .course-sidebar {
        position: absolute;
        left: -350px;
        z-index: 200;
        height: 100%;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    .course-sidebar.show {
        left: 0;
    }
    
    .content-area {
        width: 100%;
    }
    
    .toggle-sidebar {
        display: flex;
    }
    
    .module-header {
        padding: 12px 15px;
    }
    
    .class-link {
        padding: 10px 15px 10px 45px;
    }
    
    .class-status {
        left: 15px;
    }
    
    .video-title-container,
    .video-container-wrapper {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 10px auto !important;
    }
    
    .video-title-container {
        margin-bottom: 0 !important;
        font-size: 18px !important;
    }
    
    .video-container-wrapper {
        margin-top: 0 !important;
        padding: 15px !important;
    }
    
    .completion-button-container {
        margin: 15px auto !important;
        max-width: calc(100% - 20px) !important;
    }
}

@media (max-width: 480px) {
    .video-title-container,
    .video-container-wrapper {
        width: calc(100% - 10px) !important;
        max-width: calc(100% - 10px) !important;
        margin: 5px auto !important;
    }
    
    .video-title-container {
        margin-bottom: 0 !important;
        font-size: 16px !important;
        padding: 8px 10px !important;
    }
    
    .video-container-wrapper {
        margin-top: 0 !important;
        padding: 10px !important;
    }
    
    .completion-button-container {
        margin: 10px auto !important;
        max-width: calc(100% - 10px) !important;
    }
}

@media (min-width: 769px) {
    .toggle-sidebar {
        display: none;
    }
}

/* Overrides for container-fluid */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* Only hide footer in learning portal view */
.learning-portal-container footer {
    display: none;
}

/* Make sure navbar doesn't have bottom margin */
.navbar {
    margin-bottom: 0;
}

/* Course modules styling - FIXED */
.course-modules {
    border-top: 1px solid #f0f0f0;
}

.module-row {
    border-bottom: 1px solid #f0f0f0;
}

.module-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.2s;
}

.module-header:hover {
    background-color: #f5f5f5;
}

.module-toggle {
    margin-right: 15px;
    color: #0d6efd;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.module-title {
    flex: 1;
    font-weight: 500;
    font-size: 16px;
    color: #333;
}

.module-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #6c757d;
    font-size: 14px;
}

.module-duration {
    font-weight: 500;
}

.module-content {
    display: none;
    background-color: #fff;
}

.module-content.show {
    display: block;
}

.class-item {
    border-bottom: 1px solid #f5f5f5;
}

.class-item:last-child {
    border-bottom: none;
}

.class-row {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 60px;
    position: relative;
}

.class-status {
    position: absolute;
    left: 30px;
    font-size: 16px;
}

.class-title {
    flex: 1;
    font-size: 14px;
    color: #0d6efd;
    margin-right: 10px;
}

.class-duration {
    font-size: 14px;
    color: #6c757d;
    margin-right: 15px;
}

.view-btn {
    padding: 2px 8px;
}

.no-content {
    padding: 15px 20px 15px 60px;
    color: #6c757d;
    font-style: italic;
}

/* STICKY FOOTER LAYOUT */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

/* COMPACT FOOTER STYLES */
.footer-section {
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6;
    padding: 12px 0;
    margin-top: auto;
    flex-shrink: 0;
}

/* BACK TO TOP BUTTON */
#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#btn-back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#btn-back-to-top i {
    font-size: 16px;
    line-height: 1;
}

/* INSTRUCTOR BENEFITS SECTION */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.benefit-item {
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 8px;
}

.benefit-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateX(5px);
}

.benefit-icon {
    flex-shrink: 0;
}

.benefit-content h6 {
    line-height: 1.4;
}

.benefit-content p {
    line-height: 1.5;
}

/* Section header gradient line */
.section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    margin: 0 auto;
}

/* Call to action styling */
.cta-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
}

.cta-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

/* Professional card styling */
.benefits-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.benefits-card .card-body {
    padding: 2rem;
}

/* Icon containers */
.icon-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .benefit-item:hover {
        transform: none;
    }
    
    .hover-lift:hover {
        transform: none;
    }
    
    .benefits-card .card-body {
        padding: 1.5rem;
    }
}

.footer-section .social-links a {
    color: #6c757d;
    font-size: 16px;
    transition: color 0.2s ease;
}

.footer-section .social-links a:hover {
    color: #0d6efd;
    text-decoration: none;
}

.footer-section .text-muted {
    color: #6c757d !important;
}

.footer-section a.text-muted:hover {
    color: #0d6efd !important;
    text-decoration: none;
}

/* Responsive footer adjustments */
@media (max-width: 768px) {
    .footer-section {
        padding: 15px 0;
    }
    
    .footer-section .row > div {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .footer-section .d-flex {
        justify-content: center !important;
    }
    
    .footer-section .justify-content-md-end {
        justify-content: center !important;
    }
}

/* General styles */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary-color: #6c757d;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --black: #000000;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sticky footer setup */
.main-content {
    flex: 1 0 auto;
}

.footer-section {
    flex-shrink: 0;
}

/* Logo styling */
.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar-brand svg {
    transition: transform 0.3s ease;
}

.navbar-brand:hover svg {
    transform: scale(1.1);
}

.navbar-brand .d-flex {
    align-items: center;
}

.navbar-brand span {
    margin-left: 10px;
    font-weight: 700;
    font-size: 24px;
    color: white;
    letter-spacing: 0.5px;
}

/* Navigation */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--white);
}

/* Cards styling */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Course and book cards */
.course-card, .book-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card .card-body, .book-card .card-body {
    flex: 1 0 auto;
}

.course-img-top, .book-img-top {
    height: 180px;
    object-fit: cover;
}

/* Price styling */
.price-tag {
    font-weight: bold;
    color: var(--primary-color);
}

.original-price {
    text-decoration: line-through;
    color: var(--secondary-color);
    font-size: 0.9em;
}

/* Buttons */
.btn {
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Back to top button */
#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 99;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    line-height: 36px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form styling */
.form-control, .form-select {
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Hero section */
.hero-section {
    padding: 5rem 0;
    background-position: center;
    background-size: cover;
    color: var(--white);
    position: relative;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Footer styling */
.footer-section {
    padding-bottom: 3rem;
}

.footer-section a {
    transition: color 0.2s ease;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-brand svg {
        width: 35px;
        height: 40px;
    }
    
    .navbar-brand span {
        font-size: 20px;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .navbar-brand svg {
        width: 30px;
        height: 35px;
    }
    
    .navbar-brand span {
        font-size: 18px;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .navbar-brand span {
        font-size: 16px;
    }
}
/* Social media sharing buttons */
.social-share-buttons {
    display: flex;
    align-items: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.share-text {
    margin-right: 10px;
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
}

.share-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    margin-right: 8px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.facebook-share {
    background-color: #3b5998;
}

.twitter-share {
    background-color: #1da1f2;
}

.linkedin-share {
    background-color: #0077b5;
}

.whatsapp-share {
    background-color: #25D366;
}

.email-share {
    background-color: #848484;
}