/* ==========================================================================
   THƯ VIỆN SỐ - DESIGN SYSTEM & MASTER STYLESHEET
   Trường Cao đẳng Văn hóa Nghệ thuật Việt Bắc
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
    --color-primary: #3b8ef6;
    --color-primary-hover: #2563eb;
    --color-secondary: #1e3a8a;
    --color-secondary-hover: #172554;
    --color-accent: #e11d48;

    --color-bg-body: #F3F4F6;
    --color-bg-surface: #FFFFFF;
    --color-border: #E5E7EB;

    --color-text-heading: #111827;
    --color-text-body: #4B5563;
    --color-text-muted: #6B7280;

    --font-family-base: 'Inter', sans-serif;
    --transition-base: all 0.2s ease-in-out;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
}

/* Base resets */
body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg-body);
    color: var(--color-text-body);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: var(--transition-base);
}

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

.library-layout {
    padding: 1rem 0;
}

.category-layout {
    padding: 1rem 0;
}

/* ==========================================================================
   2. BREADCRUMB HERO BANNER (REUSABLE)
   ========================================================================== */
.page-breadcrumb-banner {
    background-color: var(--color-secondary);
    border: 1px solid var(--color-border);
}

.page-breadcrumb-banner .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.header-top {
    background-color: var(--color-secondary);
    color: white;
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

.header-main {
    background-color: var(--color-bg-surface);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 700;
    color: var(--color-secondary) !important;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-brand i {
    color: var(--color-accent);
    font-size: 1.4rem;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-body);
    padding: 0.75rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary) !important;
}

/* ==========================================================================
   4. OPAC SEARCH AREA
   ========================================================================== */
.opac-section {
    padding: 4rem 0 3rem;
    color: white;
}

.search-catalog-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 900px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-select {
    border: none;
    background: #f8f9fa;
    padding: 0.8rem 1rem;
    font-weight: 500;
    color: var(--color-text-heading);
    border-right: 1px solid var(--color-border);
    outline: none;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    outline: none;
}

.search-btn {
    background-color: var(--color-accent);
    color: white;
    border: none;
    padding: 0 2.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-base);
}

.search-btn:hover {
    background-color: #be123c;
}

.library-stats {
    background-color: white;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    font-size: 0.95rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-secondary);
    font-weight: 600;
}

.stat-item i {
    color: var(--color-primary);
}

/* ==========================================================================
   5. TABS NAVIGATION & SIDEBAR FACET FILTERS
   ========================================================================== */
.tabs-container {
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.custom-nav-tabs {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    overflow-x: auto;
}

.tab-item {
    margin-bottom: -2px;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
    text-decoration: none;
    color: var(--color-text-body);
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 3px solid transparent;
    transition: var(--transition-base);

}

.tab-link:hover {
    color: var(--color-primary);
}

.tab-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-count {
    background: #E5E7EB;
    color: var(--color-text-heading);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.tab-link.active .tab-count {
    background: #DBEAFE;
    color: var(--color-primary);
}

.sidebar-facet {
    background: var(--color-bg-surface);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.facet-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
    text-transform: uppercase;
}

.facet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.facet-item {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.facet-label {
    font-size: 0.9rem;
    color: var(--color-text-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.facet-count {
    font-size: 0.75rem;
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--color-text-muted);
}

.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg-surface);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   6. FILTER PILLS BAR & DROPDOWN SELECT
   ========================================================================== */
.gallery-filters-container {
    position: relative;
    background: var(--color-bg-surface);
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    max-height: 92px;
    overflow-y: auto;
    padding-right: 0.4rem;
    scrollbar-width: thin;
}

.gallery-filters::-webkit-scrollbar {
    width: 5px;
}

.gallery-filters::-webkit-scrollbar-thumb {
    background: rgba(59, 142, 246, 0.3);
    border-radius: 4px;
}

.filter-btn {
    background: var(--color-bg-body);
    border: 1px solid var(--color-border);
    color: var(--color-text-body);
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-base);

}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   7. 3D BOOK CARD COMPONENT
   ========================================================================== */
.doc-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    padding: 1.25rem;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

.doc-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.book-3d-wrapper {
    perspective: 1000px;
    width: 100px;
    height: 145px;
    flex-shrink: 0;
    margin-left: 10px;
    margin-top: 5px;
}

.book-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-20deg);
    transition: transform 0.4s ease;
}

.doc-card:hover .book-3d {
    transform: rotateY(-30deg) scale(1.03);
}

.book-front {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 2px 5px 5px 2px;
    transform: translateZ(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem;
    text-align: center;
    color: white;
    background-blend-mode: overlay;
    box-shadow: inset 4px 0 10px rgba(0, 0, 0, 0.1), 5px 5px 15px rgba(0, 0, 0, 0.15);
}

.book-spine {
    position: absolute;
    width: 20px;
    height: 100%;
    transform: rotateY(-90deg) translateX(-10px);
    transform-origin: left center;
    border-radius: 3px 0 0 3px;
    background-blend-mode: overlay;
    box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.2);
}

