:root {
    --primary-aqua: #2bb9c0;
    --light-aqua: #e0f7fa;
    --medium-aqua: #4dd0e1;
    --dark-aqua: #00838f;
    --text-dark: #2c3e50;
    --text-light: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background: linear-gradient(180deg, #e9eef5 0%, #e2eff2 100%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* Animated Aqua Background */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-aqua-bg {
    background: linear-gradient(270deg, var(--primary-aqua), var(--dark-aqua), var(--medium-aqua), var(--primary-aqua));
    background-size: 300% 300%;
    animation: gradient-shift 10s ease infinite;
}

/* Header Styles */
.navbar {
    box-shadow: 0 4px 12px rgba(0, 131, 143, 0.15);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 8px;
    padding: 8px 15px !important;
    border-radius: 4px;
    transition: all 0.3s;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px; /* space between logo and text */
    padding: 0.5rem 0; /* optional: adjust vertical padding */
}

.brand-logo {
    height: 90px;        /* adjust to your desired height */
    width: auto;
    max-width: 150px;    /* optional: prevent it from getting too big */
}

.brand-text {
    font-weight: bold;
    font-size: 1.25rem;
}

@media (max-width: 576px) {
    .brand-logo {
        height: 35px;
    }
    .brand-text {
        font-size: 0.85rem;
    }
}
.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.dropdown-menu {
    background-color: white;
    border: 1px solid var(--light-aqua);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    color: var(--text-dark);
    padding: 10px 20px;
}

.dropdown-item:hover {
    background-color: var(--light-aqua);
    color: var(--dark-aqua);
}

/* Carousel for Library Page */
.carousel-container {
    background: linear-gradient(to bottom, #e0f7fa, #f8fcfd);
    padding: 40px 0;
}




.carousel-item {
    height: 400px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 131, 143, 0.1);
}

.carousel-item img,
.carousel-item video {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.carousel-caption {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    position: absolute;
    bottom: 20px;
    left: 15%;
    right: 15%;
    text-align: center;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Carousel indicators */
.carousel-indicators button {
    background-color: var(--primary-aqua) !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin: 0 6px !important;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.page-title {
    color: var(--dark-aqua);
    font-weight: 700;
    border-bottom: 3px solid var(--medium-aqua);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Publications Table */
.table-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 30px;
    overflow-x: auto;
}

.publications-table {
    width: 100%;
    border-collapse: collapse;
}

.publications-table thead {
    background-color: var(--light-aqua);
}

.publications-table th {
    color: var(--dark-aqua);
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid var(--medium-aqua);
}

.publications-table td {
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
    vertical-align: top;
}

.publications-table tbody tr:hover {
    background-color: rgba(224, 247, 250, 0.3);
}

.btn-abstract {
    background-color: var(--primary-aqua);
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    transition: all 0.3s;
}

.btn-abstract:hover {
    background-color: var(--dark-aqua);
    color: white;
}

.btn-pdf {
    background-color: #e74c3c;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    transition: all 0.3s;
}

.btn-pdf:hover {
    background-color: #c0392b;
    color: white;
}

/* Login Form */
.login-form {
    max-width: 380px;
    margin: 40px auto;
    background-color: white;
    padding: 1.25rem 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 131, 143, 0.12);
    border: 1px solid rgba(43, 185, 192, 0.1);
    border-top: 6px solid var(--primary-aqua);
    transition: transform 0.3s ease;
}

.login-form .mb-3 {
    margin-bottom: 0.85rem !important;
}

.form-control:focus {
    border-color: var(--primary-aqua);
    box-shadow: 0 0 0 0.25rem rgba(43, 185, 192, 0.25);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-aqua), var(--dark-aqua));
    color: white;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(43, 185, 192, 0.25);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 185, 192, 0.35);
    color: white;
}

/* About Section */
.about-content {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(43, 185, 192, 0.12);
    border-radius: 16px;
    padding: 32px 24px;
    height: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(2, 60, 90, 0.06);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.about-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2bb9c0, #0d8fa0);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.about-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(2, 60, 90, 0.14);
    border-color: rgba(43, 185, 192, 0.3);
}

.about-content:hover::before {
    transform: scaleX(1);
}

