/**
 * E-Journals Stylesheet — UPDATED COLOR SCHEME
 * Navy: #0f172a | Cyan: #0ea5e9 | Purple: #8b5cf6
 */

:root {
    --ej-primary: #0ea5e9;
    --ej-primary-dark: #0284c7;
    --ej-primary-light: #f0f9ff;
    --ej-primary-hover: #38bdf8;
    --ej-primary-rgb: 14, 165, 233;

    --ej-secondary: #8b5cf6;
    --ej-secondary-dark: #7c3aed;
    --ej-secondary-light: #f5f3ff;
    --ej-secondary-hover: #a78bfa;

    --ej-navy: #0f172a;
    --ej-navy-light: #1e293b;
    --ej-navy-dark: #020617;

    --ej-accent: #f59e0b;
    --ej-accent-dark: #d97706;
    --ej-accent-light: #fffbeb;

    --ej-teal: #06b6d4;
    --ej-teal-light: #ecfeff;

    --ej-success: #10b981;
    --ej-success-light: #ecfdf5;
    --ej-warning: #f59e0b;
    --ej-warning-light: #fffbeb;
    --ej-danger: #ef4444;
    --ej-danger-light: #fef2f2;
    --ej-info: #06b6d4;
    --ej-info-light: #ecfeff;

    --ej-white: #ffffff;
    --ej-gray-50: #f8fafc;
    --ej-gray-100: #f1f5f9;
    --ej-gray-200: #e2e8f0;
    --ej-gray-300: #cbd5e1;
    --ej-gray-400: #94a3b8;
    --ej-gray-500: #64748b;
    --ej-gray-600: #475569;
    --ej-gray-700: #334155;
    --ej-gray-800: #1e293b;
    --ej-gray-900: #0f172a;
    --ej-black: #000000;

    --ej-bg-body: #ffffff;
    --ej-bg-card: #ffffff;
    --ej-bg-sidebar: #f8fafc;
    --ej-bg-input: #ffffff;
    --ej-bg-hero: #0f172a;

    --ej-text-primary: #1e293b;
    --ej-text-secondary: #475569;
    --ej-text-muted: #94a3b8;
    --ej-text-white: #ffffff;
    --ej-text-dark: #0f172a;

    --ej-border-color: #e2e8f0;
    --ej-border-light: #f1f5f9;
    --ej-border-dark: #cbd5e1;

    --ej-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --ej-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --ej-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --ej-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --ej-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
    --ej-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --ej-shadow-glow: 0 0 40px rgba(14, 165, 233, 0.2);

    --ej-radius-sm: 8px;
    --ej-radius: 12px;
    --ej-radius-lg: 16px;
    --ej-radius-xl: 20px;
    --ej-radius-full: 9999px;

    --ej-transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --ej-transition-fast: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ej-primary: #38bdf8;
        --ej-primary-dark: #0ea5e9;
        --ej-primary-light: #0c4a6e;
        --ej-primary-hover: #7dd3fc;
        --ej-secondary: #a78bfa;
        --ej-secondary-dark: #8b5cf6;
        --ej-secondary-light: #2e1065;
        --ej-secondary-hover: #c4b5fd;
        --ej-navy: #38bdf8;
        --ej-navy-light: #0c4a6e;
        --ej-navy-dark: #082f49;
        --ej-accent: #fbbf24;
        --ej-accent-dark: #f59e0b;
        --ej-accent-light: #422006;
        --ej-teal: #22d3ee;
        --ej-teal-light: #164e63;
        --ej-success: #34d399;
        --ej-success-light: #064e3b;
        --ej-warning: #fbbf24;
        --ej-warning-light: #422006;
        --ej-danger: #f87171;
        --ej-danger-light: #450a0a;
        --ej-info: #22d3ee;
        --ej-info-light: #164e63;
        --ej-white: #0f172a;
        --ej-gray-50: #1e293b;
        --ej-gray-100: #334155;
        --ej-gray-200: #475569;
        --ej-gray-300: #64748b;
        --ej-gray-400: #94a3b8;
        --ej-gray-500: #cbd5e1;
        --ej-gray-600: #e2e8f0;
        --ej-gray-700: #f1f5f9;
        --ej-gray-800: #f8fafc;
        --ej-gray-900: #ffffff;
        --ej-black: #ffffff;
        --ej-bg-body: #020617;
        --ej-bg-card: #0f172a;
        --ej-bg-sidebar: #1e293b;
        --ej-bg-input: #1e293b;
        --ej-bg-hero: #0f172a;
        --ej-text-primary: #f1f5f9;
        --ej-text-secondary: #cbd5e1;
        --ej-text-muted: #64748b;
        --ej-text-white: #ffffff;
        --ej-text-dark: #f1f5f9;
        --ej-border-color: #334155;
        --ej-border-light: #1e293b;
        --ej-border-dark: #475569;
        --ej-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
        --ej-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
        --ej-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        --ej-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
        --ej-shadow-hover: 0 12px 40px rgba(14, 165, 233, 0.2);
        --ej-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
        --ej-shadow-glow: 0 0 40px rgba(14, 165, 233, 0.15);
    }
}

