/* ============================================
   EFC Moodle Sitewide Theme
   Eki Foundation College
   Color Scheme: Deep Blue
   ============================================ */

/* ==========================================
   1. CSS VARIABLES & GLOBAL BASE
   ========================================== */
:root {
    --efc-primary: #1e3a5f;
    --efc-primary-light: #2563eb;
    --efc-primary-dark: #0f172a;
    --efc-accent: #3b82f6;
    --efc-hover: #1d4ed8;
    --efc-bg-light: #f0f4f8;
    --efc-white: #ffffff;
    --efc-text: #1e293b;
    --efc-text-light: #64748b;
    --efc-border: #e2e8f0;
    --efc-success: #059669;
    --efc-warning: #d97706;
    --efc-danger: #dc2626;
    --efc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --efc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --efc-radius: 12px;
    --efc-radius-sm: 8px;
    --efc-transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
    color: var(--efc-text);
    background-color: var(--efc-bg-light);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   2. GLOBAL NAVBAR (ALL PAGES)
   ========================================== */
.navbar {
    background-color: var(--efc-primary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 1rem;
    min-height: 60px;
}

.navbar .navbar-brand {
    color: var(--efc-white) !important;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: var(--efc-transition);
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--efc-white) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .usermenu .login a,
.navbar .langmenu .btn {
    color: var(--efc-white) !important;
}

.navbar .langmenu .btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .divider {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar-toggler-icon {
    filter: invert(1);
}

.navbar .usermenu .dropdown-toggle {
    color: var(--efc-white) !important;
}

.navbar .popover-region .nav-link,
.navbar .popover-region-toggle {
    color: var(--efc-white) !important;
}

/* ==========================================
   3. GLOBAL LINKS & BUTTONS
   ========================================== */
a {
    color: var(--efc-primary-light);
    transition: var(--efc-transition);
}

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

.btn-primary {
    background-color: var(--efc-primary-light) !important;
    border-color: var(--efc-primary-light) !important;
    border-radius: var(--efc-radius-sm);
    font-weight: 600;
    transition: var(--efc-transition);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--efc-hover) !important;
    border-color: var(--efc-hover) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--efc-white) !important;
    border-color: var(--efc-border) !important;
    color: var(--efc-text) !important;
    border-radius: var(--efc-radius-sm);
    font-weight: 500;
    transition: var(--efc-transition);
}

.btn-secondary:hover {
    background-color: var(--efc-bg-light) !important;
    border-color: var(--efc-primary-light) !important;
    color: var(--efc-primary-light) !important;
}

.btn-outline-secondary {
    border-color: var(--efc-border) !important;
    color: var(--efc-text) !important;
    border-radius: var(--efc-radius-sm);
}

.btn-outline-secondary:hover {
    background-color: var(--efc-bg-light) !important;
    border-color: var(--efc-primary-light) !important;
    color: var(--efc-primary-light) !important;
}

/* ==========================================
   4. GLOBAL CARDS & BLOCKS
   ========================================== */
.card {
    border: 1px solid var(--efc-border);
    border-radius: var(--efc-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: var(--efc-transition);
}

.card:hover {
    box-shadow: var(--efc-shadow);
}

.card-title,
.card-title a {
    color: var(--efc-text) !important;
    font-weight: 600;
}

.block .card {
    border-radius: var(--efc-radius);
    overflow: hidden;
}

.block .card-body .card-title {
    color: var(--efc-primary) !important;
    font-weight: 700;
}

/* ==========================================
   5. GLOBAL DRAWER / SIDEBAR
   ========================================== */
.drawer {
    background-color: var(--efc-white);
    border-right: 1px solid var(--efc-border);
}

.drawer .list-group-item {
    border: none;
    border-radius: var(--efc-radius-sm);
    margin: 2px 8px;
    padding: 10px 16px;
    font-weight: 500;
    transition: var(--efc-transition);
    color: var(--efc-text);
}

.drawer .list-group-item:hover {
    background-color: var(--efc-bg-light);
    color: var(--efc-primary-light);
}

.drawer .list-group-item.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--efc-primary-light);
    font-weight: 600;
}

