/*
 * EduLearn Academy - Main Stylesheet
 * Modern, engaging educational platform styling
 */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #6366F1;
    --secondary-color: #F59E0B;
    --accent-color: #10B981;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.875rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* ===== Navigation ===== */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(79, 70, 229, 0.1);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(79, 70, 229, 0.1);
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1029;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

/* ===== Buttons ===== */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Course Cards */
.course-card {
    height: 100%;
    transition: var(--transition);
}

.course-card .card-img-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.course-card .card-img-top {
    transition: var(--transition);
    height: 200px;
    object-fit: cover;
}

.course-card:hover .card-img-top {
    transform: scale(1.05);
}

.course-card .course-level {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.course-card .course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.course-card .course-duration {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

/* First blue section on non-index pages should match hero animation
   and have enough top spacing below the fixed navbar. */
body > section.section.bg-primary.text-white:first-of-type {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
    position: relative;
    overflow: hidden;
    padding-top: calc(5rem + 72px);
}

body > section.section.bg-primary.text-white:first-of-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

body > section.section.bg-primary.text-white:first-of-type > .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.hero-section p {
    color: rgba(255, 255, 255, 0.85);
}

.hero-stats p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-subject-card {
    background-color: rgba(79, 70, 229, 0.08);
}

.hero-subject-card i,
.hero-subject-card p {
    color: var(--primary-color);
}

.hero-subject-math {
    background-color: rgba(59, 130, 246, 0.12);
}

.hero-subject-math i,
.hero-subject-math p {
    color: #2563eb !important;
}

.hero-subject-physics {
    background-color: rgba(16, 185, 129, 0.14);
}

.hero-subject-physics i,
.hero-subject-physics p {
    color: #047857;
}

.hero-subject-biology {
    background-color: rgba(239, 68, 68, 0.14);
}

.hero-subject-biology i,
.hero-subject-biology p {
    color: #b91c1c;
}

.hero-subject-english {
    background-color: rgba(245, 158, 11, 0.12);
}

.hero-subject-english i,
.hero-subject-english p {
    color: #d97706 !important;
}

/* ===== Section Styling ===== */
.section {
    padding: 5rem 0;
}

/* Keep text readable on primary sections across all pages */
.section.bg-primary p,
.section.bg-primary .lead,
.section.bg-primary .breadcrumb-item,
.section.bg-primary .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.88) !important;
}

.section.bg-primary h1,
.section.bg-primary h2,
.section.bg-primary h3,
.section.bg-primary h4,
.section.bg-primary h5,
.section.bg-primary h6 {
    color: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    margin-bottom: 1rem;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Feature Cards ===== */
.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-xl);
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ===== Testimonials ===== */
.testimonial-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 0.9rem;
    left: 18px;
    font-size: 4rem;
    color: var(--primary-color);
    font-weight: bold;
    line-height: 1;
    z-index: 0;
}