.dark-mode {
    --ej-primary: #38bdf8;
    --ej-primary-dark: #0ea5e9;
    --ej-primary-light: #0c4a6e;
    --ej-primary-hover: #7dd3fc;
    --ej-secondary: #a78bfa;
    --ej-secondary-dark: #8b5cf6;
    --ej-secondary-light: #2e1065;
    --ej-secondary-hover: #c4b5fd;
    --ej-navy: #38bdf8;
    --ej-navy-light: #0c4a6e;
    --ej-navy-dark: #082f49;
    --ej-accent: #fbbf24;
    --ej-accent-dark: #f59e0b;
    --ej-accent-light: #422006;
    --ej-teal: #22d3ee;
    --ej-teal-light: #164e63;
    --ej-success: #34d399;
    --ej-success-light: #064e3b;
    --ej-warning: #fbbf24;
    --ej-warning-light: #422006;
    --ej-danger: #f87171;
    --ej-danger-light: #450a0a;
    --ej-info: #22d3ee;
    --ej-info-light: #164e63;
    --ej-white: #0f172a;
    --ej-gray-50: #1e293b;
    --ej-gray-100: #334155;
    --ej-gray-200: #475569;
    --ej-gray-300: #64748b;
    --ej-gray-400: #94a3b8;
    --ej-gray-500: #cbd5e1;
    --ej-gray-600: #e2e8f0;
    --ej-gray-700: #f1f5f9;
    --ej-gray-800: #f8fafc;
    --ej-gray-900: #ffffff;
    --ej-black: #ffffff;
    --ej-bg-body: #020617;
    --ej-bg-card: #0f172a;
    --ej-bg-sidebar: #1e293b;
    --ej-bg-input: #1e293b;
    --ej-bg-hero: #0f172a;
    --ej-text-primary: #f1f5f9;
    --ej-text-secondary: #cbd5e1;
    --ej-text-muted: #64748b;
    --ej-text-white: #ffffff;
    --ej-text-dark: #f1f5f9;
    --ej-border-color: #334155;
    --ej-border-light: #1e293b;
    --ej-border-dark: #475569;
    --ej-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --ej-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
    --ej-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --ej-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --ej-shadow-hover: 0 12px 40px rgba(14, 165, 233, 0.2);
    --ej-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --ej-shadow-glow: 0 0 40px rgba(14, 165, 233, 0.15);
}

/* HERO */
.ej-hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0c4a6e 80%, rgba(14,165,233,0.85) 100%);
    color: var(--ej-text-white);
    padding: 2rem 0;
    margin-bottom: 0;
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%) 1;
    position: relative;
    overflow: hidden;
}
.ej-hero-section::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}
.ej-hero-section > * { position: relative; z-index: 1; }
.ej-hero-section h1 { font-weight: 700; font-size: 1.85rem; margin-bottom: 0.5rem; color: var(--ej-text-white); }
.ej-hero-section .lead { opacity: 0.92; font-size: 0.95rem; color: var(--ej-text-white); }
.ej-hero-section a { color: var(--ej-text-white); opacity: 0.85; transition: var(--ej-transition-fast); }
.ej-hero-section a:hover { color: var(--ej-text-white); opacity: 1; text-decoration: underline; }
.ej-hero-section .breadcrumb { background: transparent; margin-bottom: 0; }
.ej-hero-section .breadcrumb-item a { color: rgba(255, 255, 255, 0.8); }
.ej-hero-section .breadcrumb-item.active { color: var(--ej-text-white); }