/* ==========================================
   6. BREADCRUMBS
   ========================================== */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
}

.breadcrumb-item a {
    color: var(--efc-primary-light);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--efc-hover);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--efc-text-light);
}

/* ==========================================
   7. LOGIN PAGE
   ========================================== */
#page-login-index {
    background: linear-gradient(135deg, var(--efc-primary-dark) 0%, var(--efc-primary) 60%, var(--efc-primary-light) 100%) !important;
    min-height: 100vh;
}

#page-login-index .navbar {
    background-color: transparent !important;
    box-shadow: none;
}

#page-login-index .login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
}

#page-login-index .login-container {
    background: var(--efc-white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
}

#page-login-index .login-heading {
    color: var(--efc-primary);
    font-weight: 700;
    font-size: 1.6rem;
    text-align: center;
}

#page-login-index .login-form .form-control {
    border: 2px solid var(--efc-border);
    border-radius: var(--efc-radius-sm);
    padding: 12px 16px;
    font-size: 1rem;
    transition: var(--efc-transition);
}

#page-login-index .login-form .form-control:focus {
    border-color: var(--efc-primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#page-login-index .login-form .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1.05rem;
    border-radius: var(--efc-radius-sm);
}

#page-login-index .login-form .btn-secondary {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

#page-login-index .login-divider {
    border-color: var(--efc-border);
    margin: 24px 0;
}

#page-login-index .login-form-forgotpassword a {
    color: var(--efc-primary-light);
    font-size: 0.9rem;
}

#page-login-index #guestlogin,
#page-login-index #guestlogin ~ .login-divider,
#page-login-index .login-divider + .login-heading,
#page-login-index .login-heading + #guestlogin {
    display: none;
}

#page-login-index .login-container .login-divider {
    display: none;
}

#page-login-index #page-footer {
    display: none;
}

/* ==========================================
   8. DASHBOARD PAGE
   ========================================== */
#page-my-index {
    background-color: var(--efc-bg-light);
}

#page-my-index .page-header-headings h1 {
    color: var(--efc-primary);
    font-weight: 700;
    font-size: 1.8rem;
}

#page-my-index .card {
    border: 1px solid var(--efc-border);
    border-radius: var(--efc-radius);
    transition: var(--efc-transition);
}

#page-my-index .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--efc-shadow);
    border-color: var(--efc-accent);
}

#page-my-index .block .card-title {
    color: var(--efc-primary);
    font-weight: 700;
}

#page-my-index .block_recentlyaccesseditems .card {
    border-radius: var(--efc-radius-sm);
}

#page-my-index .block_recentlyaccesseditems .card:hover {
    border-color: var(--efc-primary-light);
}

.block-myoverview .course-info-container {
    border-radius: var(--efc-radius-sm);
}

.block-myoverview .coursename a {
    color: var(--efc-text) !important;
    font-weight: 600;
}

.block-myoverview .coursename a:hover {
    color: var(--efc-primary-light) !important;
}

.block_timeline .list-group-item {
    border-color: var(--efc-border);
    border-radius: var(--efc-radius-sm);
    margin-bottom: 4px;
}

/* ==========================================
   8b. RIGHT DRAWER SIDEBAR (Dashboard)
   ========================================== */
.drawer.drawer-right {
    background: var(--efc-white);
    border-left: 1px solid var(--efc-border);
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.05);
}

.drawer-right-toggle {
    background: var(--efc-primary) !important;
    color: var(--efc-white) !important;
    border-radius: 8px 0 0 8px;
    border: none;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: var(--efc-transition);
}

.drawer-right-toggle:hover {
    background: var(--efc-primary-light) !important;
}

.drawer-right-toggle .icon {
    color: var(--efc-white) !important;
}