.testimonial-content {
    margin-bottom: 1.5rem;
    font-style: italic;
    color: var(--text-secondary);
    padding-top: 0.8rem;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.testimonial-info small {
    color: var(--text-light);
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
}

.badge-success {
    background-color: #10B981;
    color: white;
}

.badge-warning {
    background-color: #F59E0B;
    color: white;
}

.badge-danger {
    background-color: #EF4444;
    color: white;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-description {
    color: #D1D5DB;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #D1D5DB;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #D1D5DB;
}

.contact-icon {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.newsletter-form {
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form .input-group {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.newsletter-form .form-control {
    border: none;
    padding: 0.75rem 1rem;
}

.newsletter-form .btn {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 0.75rem 1.5rem;
}

.copyright {
    background-color: #111827;
    border-top: 1px solid #374151;
}

.footer-bottom-links a {
    color: #D1D5DB;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: white;
}

/* ===== Back to Top Button ===== */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ===== Responsive Design ===== */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        margin: 0.5rem 0;
    }
    
    .navbar .d-flex {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 6rem 0 3rem;
        text-align: center;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
    
    .footer-section {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    #backToTop {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ===== Utility Classes ===== */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.rounded-custom {
    border-radius: var(--radius-xl);
}

.border-custom {
    border: 1px solid var(--border-color);
}

/* ===== Loading States ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Form Styling ===== */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ===== Accordion ===== */
.accordion-button {
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-light);
    border: none;
    border-radius: var(--radius-md);
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.accordion-item {
    border: none;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.accordion-body {
    background-color: var(--bg-white);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ===== Role dashboards (admin = strict, teacher = warm, student = playful) ===== */
.dashboard-body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, sans-serif;
}

.dash-theme-admin {
    --dash-bg: #f1f5f9;
    --dash-accent: #0f172a;
    --dash-border: #cbd5e1;
    background: var(--dash-bg);
    color: #0f172a;
}

.dash-theme-teacher {
    --dash-bg: #f1f5f9;
    --dash-accent: #0f172a;
    background: var(--dash-bg);
    color: #1f2937;
}

.dash-theme-student {
    --dash-bg: linear-gradient(165deg, #fdf4ff 0%, #eef2ff 40%, #fffbeb 100%);
    background: var(--dash-bg);
    color: #1f2937;
}

.dashboard-topbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.dash-theme-admin .dashboard-topbar {
    background: #0f172a;
    border-bottom-color: #1e293b;
}
.dash-theme-admin .dashboard-topbar .navbar-brand,
.dash-theme-admin .dashboard-topbar .nav-link {
    color: #e2e8f0 !important;
}
.dash-theme-admin .dashboard-topbar .nav-link:hover {
    color: #fff !important;
}
.dash-theme-admin .dashboard-topbar .dropdown-menu {
    background: #fff;
}

.dash-theme-student .dashboard-topbar {
    background: #0f172a;
    border-bottom-color: #1e293b;
}
.dash-theme-student .dashboard-topbar .navbar-brand,
.dash-theme-student .dashboard-topbar .nav-link {
    color: #e2e8f0 !important;
}
.dash-theme-student .dashboard-topbar .nav-link:hover {
    color: #fff !important;
}
.dash-theme-student .dashboard-topbar .dropdown-menu {
    background: #fff;
}

.dash-theme-teacher .dashboard-topbar {
    background: #0f172a;
    border-bottom-color: #1e293b;
}
.dash-theme-teacher .dashboard-topbar .navbar-brand,
.dash-theme-teacher .dashboard-topbar .nav-link {
    color: #e2e8f0 !important;
}
.dash-theme-teacher .dashboard-topbar .nav-link:hover {
    color: #fff !important;
}
.dash-theme-teacher .dashboard-topbar .dropdown-menu {
    background: #fff;
}

.dash-pill {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #94a3b8;
}
.dash-theme-admin .dash-pill {
    border-color: #334155;
    color: #94a3b8;
}

.brand-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary-color);
}
.dash-theme-admin .brand-icon {
    background: #1e293b;
    color: #f8fafc;
}

.avatar-mini {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dash-card-admin {
    border-color: var(--dash-border) !important;
    border-radius: 0.25rem;
}

.dash-stat-admin {
    border-radius: 0.35rem;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.dash-highlight-teacher {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-radius: 1rem;
}

.dash-card-teacher {
    border-radius: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: #fff;
}

.dash-title-teacher {
    color: #047857;
}

.dash-hero-student {
    background: linear-gradient(120deg, #0f172a 0%, #134e4a 50%, #065f46 100%);
    color: #ffffff;
    box-shadow: 0 12px 40px rgba(91, 33, 182, 0.35);
}

/* Hero lives on a gradient — override body text color for WCAG contrast */
.dash-hero-student .dash-hero-kicker {
    color: rgba(255, 255, 255, 0.92) !important;
    letter-spacing: 0.14em;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
}

.dash-hero-student .dash-hero-heading {
    color: #ffffff !important;
    text-shadow: 0 2px 16px rgba(15, 23, 42, 0.35);
}

.dash-hero-student .dash-hero-lead {
    color: rgba(255, 255, 255, 0.96) !important;
    font-weight: 500;
    max-width: 36rem;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}

.dash-title-student {
    font-family: 'Fredoka', 'Inter', sans-serif;
}

/* Section titles outside the hero keep brand purple (not white) */
.dash-card-student .dash-title-student:not(.dash-hero-heading) {
    color: #5b21b6;
}

.dash-pill-card {
    border-radius: 1.25rem;
    background: #fff;
}

.dash-emoji {
    font-size: 1.75rem;
}

.dash-card-student {
    border-radius: 1.5rem;
}

.dash-btn-student {
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border: none;
    color: #fff;
    font-weight: 600;
}
.dash-btn-student:hover {
    filter: brightness(1.05);
    color: #fff;
}

.dash-progress-student .progress-bar {
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
}

.dash-enroll-card {
    border-color: rgba(99, 102, 241, 0.35) !important;
    background: rgba(255, 255, 255, 0.9);
}

.account-type-option input {
    vertical-align: middle;
}

/* ===== App shell: sidebar + main (admin & teacher) ===== */
.dash-app-row {
    min-height: calc(100vh - 56px);
}

@media (min-width: 992px) {
    .dash-app-row {
        min-height: calc(100vh - 72px);
    }
}

.dash-sidebar-col {
    flex: 0 0 auto;
}

@media (min-width: 992px) {
    .dash-sidebar-col {
        width: 268px;
    }
}

.dash-main-panel {
    background: #f8fafc;
    min-width: 0;
}

.dash-theme-teacher .dash-main-panel {
    background: #f1f5f9;
}


.dash-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.dash-sidebar-admin {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 992px) {
    .dash-sidebar-admin {
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.dash-sidebar-teacher {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 992px) {
    .dash-sidebar-teacher {
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.dash-sidebar-brand-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.dash-sidebar-brand-icon--teacher {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.dash-sidebar-nav .dash-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    color: rgba(248, 250, 252, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.dash-sidebar-teacher .dash-sidebar-nav .dash-sidebar-link {
    color: #cbd5e1;
}

.dash-sidebar-admin .dash-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dash-sidebar-teacher .dash-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dash-sidebar-admin .dash-sidebar-link.active {
    background: rgba(99, 102, 241, 0.35);
    color: #fff;
    box-shadow: inset 3px 0 0 #818cf8;
}

.dash-sidebar-teacher .dash-sidebar-link.active {
    background: rgba(99, 102, 241, 0.35);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #818cf8;
}

.dash-sidebar-link-muted {
    opacity: 0.85;
    font-weight: 400 !important;
}

.dash-sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.dash-sidebar-teacher .dash-sidebar-divider {
    background: rgba(255, 255, 255, 0.08);
}

/* ── Student sidebar ────────────────────────────────────────────────────── */
.dash-sidebar-student {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 992px) {
    .dash-sidebar-student {
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.dash-sidebar-student .dash-sidebar-nav .dash-sidebar-link {
    color: #cbd5e1;
}

.dash-sidebar-student .dash-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dash-sidebar-student .dash-sidebar-link.active {
    background: rgba(16, 185, 129, 0.3);
    color: #fff;
    box-shadow: inset 3px 0 0 #34d399;
}

.dash-sidebar-student .dash-sidebar-brand-icon {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.dash-sidebar-section {
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}

.dash-sidebar-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    display: inline-block;
}

.dash-sidebar-hint {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.dash-stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.dash-overview-hero-admin {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}

.dash-quick-card {
    border-radius: 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.dash-mobile-nav-btn {
    position: sticky;
    top: 0;
    z-index: 1020;
}
/* ===== Course lifecycle / dashboard additions ===== */

/* Dashed border for placeholder cards */
.border-dashed { border: 2px dashed #dee2e6 !important; }

/* Thumbnail upload preview */
#thumbPreview, #acThumbPreview { transition: opacity 0.2s; }

/* Object-fit cover for table images */
.object-fit-cover { object-fit: cover; }

/* Course card image height consistency */
.card-img-container .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Admin course table hover */
#coursesTable tbody tr:hover { background-color: rgba(79,70,229,.04); }

/* Sticky enrollment card cleanup */
.enrollment-card .card { border: none; }

/* Course hero image */
.course-image-container img {
    max-height: 320px;
    object-fit: cover;
    width: 100%;
}

/* Sidebar badge alignment */
.dash-sidebar-link .badge {
    font-size: .7em;
    margin-left: auto;
}

/* Admin table header */
.table-dark th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* My-courses filter pill */
#courseFilter .nav-link {
    cursor: pointer;
    border: 1px solid transparent;
    padding: .35rem .75rem;
}
#courseFilter .nav-link:not(.active):hover { border-color: #dee2e6; }
#courseFilter .nav-link.active {
    background-color: #4F46E5;
    color: #fff;
}

/* Visibility inline select in admin table */
#coursesTable select.form-select-sm {
    font-size: .8rem;
    padding: .2rem .5rem;
}

/* Dashed placeholder background */
.border-dashed.card { background: rgba(79,70,229,.02); }

/* Course action button icon alignment */

/* =====================================================================
   Profile page
   ===================================================================== */

/* 96-px avatar ring */
.profile-avatar-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--primary-color, #4F46E5);
    overflow: hidden;
}

/* Camera overlay button – bottom-right of the avatar wrapper */
.profile-avatar-edit {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* Stat card left-accent strip */
.profile-stat-card {
    border-left-style: solid !important;
    border-left-width: 4px !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

/* 48-px coloured icon box inside stat cards */
.profile-stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 56-px circle for achievement badge icons */
.profile-badge-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Locked achievement badge */
.profile-badge-locked {
    filter: grayscale(1);
    opacity: 0.45;
}

/* =====================================================================
   Student dashboard – improved course cards
   ===================================================================== */

.dash-course-card {
    border-radius: 1rem;
    transition: transform .15s ease, box-shadow .15s ease;
}

.dash-course-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}

.dash-course-card .card-img-top {
    height: 140px;
    object-fit: cover;
    width: 100%;
}

/* =====================================================================
   Student dashboard – improved stat cards
   ===================================================================== */

.dash-stat-student {
    border-radius: 0.875rem;
    background: #fff;
    border: none;
}
.btn-sm i { vertical-align: -.125em; }