.about-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 16px;
    font-size: 1.6rem;
    color: #fff;
    background: linear-gradient(135deg, #2bb9c0, #0d8fa0);
    box-shadow: 0 10px 22px rgba(13, 143, 160, 0.3);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.about-content:hover .about-icon {
    transform: translateY(-4px) rotate(-4deg) scale(1.06);
}

.about-content:hover .about-icon,
.service-card:hover .about-icon {
    transform: translateY(-4px) rotate(-4deg) scale(1.06);
}

/* Contact page */
.contact-split {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(2, 60, 90, 0.08);
    border: 1px solid rgba(43, 185, 192, 0.12);
}

.contact-sidebar {
    background: linear-gradient(180deg, #0d8fa0 0%, #00838f 100%);
    color: #fff;
    padding: 32px 28px;
    height: 100%;
    min-height: 100%;
}

.contact-sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact-sidebar-title {
    font-weight: 800;
    margin: 0 0 6px;
}

.contact-sidebar-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0 0 24px;
    line-height: 1.6;
}

.contact-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.contact-sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.contact-sidebar .contact-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.1rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.contact-sidebar-item .contact-label {
    color: rgba(255, 255, 255, 0.7);
}

.contact-sidebar-item .contact-value {
    color: #fff;
}

.contact-sidebar-item .contact-value a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-sidebar-item .contact-value a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.contact-social-row {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-social-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    color: #fff;
}

.contact-form-card {
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: none;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.contact-form-header {
    padding: 32px 32px 0;
}

.contact-form-title {
    color: var(--dark-aqua, #00838f);
    font-weight: 800;
    margin: 0 0 6px;
}

.contact-form-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 24px;
}

.contact-form-card form {
    padding: 0 32px 32px;
}

.contact-form-card .form-control {
    border: 1px solid rgba(43, 185, 192, 0.2);
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    background: #f8fcfd;
}

.contact-form-card .form-control:focus {
    border-color: var(--primary-aqua, #2bb9c0);
    box-shadow: 0 0 0 3px rgba(43, 185, 192, 0.15);
    background: #fff;
}

.contact-form-card label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark, #2c3e50);
    margin-bottom: 6px;
}

.btn-contact {
    background: linear-gradient(135deg, #2bb9c0, #0d8fa0);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(43, 185, 192, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(43, 185, 192, 0.4);
    color: #fff;
}

.btn-contact:active {
    transform: translateY(0);
}

.contact-map-card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(43, 185, 192, 0.12);
    box-shadow: 0 10px 30px rgba(2, 60, 90, 0.06);
}

.contact-map-placeholder {
    background: linear-gradient(135deg, #e0f7fa 0%, #e6fffb 100%);
    padding: 48px 24px;
    text-align: center;
    color: var(--dark-aqua, #00838f);
}

.contact-map-placeholder i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.contact-map-placeholder p {
    font-weight: 600;
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .contact-split {
        display: flex;
        flex-direction: column;
    }

    .contact-sidebar {
        min-height: auto;
    }

    .contact-form-card {
        border-radius: 0;
    }
}

/* Library feature cards (home second section) */
.lib-feature-card {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(43, 185, 192, 0.12);
    border-radius: 18px;
    padding: 32px 24px;
    height: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(2, 60, 90, 0.06);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.lib-feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2bb9c0, #0d8fa0);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.lib-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 48px rgba(2, 60, 90, 0.16);
    border-color: rgba(43, 185, 192, 0.35);
}

.lib-feature-card:hover::before {
    transform: scaleX(1);
}

.lib-feature-card .about-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 16px;
    font-size: 1.6rem;
    color: #fff;
    background: linear-gradient(135deg, #2bb9c0, #0d8fa0);
    box-shadow: 0 10px 22px rgba(13, 143, 160, 0.3);
    transition: transform 0.35s ease;
}

.lib-feature-card:hover .about-icon {
    transform: translateY(-4px) rotate(-4deg) scale(1.06);
}

.lib-feature-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

/* Staggered entrance for feature cards */
.library-feature-grid > div:nth-child(1) .lib-feature-card { animation-delay: 0.05s; }
.library-feature-grid > div:nth-child(2) .lib-feature-card { animation-delay: 0.12s; }
.library-feature-grid > div:nth-child(3) .lib-feature-card { animation-delay: 0.19s; }
.library-feature-grid > div:nth-child(4) .lib-feature-card { animation-delay: 0.26s; }
.library-feature-grid > div:nth-child(5) .lib-feature-card { animation-delay: 0.33s; }

/* Staggered entrance for resource cards */
.row.g-4 > div:nth-child(1) .resource-card { animation-delay: 0.05s; }
.row.g-4 > div:nth-child(2) .resource-card { animation-delay: 0.1s; }
.row.g-4 > div:nth-child(3) .resource-card { animation-delay: 0.15s; }
.row.g-4 > div:nth-child(4) .resource-card { animation-delay: 0.2s; }
.row.g-4 > div:nth-child(5) .resource-card { animation-delay: 0.25s; }
.row.g-4 > div:nth-child(6) .resource-card { animation-delay: 0.3s; }
.row.g-4 > div:nth-child(7) .resource-card { animation-delay: 0.35s; }
.row.g-4 > div:nth-child(8) .resource-card { animation-delay: 0.4s; }
.row.g-4 > div:nth-child(9) .resource-card { animation-delay: 0.45s; }

/* Resource card category icon */
.resource-card .rounded-circle {
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.resource-card:hover .rounded-circle {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(13, 143, 160, 0.25);
}

/* Resource card action buttons */
.resource-card .btn {
    transition: all 0.25s ease;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.resource-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 185, 192, 0.25);
}

/* Footer */
.footer {
    color: white;
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.footer h5:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: var(--medium-aqua);
}

.footer-links {
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 10px;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-item {
        height: 200px;
    }

    .carousel-caption {
        left: 5%;
        right: 5%;
        padding: 10px;
        bottom: 10px;
    }

    .publications-table {
        font-size: 0.9rem;
    }

    .publications-table th,
    .publications-table td {
        padding: 10px;
    }
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: 200px 0;
    }
}

/* Hero section animation */
.library-hero {
    animation: fadeInUp 0.7s ease-out forwards;
}

.library-hero .page-title {
    animation: fadeInUp 0.7s ease-out 0.1s forwards;
    opacity: 0;
}

.library-hero .lead {
    animation: fadeInUp 0.7s ease-out 0.2s forwards;
    opacity: 0;
}

.library-hero form {
    animation: fadeInUp 0.7s ease-out 0.3s forwards;
    opacity: 0;
}

.library-hero .btn-group {
    animation: fadeInUp 0.7s ease-out 0.4s forwards;
    opacity: 0;
}

/* Resource cards animation */
.resource-card {
    background: #ffffff;
    border: 1px solid rgba(43, 185, 192, 0.1);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2bb9c0, #0d8fa0);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.resource-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.resource-card:hover {
    box-shadow: 0 14px 28px rgba(43, 185, 192, 0.2) !important;
    transform: translateY(-6px) !important;
    border-color: rgba(43, 185, 192, 0.3);
}

.resource-card.visible:hover {
    transform: translateY(-6px);
}

.resource-card:hover::before {
    transform: scaleX(1);
}

/* Card icon animation */
.resource-card .category-icon-wrapper {
    transition: transform 0.3s ease;
}

.resource-card:hover .category-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* Category filter buttons animation */
.library-hero .btn {
    transition: all 0.3s ease;
}

.library-hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 185, 192, 0.3);
}

/* Empty state animation */
.empty-state-icon {
    animation: fadeInScale 0.5s ease-out forwards;
}

/* Search input focus animation */
.library-hero .form-control {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.library-hero .form-control:focus {
    box-shadow: 0 0 0 4px rgba(43, 185, 192, 0.15);
}

/* Action buttons inside cards */
.resource-card .btn {
    transition: all 0.25s ease;
}

.resource-card .btn:hover {
    transform: translateY(-1px);
}

/* Results section fade */
.results-info {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.results-info a {
    transition: color 0.2s ease;
}

.results-info a:hover {
    color: var(--primary-aqua) !important;
}

/* Pagination animation */
.pagination-container {
    animation: fadeInUp 0.5s ease-out 0.5s forwards;
    opacity: 0;
}

/* No results state */
.no-results {
    animation: fadeInScale 0.5s ease-out forwards;
}

/* ==================== LIBRARY STAFF PAGE ==================== */

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.staff-hero-section {
    animation: fadeInUp 0.7s ease-out forwards;
}

.staff-hero-section .page-title {
    animation: fadeInUp 0.6s ease-out 0.05s forwards;
    opacity: 0;
}

.staff-hero-section .lead {
    animation: fadeInUp 0.6s ease-out 0.15s forwards;
    opacity: 0;
}

.staff-hero-section form {
    animation: fadeInUp 0.6s ease-out 0.25s forwards;
    opacity: 0;
}

.staff-section-title {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Staff scroller */
.scroller {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 4px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
    display: none;
}

.scroller .staff-card-wrapper {
    flex: 0 0 auto;
    width: 280px;
    min-width: 240px;
    scroll-snap-align: start;
}

.scroll-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.scroll-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.scroll-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.scroll-dot:hover {
    background: rgba(0, 0, 0, 0.35);
    transform: scale(1.1);
}

.scroll-dot.is-active {
    background: var(--primary-aqua);
    transform: scale(1.15);
}

@media (max-width: 640px) {
    .scroller .staff-card-wrapper {
        width: 85vw;
        min-width: 240px;
    }

    .scroll-nav {
        gap: 10px;
    }
}

.staff-card-wrapper {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out, box-shadow 0.3s ease;
}

.staff-card-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

.staff-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
    text-align: center;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.staff-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.staff-card .card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    color: var(--dark-aqua);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 5;
    border: 1px solid rgba(43, 185, 192, 0.25);
}

.staff-img-wrapper {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #f0f9fa 0%, #e0f2f1 50%, #dcedf3 100%);
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.staff-card:hover .staff-img-wrapper img {
    transform: scale(1.06);
}

.staff-img-placeholder {
    font-size: 4rem;
    color: #b0c4c8;
}

.staff-card-body {
    padding: 22px 22px 10px;
    position: relative;
}

.staff-card-body h5 {
    color: var(--dark-aqua);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 4px;
    margin-top: 0;
}

.staff-card-role {
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.staff-card-rank {
    color: #6b7280;
    font-size: 0.82rem;
    margin-bottom: 10px;
}

.staff-card-bio {
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.55;
    padding: 0 8px;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staff-card-footer {
    background: rgba(240, 249, 250, 0.55);
    border-top: 1px solid rgba(43, 185, 192, 0.12);
    padding: 12px 22px;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.staff-card-footer a {
    color: #6b7280;
    font-size: 1.05rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.staff-card-footer a:hover {
    color: var(--primary-aqua);
    transform: translateY(-2px);
}

.staff-search-box {
    max-width: 480px;
    margin: 0 auto 12px;
    position: relative;
}

.staff-search-box input {
    border-radius: 30px;
    border: 1px solid #e1e7ea;
    padding-left: 42px;
    transition: all 0.3s ease;
}

.staff-search-box input:focus {
    border-color: var(--primary-aqua);
    box-shadow: 0 0 0 4px rgba(43, 185, 192, 0.1);
}

.staff-search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Filter pills */
.staff-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.staff-filter-pills .btn {
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 20px;
    transition: all 0.25s ease;
}

.staff-filter-pills .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 185, 192, 0.25);
}

/* Empty state */
.staff-empty-state {
    animation: fadeInScale 0.5s ease-out forwards;
}

/* Staff Profile Modal */
.staff-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.staff-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.staff-modal-container {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.staff-modal-overlay.is-open .staff-modal-container {
  transform: translateY(0);
}

.staff-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--light-aqua, #e0f7fa);
}

.staff-modal-header .staff-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark-aqua, #00838f);
  margin: 0;
}

.staff-modal-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.staff-modal-close:hover {
  background: #e2e8f0;
  color: #334155;
}

.staff-modal-body {
  padding: 24px;
}

.staff-modal-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.staff-modal-image-wrapper {
  flex: 0 0 240px;
}

.staff-modal-image-wrapper img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.staff-modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.staff-modal-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-modal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(43, 185, 192, 0.1);
  color: var(--dark-aqua, #00838f);
  border: 1px solid rgba(43, 185, 192, 0.2);
}

.staff-modal-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark-aqua, #00838f);
  margin: 0;
}

.staff-modal-role {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-aqua, #2bb9c0);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.staff-modal-divider {
  height: 1px;
  background: var(--light-aqua, #e0f7fa);
  margin: 8px 0;
}

.staff-modal-bio {
  color: #334155;
  line-height: 1.8;
  font-size: 0.95rem;
  margin: 0;
  white-space: pre-line;
}

.staff-modal-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.staff-modal-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--dark-aqua, #00838f);
  text-decoration: none;
  font-weight: 500;
}

.staff-modal-contact-item:hover {
  color: var(--primary-aqua, #2bb9c0);
}

.staff-modal-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.staff-modal-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light-aqua, #e0f7fa);
  color: var(--dark-aqua, #00838f);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.25s ease;
  text-decoration: none;
}

.staff-modal-social a:hover {
  background: var(--primary-aqua, #2bb9c0);
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .staff-modal-layout {
    flex-direction: column;
  }
  .staff-modal-image-wrapper {
    flex: 0 0 auto;
    width: 100%;
  }
  .staff-modal-image-wrapper img {
    height: 220px;
  }
}

/* View Profile button */
.staff-view-profile-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-aqua, #2bb9c0), var(--dark-aqua, #00838f));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(43, 185, 192, 0.25);
}

.staff-view-profile-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(43, 185, 192, 0.35);
}

.staff-view-profile-btn:active {
  transform: translateY(0);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .scroller .staff-card-wrapper {
        width: 85vw;
        min-width: 240px;
    }

    .staff-img-wrapper {
        height: 190px;
    }

    .staff-card-body {
        padding: 18px 16px 8px;
    }

    .staff-card-footer {
        padding: 10px 16px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .scroller .staff-card-wrapper {
        width: 90vw;
        min-width: 240px;
    }

    .staff-img-wrapper {
        height: 210px;
    }

    .staff-card-body h5 {
        font-size: 1.05rem;
    }
}

/* ===== Library News ===== */
.scroller {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 4px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
    display: none;
}

.scroller .library-news-card {
    flex: 0 0 auto;
    width: 340px;
    min-width: 260px;
    scroll-snap-align: start;
}

.scroll-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.scroll-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.scroll-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.scroll-dot:hover {
    background: rgba(0, 0, 0, 0.35);
    transform: scale(1.1);
}

.scroll-dot.is-active {
    background: var(--primary-aqua);
    transform: scale(1.15);
}

@media (max-width: 640px) {
    .scroller .library-news-card {
        width: 85vw;
        min-width: 260px;
    }

    .scroll-nav {
        gap: 10px;
    }
}

.library-news-section {
    background: linear-gradient(180deg, #eaf1f7 0%, #e3eff2 100%);
    border-top: 1px solid var(--light-aqua, #e0f7fa);
}

.library-news-card {
    background: #fff;
    border: 1px solid var(--light-aqua, #e0f7fa);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 131, 143, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.library-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 131, 143, 0.14);
    border-color: var(--medium-aqua, #4dd0e1);
}

.library-news-card-image {
    height: 180px;
    overflow: hidden;
}

.library-news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.library-news-card:hover .library-news-card-image img {
    transform: scale(1.06);
}

.library-news-card-body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.library-news-date {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    background: var(--light-aqua, #e0f7fa);
    color: var(--dark-aqua, #00838f);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.library-news-title {
    color: var(--dark-aqua, #00838f);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.library-news-excerpt {
    color: #2c3e50;
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

.library-news-read-more {
    margin-top: auto;
    color: var(--primary-aqua, #2bb9c0);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.library-news-read-more:hover {
    color: var(--dark-aqua, #00838f);
    transform: translateX(4px);
}

.library-news-detail-card {
    background: #fff;
    border: 1px solid var(--light-aqua, #e0f7fa);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(0, 131, 143, 0.06);
}

.library-news-detail-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.library-news-detail-content {
    color: #2c3e50;
    font-size: 1.05rem;
    line-height: 1.8;
}

.library-news-detail-content p {
    margin-bottom: 1rem;
}

/* New-news indicator (pulsing dot + NEW badge) */
.news-new-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: news-pulse 1.6s infinite;
}

@keyframes news-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.news-new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}

.news-new-badge--light {
    position: static;
    display: inline-block;
    vertical-align: middle;
    margin-left: 12px;
    box-shadow: none;
}

@media (max-width: 640px) {
    .library-news-detail-card { padding: 20px; }
}