/* SEARCH BOX */
.ej-search-box { max-width: 600px; margin: 0 auto; position: relative; }
.ej-search-box .input-group { box-shadow: var(--ej-shadow); border-radius: var(--ej-radius-lg); overflow: hidden; }
.ej-search-box .form-control { border: none; padding: 0.65rem 0.9rem; font-size: 0.9rem; background: var(--ej-bg-input); color: var(--ej-text-primary); }
.ej-search-box .form-control::placeholder { color: var(--ej-text-muted); }
.ej-search-box .form-control:focus { box-shadow: none; background: var(--ej-bg-input); }
.ej-search-box .input-group-text { background: var(--ej-bg-input); border: none; padding-left: 0.9rem; color: var(--ej-text-secondary); }
.ej-search-box .btn {
    padding: 0.65rem 1.1rem; font-weight: 600; font-size: 0.9rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    border: none; color: var(--ej-text-white); transition: var(--ej-transition-fast);
}
.ej-search-box .btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.ej-search-box .btn:focus { box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3); }

/* FILTER SIDEBAR */
.ej-filter-sidebar {
    background: var(--ej-bg-sidebar); border-radius: var(--ej-radius-lg);
    padding: 1.1rem; position: sticky; top: 1rem; border: 1px solid var(--ej-border-color);
}
.ej-filter-sidebar h5 {
    font-size: 0.95rem; font-weight: 600; color: var(--ej-primary);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #0ea5e9, #8b5cf6) 1;
    padding-bottom: 0.5rem; margin-bottom: 1rem;
}
.ej-filter-sidebar h6 { font-size: 0.8rem; font-weight: 600; color: var(--ej-text-primary); margin-bottom: 0.4rem; }
.ej-filter-sidebar .form-select-sm {
    font-size: 0.8rem; padding: 0.35rem 0.6rem; background-color: var(--ej-bg-input);
    color: var(--ej-text-primary); border-color: var(--ej-border-color); border-radius: var(--ej-radius-sm);
}
.ej-filter-sidebar .form-select-sm:focus { border-color: var(--ej-primary); box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15); }
.ej-filter-sidebar .form-check-label { font-size: 0.82rem; color: var(--ej-text-primary); }
.ej-filter-sidebar .form-check-input { background-color: var(--ej-bg-input); border-color: var(--ej-border-dark); }
.ej-filter-sidebar .form-check-input:checked { background-color: var(--ej-primary); border-color: var(--ej-primary); }
.ej-filter-sidebar .form-check-input:focus { box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2); }

