/* BAS Virtual Academy - Main Stylesheet (Restored & Upgraded) */

/* ===== GLOBAL VARIABLES ===== */
:root {
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
    --accent-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --card-border-radius: 0.75rem;
    --btn-border-radius: 0.5rem;
    --box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    --box-shadow-hover: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.5;
    --border-radius: 0.375rem;
    --border-width: 1px;
    --border-color: #e3e6f0;
}

/* ===== BASE STYLES ===== */
body {
    font-family: var(--font-family);
    color: var(--dark-color);
    background-color: var(--light-color);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* ===== COMPATIBILITY SHIMS ===== */
.no-gutters {
    margin-right: 0;
    margin-left: 0;
}
.no-gutters > .col,
.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: var(--btn-border-radius);
    transition: var(--transition);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: var(--border-width) solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.btn:active {
    transform: translateY(0);
}

/* ===== CARDS ===== */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid #e3e6f0;
    border-radius: var(--card-border-radius);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card-header {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    border-top-left-radius: calc(var(--card-border-radius) - 1px);
    border-top-right-radius: calc(var(--card-border-radius) - 1px);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    background-color: #f8f9fc;
    border-top: 1px solid #e3e6f0;
    border-bottom-left-radius: calc(var(--card-border-radius) - 1px);
    border-bottom-right-radius: calc(var(--card-border-radius) - 1px);
}

/* ===== TABLES ===== */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #858796;
    vertical-align: middle;
}
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table td, .table th {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #e3e6f0;
}

/* ===== BADGES ===== */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.5rem;
}

/* ===== FORMS ===== */
.form-control, .form-select {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6e707e;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control:focus, .form-select:focus {
    color: #6e707e;
    background-color: #fff;
    border-color: #bac8f3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}
.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* ===== DARK THEME ===== */
body[data-theme="dark"] {
    --border-color: #2a3045;
    background-color: #1a1e2e;
    color: #e4e6ef;
}
body[data-theme="dark"] .card {
    background-color: #ffffff;
    color: #1f2937; /* Force dark text on white card */
    border-color: var(--border-color);
}
body[data-theme="dark"] .card-header,
body[data-theme="dark"] .card-footer {
    background-color: #f8f9fc; /* Keep consistent with light mode card headers */
    color: #1f2937;
    border-color: #eaecf4;
}
/* Ensure specific text utilities don't override card text color in dark mode */
body[data-theme="dark"] .card .text-gray-800,
body[data-theme="dark"] .card .h5,
body[data-theme="dark"] .card h1, body[data-theme="dark"] .card h2, 
body[data-theme="dark"] .card h3, body[data-theme="dark"] .card h4, 
body[data-theme="dark"] .card h5, body[data-theme="dark"] .card h6 {
    color: #5a5c69 !important;
}

/* Dark mode overrides for other elements */
body[data-theme="dark"] .bg-light {
    background-color: #12162b !important;
}

body[data-theme="dark"] .text-muted {
    color: #aeb0b7 !important;
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select {
    background-color: #1a1e2e;
    border-color: #2a3045;
    color: #e4e6ef;
}
body[data-theme="dark"] .form-control:focus {
    background-color: #12162b;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section h1, 
.hero-section p,
.hero-section .text-muted {
    color: white !important;
}

/* ===== FEATURE & TESTIMONIAL BOXES ===== */
.feature-box,
.testimonial-card {
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
}

.feature-box:hover,
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover) !important;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(78, 115, 223, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

/* Dark theme overrides for boxes */
body[data-theme="dark"] .feature-box,
body[data-theme="dark"] .testimonial-card {
    background-color: #ffffff !important;
    color: #1f2937 !important;
}

body[data-theme="dark"] .feature-box h4,
body[data-theme="dark"] .testimonial-card h5,
body[data-theme="dark"] .testimonial-card p:not(.text-muted) {
    color: #1f2937 !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px !important;
        z-index: 1040;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.toggled {
        transform: translateX(0);
        display: block !important;
    }
    .topbar .navbar-search {
        width: 100%;
    }
}

/* ===== UTILITIES ===== */
.border-left-primary { border-left: 0.25rem solid var(--primary-color) !important; }
.border-left-secondary { border-left: 0.25rem solid var(--secondary-color) !important; }
.border-left-success { border-left: 0.25rem solid var(--success-color) !important; }
.border-left-info { border-left: 0.25rem solid var(--info-color) !important; }
.border-left-warning { border-left: 0.25rem solid var(--warning-color) !important; }
.border-left-danger { border-left: 0.25rem solid var(--danger-color) !important; }