.book-pages {
    position: absolute;
    width: 18px;
    height: 98%;
    top: 1%;
    right: 40px;
    transform: rotateY(90deg) translateZ(50px);
    background: #f3f3f3;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0, 0, 0, 0.05) 1px, rgba(0, 0, 0, 0.05) 2px);
}

.theme-blue .book-front,
.theme-blue .book-spine {
    background-color: var(--color-primary);
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
}

.theme-navy .book-front,
.theme-navy .book-spine {
    background-color: var(--color-secondary);
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.2), transparent);
}

.theme-red .book-front,
.theme-red .book-spine {
    background-color: var(--color-accent);
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
}

.theme-emerald .book-front,
.theme-emerald .book-spine {
    background-color: #059669;
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.1));
}

.theme-purple .book-front,
.theme-purple .book-spine {
    background-color: #7c3aed;
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.1));
}

.theme-amber .book-front,
.theme-amber .book-spine {
    background-color: #d97706;
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.1));
}

.theme-teal .book-front,
.theme-teal .book-spine {
    background-color: #0d9488;
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.1));
}

.theme-indigo .book-front,
.theme-indigo .book-spine {
    background-color: #4f46e5;
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.1));
}

.book-title-cover {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    word-break: break-word;
}

.book-sub-cover {
    font-size: 0.55rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.doc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    z-index: 2;
}

.doc-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.doc-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.doc-title a {
    color: inherit;
}

.doc-title a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--color-text-body);
    margin-bottom: 1rem;
    background: #F9FAFB;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.meta-lbl {
    font-weight: 600;
    color: var(--color-text-heading);
    width: 80px;
    display: inline-block;
}

.doc-actions {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-read {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.4rem 1.25rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
}

.btn-read:hover {
    background: var(--color-secondary);
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--color-text-body);
    border: 1px solid var(--color-border);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
}

.btn-outline:hover {
    background: var(--color-bg-body);
    border-color: var(--color-text-muted);
}

.status-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.status-online {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-borrow {
    background: #fef08a;
    color: #854d0e;
    border: 1px solid #fde047;
}

/* ==========================================================================
   8. IMAGE GALLERY & CATEGORY CARDS
   ========================================================================== */
.image-library {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.library-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--color-bg-surface);
    transition: var(--transition-base);
    aspect-ratio: 4 / 3;
    display: block;
}

.library-item img,
.library-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.library-item:hover img,
.library-item:hover .library-thumb {
    transform: scale(1.08);
}

.library-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.library-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    color: white;
    opacity: 0;
    transition: var(--transition-base);
}

.library-item:hover .library-overlay {
    opacity: 1;
}

.library-overlay h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.zoom-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.overlay-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.overlay-tag {
    background: var(--color-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.category-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.category-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(59, 142, 246, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    transition: var(--transition-base);
}

.category-card:hover .category-icon {
    background: var(--color-primary);
    color: white;
}

.category-badge {
    background: var(--color-bg-body);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

.faculty-group {
    margin-bottom: 4rem;
}

.faculty-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-secondary);
}

.faculty-title i {
    font-size: 1.8rem;
    color: var(--color-primary);
    background: rgba(59, 142, 246, 0.1);
    padding: 0.75rem;
    border-radius: 10px;
}

.faculty-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.major-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.major-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.major-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.major-header .icon-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--color-bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.major-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin: 0;
    line-height: 1.4;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    color: var(--color-text-body);
    text-decoration: none;
    font-size: 0.95rem;
    background: var(--color-bg-body);
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.category-link:hover {
    background: rgba(59, 142, 246, 0.05);
    color: var(--color-primary);
    border-color: rgba(59, 142, 246, 0.2);
    transform: translateX(3px);
}

.category-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 10px;
    border-radius: 2px;
}

.category-link i.fa-folder-open {
    color: var(--color-text-muted);
    margin-right: 10px;
    font-size: 1.1rem;
    transition: var(--transition-base);
}

.category-link:hover i.fa-folder-open {
    color: var(--color-primary);
}

.category-count {
    margin-left: auto;
    background: var(--color-bg-surface);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.view-all-major {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}

.view-all-major:hover {
    color: var(--color-primary-hover);
}

.faculty-group-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

/* ==========================================================================
   9. FOOTER CUSTOM
   ========================================================================== */
.footer-main {
    background-color: #2b303d;
    color: #d1d5db;
    font-size: 0.95rem;
}

.footer-main h5 {
    color: #7b96e4;
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.footer-main p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-socials a {
    color: #d1d5db;
    font-size: 1.25rem;
    margin-right: 1rem;
    transition: color 0.2s;
}

.footer-socials a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* ==========================================================================
   10. RESPONSIVE MEDIA QUERIES (CONSOLIDATED)
   ========================================================================== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--color-bg-surface);
        padding: 1rem;
        border-radius: 8px;
        box-shadow: var(--shadow-md);
        margin-top: 10px;
        border: 1px solid var(--color-border);
    }

    .opac-section {
        padding: 2.5rem 0;
    }

    .search-catalog-box {
        padding: 1rem;
    }

    .library-stats .container {
        justify-content: space-between;
    }

    .results-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .results-toolbar .d-flex {
        width: 100%;
        justify-content: space-between;
    }

    .results-toolbar select {
        flex: 1;
    }
}