.drawer.drawer-right .drawerheader {
    background: linear-gradient(135deg, var(--efc-primary), var(--efc-primary-light));
    padding: 16px;
    border-bottom: none;
}

.drawer.drawer-right .drawerheader .drawertoggle {
    color: var(--efc-white) !important;
}

.drawer.drawer-right .drawerheader .drawertoggle .icon {
    color: var(--efc-white) !important;
}

.drawer.drawer-right .block {
    border: none !important;
    border-radius: var(--efc-radius) !important;
    margin: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    background: var(--efc-white);
}

.drawer.drawer-right .block .card {
    border: none;
    box-shadow: none;
}

.drawer.drawer-right .block .card-body {
    padding: 16px;
}

.drawer.drawer-right .block .card-title {
    color: var(--efc-primary) !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--efc-bg-light);
    margin-bottom: 12px;
}

/* ==========================================
   8c. EFC SCHEDULER PLUGIN
   ========================================== */
.path-local-efcscheduler {
    background-color: var(--efc-bg-light);
}

.path-local-efcscheduler .page-header-headings h1 {
    color: var(--efc-primary);
    font-weight: 700;
}

.path-local-efcscheduler .btn-primary {
    background-color: var(--efc-primary-light) !important;
    border-color: var(--efc-primary-light) !important;
    border-radius: var(--efc-radius-sm);
    font-weight: 600;
}

.path-local-efcscheduler .btn-primary:hover {
    background-color: var(--efc-hover) !important;
    border-color: var(--efc-hover) !important;
}

.path-local-efcscheduler .table-responsive {
    background: var(--efc-white);
    border-radius: var(--efc-radius);
    box-shadow: var(--efc-shadow);
    overflow: hidden;
    border: 1px solid var(--efc-border);
}

.path-local-efcscheduler .table .thead-dark th,
.path-local-efcscheduler .table thead th {
    background-color: var(--efc-primary) !important;
    color: var(--efc-white) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    font-weight: 600;
    padding: 14px 16px;
    font-size: 0.9rem;
}

/* ==========================================
   9. FORMS & INPUTS (GLOBAL)
   ========================================== */
.form-control {
    border: 1px solid var(--efc-border);
    border-radius: var(--efc-radius-sm);
    transition: var(--efc-transition);
}

.form-control:focus {
    border-color: var(--efc-primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

/* ==========================================
   10. ALERTS & NOTIFICATIONS
   ========================================== */
.alert-success {
    background-color: rgba(5, 150, 105, 0.1);
    border-color: var(--efc-success);
    color: var(--efc-success);
    border-radius: var(--efc-radius-sm);
}

.alert-warning {
    background-color: rgba(217, 119, 6, 0.1);
    border-color: var(--efc-warning);
    color: var(--efc-warning);
    border-radius: var(--efc-radius-sm);
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.1);
    border-color: var(--efc-danger);
    color: var(--efc-danger);
    border-radius: var(--efc-radius-sm);
}

/* ==========================================
   11. FOOTER
   ========================================== */
#page-footer .footer-content-debugging,
#page-footer .footer-popover,
#page-footer .logininfo,
#page-footer .homelink,
#page-footer p {
    display: none !important;
}

#page-footer {
    background-color: var(--efc-primary-dark) !important;
    color: rgba(255, 255, 255, 0.55);
    padding: 0 !important;
    margin-top: 40px;
    font-size: 0.82rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.efc-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    flex-wrap: wrap;
    gap: 8px;
}

.efc-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.efc-footer-logo {
    display: none !important;
}

.efc-footer-name {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.efc-footer-copy {
    color: rgba(255, 255, 255, 0.45);
}

/* ==========================================
   12. RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    #page-login-index .login-container {
        padding: 32px 24px;
        margin: 16px;
    }

    .efc-footer-bar {
        flex-direction: column;
        align-items: center;
        padding: 16px;
        text-align: center;
    }
}