/* Active Filter Tags */
.ej-active-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ej-filter-tag {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.5rem; background: var(--ej-primary);
    color: var(--ej-text-white); font-size: 0.7rem; border-radius: var(--ej-radius-full);
}
.ej-filter-tag-database { background: var(--ej-secondary); }
.ej-filter-tag-subject { background: var(--ej-teal); }
.ej-filter-tag-letter { background: var(--ej-accent); color: #1e293b; }
.ej-filter-remove { color: var(--ej-text-white); opacity: 0.8; text-decoration: none; margin-left: 0.15rem; transition: var(--ej-transition-fast); }
.ej-filter-remove:hover { opacity: 1; color: var(--ej-text-white); }

/* ALPHABET NAV */
.ej-letter-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.ej-letter-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; font-size: 0.7rem; font-weight: 500;
    color: var(--ej-text-secondary); background: var(--ej-bg-card);
    border: 1px solid var(--ej-border-color); border-radius: var(--ej-radius-sm);
    text-decoration: none; transition: var(--ej-transition-fast); position: relative;
}
.ej-letter-btn:hover { background: var(--ej-primary); color: var(--ej-text-white); border-color: var(--ej-primary); transform: translateY(-1px); }
.ej-letter-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    color: var(--ej-text-white); border-color: transparent; font-weight: 600;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}
.ej-letter-btn.disabled { opacity: 0.3; pointer-events: none; background: var(--ej-gray-200); }
.ej-letter-count {
    position: absolute; top: -4px; right: -4px; min-width: 12px; height: 12px; padding: 0 2px;
    font-size: 0.5rem; background: var(--ej-secondary); color: var(--ej-text-white);
    border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.ej-letter-btn.active .ej-letter-count { background: var(--ej-text-white); color: var(--ej-primary); }

/* QUICK LINKS */
.ej-quick-links { list-style: none; padding: 0; margin: 0; }
.ej-quick-links li { padding: 0; }
.ej-quick-links a { color: var(--ej-text-secondary); text-decoration: none; display: flex; align-items: center; font-size: 0.8rem; transition: var(--ej-transition-fast); padding: 0.3rem 0; }
.ej-quick-links a:hover { color: var(--ej-primary); }
.ej-quick-links a i { color: var(--ej-secondary); margin-right: 0.5rem; }

/* E-JOURNAL CARDS */
.ej-journal-card {
    background: var(--ej-bg-card); border: 1px solid var(--ej-border-color);
    border-radius: var(--ej-radius-lg); padding: 0.85rem;
    display: flex; flex-direction: column; transition: var(--ej-transition);
    height: 100%; min-height: 175px; overflow: hidden; box-shadow: var(--ej-shadow-card);
}
.ej-journal-card:hover { border-color: rgba(14, 165, 233, 0.3); box-shadow: var(--ej-shadow-hover); transform: translateY(-2px); }
.ej-journal-card-header {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 0.4rem;
    margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--ej-border-light); min-height: 38px;
}
.ej-journal-title { font-size: 0.82rem; font-weight: 600; color: var(--ej-text-primary); text-decoration: none; line-height: 1.3; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: var(--ej-transition-fast); }
.ej-journal-title:hover { color: var(--ej-primary); }
.ej-journal-title i { color: var(--ej-secondary); }
.ej-external-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    color: var(--ej-text-white); border-radius: var(--ej-radius-sm);
    text-decoration: none; flex-shrink: 0; transition: var(--ej-transition-fast); font-size: 0.75rem;
}
.ej-external-link:hover { filter: brightness(1.15); color: var(--ej-text-white); transform: scale(1.08); box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3); }
.ej-journal-card-body { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; overflow: hidden; }
.ej-database-badge {
    display: inline-flex; align-items: center; gap: 0.2rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: var(--ej-text-white); padding: 0.15rem 0.45rem; border-radius: var(--ej-radius-full);
    font-size: 0.65rem; font-weight: 500; text-decoration: none; max-width: fit-content; transition: var(--ej-transition-fast);
}
.ej-database-badge:hover { filter: brightness(1.1); color: var(--ej-text-white); }
.ej-journal-meta { display: flex; flex-direction: column; gap: 0.15rem; }
.ej-meta-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--ej-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ej-meta-item i { color: var(--ej-primary); font-size: 0.65rem; width: 12px; text-align: center; flex-shrink: 0; }
.ej-issn-row { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.15rem; }
.ej-issn-badge { font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: 0.6rem; background: var(--ej-gray-200); padding: 0.1rem 0.35rem; border-radius: var(--ej-radius-sm); color: var(--ej-text-secondary); display: inline-flex; align-items: center; }
.ej-issn-badge i { font-size: 0.55rem; color: var(--ej-primary); }
.ej-access-row { margin-top: auto; padding-top: 0.15rem; }
.ej-access-status { display: inline-flex; align-items: center; padding: 0.15rem 0.4rem; border-radius: var(--ej-radius-sm); font-size: 0.65rem; font-weight: 500; }
.ej-access-current { background: var(--ej-success-light); color: var(--ej-success); }
.ej-access-historical { background: var(--ej-gray-200); color: var(--ej-text-secondary); }
.ej-journal-card-footer {
    display: flex; justify-content: space-between; align-items: center; gap: 0.4rem;
    padding-top: 0.5rem; margin-top: 0.4rem; border-top: 1px solid var(--ej-border-light);
}
.ej-journal-card-footer .btn { font-size: 0.7rem; padding: 0.28rem 0.55rem; border-radius: var(--ej-radius-sm); display: inline-flex; align-items: center; gap: 0.2rem; font-weight: 500; }
.ej-journal-card-footer .btn i { font-size: 0.68rem; }
.ej-journal-card-footer .btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    border: none; color: var(--ej-text-white);
}
.ej-journal-card-footer .btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.ej-journal-card-footer .btn-outline-secondary { border-color: var(--ej-secondary); color: var(--ej-secondary); background: transparent; }
.ej-journal-card-footer .btn-outline-secondary:hover { background: var(--ej-secondary); border-color: var(--ej-secondary); color: var(--ej-text-white); }

