/* assets/css/style.css - Red, Black & Clean White Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-surface: #f1f5f9;
    --accent-red: #dc2626;
    --accent-red-hover: #b91c1c;
    --accent-black: #0f172a;
    --accent-black-hover: #000000;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-subtle: #cbd5e1;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-hover: 0 12px 30px -4px rgba(220, 38, 38, 0.15), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

/* Clean White Cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.glass-card:hover {
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: var(--shadow-hover);
}

/* Navbar */
.navbar-lms {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--accent-black) !important;
}

.navbar-brand span {
    color: var(--accent-red);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-red);
}

.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
}

.navbar-dark .nav-link:hover {
    color: #ffffff !important;
}

.navbar-dark .nav-link.active {
    color: #ef4444 !important;
    font-weight: 700;
}

/* Primary Red Button */
.btn-primary {
    background-color: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
    color: #ffffff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-red-hover) !important;
    border-color: var(--accent-red-hover) !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
}
.btn-outline-primary:hover {
    background-color: var(--accent-red) !important;
    color: #ffffff !important;
}

/* Secondary Black Button */
.btn-dark, .btn-black {
    background-color: var(--accent-black) !important;
    border-color: var(--accent-black) !important;
    color: #ffffff !important;
}
.btn-dark:hover, .btn-black:hover {
    background-color: var(--accent-black-hover) !important;
    border-color: var(--accent-black-hover) !important;
    color: #ffffff !important;
}

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 50%, #fef2f2 100%);
    border-bottom: 1px solid #fee2e2;
}

/* Course Cards */
.course-card-img {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.badge-category {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.badge-bundle {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

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

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

/* Progress bar */
.progress-lms {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.progress-lms .progress-bar {
    background: linear-gradient(90deg, var(--accent-red), #f87171);
    border-radius: 4px;
}

/* Lesson Player Layout */
.player-container {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.player-sidebar {
    width: 340px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.player-sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.player-sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.player-main {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    padding: 2rem;
}

.lesson-item {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.lesson-item:hover {
    background: #f8fafc;
    color: var(--accent-red);
}

.lesson-item.active {
    background: #fef2f2;
    color: var(--accent-red);
    border-left: 4px solid var(--accent-red);
    font-weight: 600;
}

.lesson-item.completed .lesson-check {
    color: #16a34a;
}

/* Custom Player Overrides - Conceal YouTube Watermarks & Title Bar */
.custom-player-wrapper {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.plyr--video .plyr__controls {
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(15, 23, 42, 0.95)) !important;
}

.plyr--full-ui input[type=range] {
    color: var(--accent-red) !important;
}

.plyr__control--overlaid {
    background: var(--accent-red) !important;
}

.plyr__control:hover {
    background: var(--accent-red) !important;
}

/* Crop YouTube Header Title and Watermarks */
.plyr__video-embed iframe {
    top: -65px !important;
    height: calc(100% + 120px) !important;
}

.custom-player-watermark {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.custom-player-watermark span {
    color: var(--accent-red);
}

/* Quiz UI */
.quiz-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.quiz-option-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.quiz-option-label:hover {
    border-color: var(--accent-red);
    background: #fef2f2;
}

.quiz-option-input:checked + .quiz-option-label {
    border-color: var(--accent-red);
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-muted);
}

/* ==========================================================================
   Icon Circles & Rounded Button Fixes (Prevents Oval Distortion)
   ========================================================================== */

/* Universal rounded-circle rule enforcing 1:1 aspect ratio */
.rounded-circle {
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover;
    flex-shrink: 0;
}

/* Icon circle utility containers */
.icon-circle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3rem !important;
    height: 3rem !important;
    min-width: 3rem !important;
    min-height: 3rem !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.icon-circle-sm {
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    min-height: 2.25rem !important;
}

.icon-circle-lg {
    width: 3.5rem !important;
    height: 3.5rem !important;
    min-width: 3.5rem !important;
    min-height: 3.5rem !important;
}

/* Circular Buttons (.btn.rounded-circle) */
.btn.rounded-circle,
.btn-circle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    min-height: 2.25rem !important;
    padding: 0 !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.btn-sm.rounded-circle,
.btn-circle-sm {
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    min-height: 2rem !important;
    padding: 0 !important;
}

.btn-lg.rounded-circle,
.btn-circle-lg {
    width: 2.75rem !important;
    height: 2.75rem !important;
    min-width: 2.75rem !important;
    min-height: 2.75rem !important;
    padding: 0 !important;
}

/* Avatar Containers */
.avatar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    object-fit: cover;
}

/* Bootstrap Icon vertical alignment & aspect locking */
i.bi, .bi {
    display: inline-block;
    line-height: 1;
    flex-shrink: 0;
}

/* Custom Nav Pills - Active tab styling (Black background & White font) */
.custom-pills .nav-link,
.nav-pills .nav-link {
    color: #4b5563;
    background-color: transparent;
    transition: all 0.2s ease-in-out;
}

.custom-pills .nav-link:hover,
.nav-pills .nav-link:hover {
    color: #111827;
    background-color: #f3f4f6;
}

.custom-pills .nav-link.active,
.nav-pills .nav-link.active {
    background-color: #000000 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-pills .nav-link.active i,
.nav-pills .nav-link.active i {
    color: #ffffff !important;
}

/* Theme Red Utility Classes */
.bg-red {
    background-color: var(--accent-red) !important;
}

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

/* Footer High Contrast Typography */
footer.bg-black,
.site-footer {
    background-color: #0b0f19 !important;
    color: #e2e8f0 !important;
}

.footer-text {
    color: #cbd5e1 !important;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-link {
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-link:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Responsive Mobile Lesson Player Styles */
@media (max-width: 991.98px) {
    .player-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .player-sidebar {
        display: none !important;
    }

    .player-main {
        padding: 1.25rem 1rem;
        overflow-y: visible;
    }

    .custom-player-wrapper {
        border-radius: 0.5rem;
    }

    .mobile-syllabus-offcanvas {
        max-width: 85% !important;
        width: 340px !important;
    }

    .lesson-item {
        padding: 1rem 1.25rem;
    }
}

/* Blog Card Utilities */
.blog-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 16px;
    overflow: hidden;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}
.blog-card-img {
    height: 210px;
    object-fit: cover;
    width: 100%;
}

