/* ═══════════════════════════════════════════════════════════════════════════
   BEYOND BARISTA ACADEMY - Premium Coffee-Themed Design System
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

:root {
    /* ───────────────────────────────────────────────────────────────────────
       Coffee-Based Premium Color Palette
       ─────────────────────────────────────────────────────────────────────── */

    /* Primary Colors - Coffee Tones */
    --color-primary: #6F4E37;
    --color-primary-rgb: 111, 78, 55;
    --color-primary-hover: #5a3d2a;
    --color-primary-light: #8b6f47;
    --color-primary-extra-light: #A0826D;

    /* Accent Colors - Warm Gold/Bronze */
    --color-accent: #C67C4E;
    --color-accent-rgb: 198, 124, 78;
    --color-accent-hover: #B36B3F;
    --color-accent-gold: #D4A574;
    --color-accent-bronze: #8B6F47;

    /* Neutral Colors */
    --color-bg: #F8F7F4;
    --color-surface: #FFFFFF;
    --color-surface-hover: #FAF8F6;
    --color-text-main: #2C1810;
    --color-text-muted: #6B6B6B;
    --color-border: #E8E6E1;
    --color-dark: #1F1F1F;

    /* Semantic Colors */
    --color-success: #52B788;
    --color-warning: #FFB703;
    --color-danger: #D62828;
    --color-secondary: #A0826D;

    /* Typography */
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Shadows - Enhanced for Depth */
    --shadow-sm: 0 2px 4px rgba(44, 24, 16, 0.08);
    --shadow-md: 0 4px 12px rgba(44, 24, 16, 0.12);
    --shadow-lg: 0 8px 24px rgba(44, 24, 16, 0.16);
    --shadow-xl: 0 12px 32px rgba(44, 24, 16, 0.2);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-pill: 9999px;

    /* Navbar */
    --navbar-height: 72px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] {
    --color-bg: #1A1410;
    --color-surface: #2C1810;
    --color-surface-hover: #3d2618;
    --color-text-main: #F8F7F4;
    --color-text-muted: #B8B8B8;
    --color-border: #4a3d30;
    --color-primary: #D4A574;
    --color-primary-hover: #E29578;
    --color-primary-light: #FAEDCD;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Base resets & typography */
body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent);
}

/* Custom Buttons */
.btn-primary {
    background-color: #4C3103;
    border-color: #4C3103;
    color: #FFFFFF !important;
    font-weight: 600;
    padding: 0.625rem 1.35rem;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(76, 49, 3, 0.15);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 49, 3, 0.25);
}

.btn-accent {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #FFFFFF !important;
    font-weight: 600;
    padding: 0.625rem 1.35rem;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(226, 149, 120, 0.3);
}

.btn-outline-primary {
    color: #4C3103;
    border-color: #4C3103;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.btn-outline-primary:hover {
    background-color: #4C3103;
    border-color: #4C3103;
    color: #FFFFFF;
}

/* Cards */
.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.card:hover {
    border-color: rgba(var(--color-primary-rgb), 0.2);
}

.card-hover-elevate:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Course Card */
.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.course-card-img-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: linear-gradient(135deg, #322002 0%, #4C3103 50%, #674305 100%);
    overflow: hidden;
}

.course-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.course-card:hover .course-card-img {
    transform: scale(1.05);
}

.badge-floating {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.badge-level {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
}

/* Navigation */
.navbar-custom {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    min-height: var(--navbar-height);
    transition: all 0.3s ease;
}

.navbar-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text-main);
}

.navbar-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #4C3103, #E29578);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.2rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #1E1301 0%, #352102 50%, #4C3103 100%);
    color: #FFFFFF;
    padding: 5.5rem 0;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(226, 149, 120, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: #FFFFFF;
    margin-bottom: 1.25rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 1rem;
    background: rgba(226, 149, 120, 0.2);
    border: 1px solid rgba(226, 149, 120, 0.4);
    border-radius: var(--radius-pill);
    color: #E29578;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* Dashboard Sidebar & Layout */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
}

.dashboard-sidebar {
    width: 260px;
    background-color: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.dashboard-main {
    flex-grow: 1;
    padding: 2rem;
    background-color: var(--color-bg);
    overflow-x: hidden;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-primary);
}

.sidebar-nav-item.active {
    background-color: rgba(76, 49, 3, 0.1);
    color: #4C3103;
    font-weight: 600;
}

[data-bs-theme="dark"] .sidebar-nav-item.active {
    background-color: rgba(212, 163, 115, 0.15);
    color: #D4A373;
}

.sidebar-nav-item i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
}

/* Stat KPI Cards */
.stat-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.primary {
    background-color: rgba(76, 49, 3, 0.1);
    color: #4C3103;
}

.stat-icon.accent {
    background-color: rgba(226, 149, 120, 0.15);
    color: var(--color-accent);
}

.stat-icon.success {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--color-success);
}

.stat-icon.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

/* Classroom / Lesson View */
.classroom-container {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.classroom-player-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
    background-color: var(--color-bg);
}

.classroom-sidebar {
    width: 360px;
    background-color: var(--color-surface);
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}

.classroom-curriculum-list {
    overflow-y: auto;
    flex-grow: 1;
}

.lesson-item-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-main);
    transition: background-color 0.2s ease;
}

.lesson-item-link:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-text-main);
}

.lesson-item-link.active {
    background-color: rgba(76, 49, 3, 0.08);
    border-left: 3px solid #4C3103;
    font-weight: 600;
}

.video-container-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: #000;
    box-shadow: var(--shadow-lg);
}

.video-container-responsive iframe,
.video-container-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Certificate Styles */
.certificate-frame {
    background: #FFFDF9;
    border: 12px double #4C3103;
    border-radius: 12px;
    padding: 40px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #1E293B;
    max-width: 900px;
    margin: 0 auto;
}

.certificate-seal {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, #E29578 0%, #4C3103 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 2.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 3px solid #FFD700;
}

/* Footer */
.footer-custom {
    background-color: #1E293B;
    color: #94A3B8;
    padding: 4rem 0 2rem;
    border-top: 1px solid #334155;
}

.footer-custom a {
    color: #CBD5E1;
    transition: color 0.2s ease;
}

.footer-custom a:hover {
    color: var(--color-accent);
}

/* Responsive utilities */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.25rem;
    }
    .classroom-container {
        flex-direction: column;
        height: auto;
    }
    .classroom-sidebar {
        width: 100%;
        height: auto;
        max-height: 400px;
        border-left: none;
        border-top: 1px solid var(--color-border);
    }
    .dashboard-wrapper {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
}