/* EMPTY STATE */
.ej-empty-state { text-align: center; padding: 2.5rem 1.5rem; color: var(--ej-text-secondary); background: var(--ej-bg-sidebar); border-radius: var(--ej-radius-lg); border: 2px dashed var(--ej-border-color); }
.ej-empty-state i { font-size: 2.5rem; opacity: 0.5; color: var(--ej-primary); }
.ej-empty-state h5 { color: var(--ej-text-primary); margin-bottom: 0.4rem; font-size: 1rem; }
.ej-empty-state p { color: var(--ej-text-secondary); }
.ej-empty-state .btn { background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%); border: none; color: var(--ej-text-white); }
.ej-empty-state .btn:hover { filter: brightness(1.1); }

/* PAGINATION */
.ej-pagination { gap: 0.2rem; }
.ej-pagination .page-link { border-radius: var(--ej-radius-sm); border: 1px solid var(--ej-border-color); color: var(--ej-text-secondary); background: var(--ej-bg-card); padding: 0.35rem 0.6rem; font-size: 0.8rem; transition: var(--ej-transition-fast); }
.ej-pagination .page-link:hover { background: var(--ej-primary-light); border-color: var(--ej-primary); color: var(--ej-primary); }
.ej-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    border-color: transparent; color: var(--ej-text-white);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}
.ej-pagination .page-item.disabled .page-link { background: var(--ej-gray-200); color: var(--ej-text-muted); border-color: var(--ej-border-color); }

/* STATS */
.ej-stats-box { background: var(--ej-bg-card); border: 1px solid var(--ej-border-color); border-radius: var(--ej-radius); padding: 1rem; border-left: 4px solid var(--ej-primary); }
.ej-stats-box .ej-stats-number { color: var(--ej-primary); font-weight: 700; font-size: 1.5rem; }
.ej-stats-box .ej-stats-label { color: var(--ej-text-secondary); font-size: 0.85rem; }
.ej-stats-box.ej-stats-secondary { border-left-color: var(--ej-secondary); }
.ej-stats-box.ej-stats-secondary .ej-stats-number { color: var(--ej-secondary); }

/* ALERTS */
.ej-alert { border-radius: var(--ej-radius); padding: 0.75rem 1rem; font-size: 0.875rem; }
.ej-alert-primary { background: var(--ej-primary-light); border: 1px solid var(--ej-primary); color: var(--ej-primary); }
.ej-alert-secondary { background: var(--ej-secondary-light); border: 1px solid var(--ej-secondary); color: var(--ej-secondary); }

/* RESPONSIVE */
@media (max-width: 1199.98px) { .ej-journal-card { min-height: 165px; max-height: 210px; } }
@media (max-width: 991.98px) {
    .ej-hero-section { padding: 1.5rem 0; }
    .ej-hero-section h1 { font-size: 1.6rem; }
    .ej-filter-sidebar { position: relative; top: 0; margin-bottom: 1.25rem; }
    .ej-journal-card { min-height: 155px; max-height: 200px; }
}
@media (max-width: 767.98px) {
    .ej-hero-section { padding: 1.25rem 0; }
    .ej-hero-section h1 { font-size: 1.4rem; }
    .ej-search-box .form-control { font-size: 0.85rem; }
    .ej-search-box .btn { padding: 0.55rem 0.9rem; }
    .ej-journal-card { padding: 0.75rem; min-height: 150px; max-height: 195px; }
    .ej-journal-title { font-size: 0.78rem; }
    .ej-letter-btn { width: 22px; height: 22px; font-size: 0.65rem; }
    .ej-letter-count { display: none; }
    .ej-journal-card-footer { flex-direction: column; align-items: stretch; gap: 0.35rem; }
    .ej-journal-card-footer .btn { justify-content: center; width: 100%; }
}
@media (max-width: 575.98px) {
    .ej-hero-section { padding: 1rem 0; }
    .ej-hero-section h1 { font-size: 1.25rem; }
    .ej-filter-sidebar { padding: 0.9rem; }
    .ej-journal-card { min-height: 145px; max-height: 190px; }
    .ej-database-badge { font-size: 0.6rem; }
    .ej-meta-item { font-size: 0.7rem; }
    .ej-pagination .page-link { padding: 0.3rem 0.45rem; font-size: 0.75rem; }
}