@media (max-width: 767.98px) {

    /* Mobile Typography Scaling & Spacing Optimization */
    h1,
    .h1 {
        font-size: 1.35rem !important;
        line-height: 1.3;
    }

    h2,
    .h2 {
        font-size: 1.2rem !important;
        line-height: 1.35;
    }

    h3,
    .h3 {
        font-size: 1.05rem !important;
        line-height: 1.35;
    }

    h4,
    .h4 {
        font-size: 0.95rem !important;
    }

    .page-breadcrumb-banner h1,
    .page-breadcrumb-banner .h3 {
        font-size: 1.2rem !important;
    }

    .page-breadcrumb-banner p {
        font-size: 0.85rem !important;
    }

    .doc-title {
        font-size: 1rem !important;
        line-height: 1.4;
    }

    .doc-type {
        font-size: 0.8rem;
    }

    .meta-lbl,
    .metadata-grid div {
        font-size: 0.82rem;
    }

    .video-title {
        font-size: 0.95rem !important;
        line-height: 1.35;
    }

    .video-meta {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .btn-watch,
    .btn-read,
    .btn-outline {
        font-size: 0.85rem;
        padding: 0.45rem 0.75rem;
    }

    .faculty-title h2 {
        font-size: 1.2rem !important;
    }

    .major-header h3 {
        font-size: 0.98rem !important;
    }

    .category-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.7rem;
    }

    .search-input {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    .search-btn {
        padding: 0 1rem;
    }

    .search-btn span {
        display: none;
    }

    .doc-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem 1rem;
        gap: 1rem;
    }

    .book-3d-wrapper {
        margin-bottom: 0.5rem;
        margin-left: 0;
    }

    .doc-info {
        width: 100%;
        align-items: center;
    }

    .metadata-grid {
        grid-template-columns: 1fr;
        width: 100%;
        text-align: left;
        padding: 1rem;
        gap: 0.75rem;
    }

    .doc-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .doc-actions>* {
        width: 100%;
        justify-content: center;
    }

    /* Mobile Image Gallery 2-Columns Layout */
    .image-library {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .library-item {
        border-radius: 10px;
    }

    .library-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(17, 24, 39, 0.85) 0%, transparent 100%);
        padding: 0.75rem 0.6rem;
    }

    .library-overlay h4 {
        font-size: 0.82rem !important;
        line-height: 1.3;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .overlay-meta {
        display: none;
    }

    .zoom-icon {
        display: none;
    }
}

/* ==========================================================================
   11. LOGIN PAGE SPECIFIC STYLES
   ========================================================================== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-banner {
    flex: 1;
    display: none;
    position: relative;
    background: url('https://images.unsplash.com/photo-1510531704581-5b28709220a6?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
}

@media (min-width: 992px) {
    .login-banner {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

.login-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(59, 142, 246, 0.8) 100%);
    z-index: 1;
}

.login-banner-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 3rem;
    max-width: 600px;
}

.login-banner-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.login-banner-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.login-panel {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color-bg-surface);
    padding: 2rem;
    position: relative;
}

@media (min-width: 992px) {
    .login-panel {
        width: 500px;
        padding: 4rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
        z-index: 3;
    }
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    color: var(--color-secondary);
    text-transform: uppercase;
}

.brand-logo i {
    font-size: 2rem;
    color: var(--color-accent);
}

.brand-logo div {
    font-weight: 700;
    line-height: 1.2;
}

.brand-logo .sub-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   12. VIDEO LIBRARY CARDS
   ========================================================================== */
.video-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: var(--transition-base);
}

.video-card:hover .video-thumbnail img {
    opacity: 0.65;
    transform: scale(1.05);
}

.play-btn-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(225, 29, 72, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    z-index: 2;
    transition: var(--transition-base);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.play-btn-center i {
    margin-left: 3px;
}

.video-card:hover .play-btn-center {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--color-accent);
}

.video-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(17, 24, 39, 0.8);
    color: white;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.video-card:hover .video-title {
    color: var(--color-primary);
}

.video-meta {
    background: var(--color-bg-body);
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.video-meta div {
    margin-bottom: 0.2rem;
}

.video-meta div:last-child {
    margin-bottom: 0;
}

.video-meta strong {
    color: var(--color-text-body);
    font-weight: 600;
}

.btn-watch {
    margin-top: auto;
    background-color: white;
    color: var(--color-secondary);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.55rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.video-card:hover .btn-watch {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}