/* PRINT */
@media print {
    .ej-hero-section { background: none !important; color: black !important; padding: 0.75rem 0; border-bottom: 2px solid #0f172a !important; border-image: none !important; }
    .ej-hero-section::before { display: none; }
    .ej-hero-section h1 { color: #0f172a !important; }
    .ej-search-box, .ej-filter-sidebar, .ej-pagination, .ej-journal-card-footer .btn, .ej-external-link { display: none !important; }
    .ej-journal-card { border: 1px solid #ccc; break-inside: avoid; max-height: none; background: white !important; box-shadow: none !important; }
    .ej-database-badge { background: none !important; color: #8b5cf6 !important; border: 1px solid #8b5cf6; }
    .ej-journal-title, .ej-meta-item { color: black !important; }
}

/* ACCESSIBILITY */
.ej-letter-btn:focus, .ej-database-badge:focus, .ej-journal-card:focus-within, .ej-external-link:focus { outline: 2px solid var(--ej-primary); outline-offset: 2px; }
@media (prefers-contrast: high) { .ej-journal-card { border-width: 2px; } .ej-letter-btn { border-width: 2px; } .ej-hero-section { border-bottom-width: 5px; } }
@media (prefers-reduced-motion: reduce) { .ej-journal-card, .ej-letter-btn, .ej-database-badge, .ej-external-link { transition: none; } }

/* LOADING */
.ej-loading { display: flex; align-items: center; justify-content: center; padding: 2.5rem; color: var(--ej-text-secondary); }
.ej-loading-spinner { width: 1.25rem; height: 1.25rem; border: 2px solid var(--ej-gray-200); border-top-color: var(--ej-primary); border-radius: 50%; animation: ej-spin 0.8s linear infinite; margin-right: 0.6rem; }
@keyframes ej-spin { to { transform: rotate(360deg); } }
.ej-skeleton { background: linear-gradient(90deg, var(--ej-gray-200) 25%, var(--ej-gray-100) 50%, var(--ej-gray-200) 75%); background-size: 200% 100%; animation: ej-skeleton-loading 1.5s infinite; border-radius: var(--ej-radius-sm); }
@keyframes ej-skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* UTILITIES */
.ej-text-navy { color: var(--ej-primary) !important; }
.ej-text-maroon { color: var(--ej-secondary) !important; }
.ej-bg-navy { background-color: var(--ej-primary) !important; color: var(--ej-text-white) !important; }
.ej-bg-maroon { background-color: var(--ej-secondary) !important; color: var(--ej-text-white) !important; }
.ej-bg-navy-light { background-color: var(--ej-primary-light) !important; color: var(--ej-primary) !important; }
.ej-bg-maroon-light { background-color: var(--ej-secondary-light) !important; color: var(--ej-secondary) !important; }
.ej-border-navy { border-color: var(--ej-primary) !important; }
.ej-border-maroon { border-color: var(--ej-secondary) !important; }
.ej-accent-line { height: 3px; background: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%); border-radius: 2px; }
.ej-hover-navy:hover { background-color: var(--ej-primary) !important; color: var(--ej-text-white) !important; border-color: var(--ej-primary) !important; }
.ej-hover-maroon:hover { background-color: var(--ej-secondary) !important; color: var(--ej-text-white) !important; border-color: var(--ej-secondary) !important; }
.ej-divider { border: none; height: 1px; background: var(--ej-border-color); margin: 1.5rem 0; }
.ej-divider-accent { height: 2px; background: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%); }