/* Librarian Page — modern, elegant & responsive */

.librarian-section {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.librarian-page-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Intro panel */
.librarian-intro {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
    border: 1px solid #e8edf3;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
}

.librarian-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1d4ed8, #6366f1, #8b5cf6);
}

.librarian-intro__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.librarian-intro__text {
    flex: 1;
    min-width: 200px;
}

.librarian-intro__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem;
    line-height: 1.35;
}

.librarian-intro__desc {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.librarian-intro__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1d4ed8, #4f46e5);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.28);
}

/* Grid */
.librarian-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Card */
.librarian-card-modern {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid #e8edf3;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.librarian-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.librarian-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
}

.librarian-card-modern:hover::before {
    opacity: 1;
}

/* Avatar */
.librarian-avatar-wrapper {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.librarian-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    background: #f1f5f9;
}

/* No-photo fallback */
.librarian-avatar.no-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #94a3b8;
}
.librarian-avatar-wrapper.no-photo .librarian-avatar.no-photo { 
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #6366f1;
}

/* Card body */
.librarian-card-body {
    margin-top: 1.125rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.librarian-position-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.librarian-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    word-break: break-word;
    margin: 0.125rem 0 0;
}

.librarian-email {
    font-size: 0.82rem;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    word-break: break-all;
    transition: color 0.2s ease;
    padding: 0.25rem 0;
}

.librarian-email:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.librarian-email i {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.librarian-email:hover i {
    color: #1d4ed8;
}

/* Social links */
.librarian-social-list {
    margin-top: 0.75rem;
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.librarian-social-list .social-label {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.librarian-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.librarian-social-links li {
    margin: 0;
}

.librarian-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.3rem 0.65rem;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    max-width: 100%;
    word-break: break-all;
}

.librarian-social-link:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
    text-decoration: none;
}

.librarian-social-link i {
    flex-shrink: 0;
    font-size: 0.85rem;
}

/* Empty state */
.librarian-empty {
    text-align: center;
    padding: 3.5rem 2rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px dashed #cbd5e1;
}

.librarian-empty__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
}

.librarian-empty__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 0.5rem;
}

.librarian-empty__desc {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    .librarian-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .librarian-intro {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem 1.25rem 1.5rem;
        gap: 1rem;
    }

    .librarian-intro__badge {
        align-self: flex-start;
    }

    .librarian-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .librarian-card-modern {
        padding: 1.5rem 1.25rem 1.25rem;
        border-radius: 16px;
    }

    .librarian-avatar-wrapper {
        width: 96px;
        height: 96px;
    }

    .librarian-name {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .librarian-page-wrapper {
        padding: 0;
    }

    .librarian-intro {
        border-radius: 16px;
        margin-bottom: 1.25rem;
    }

    .librarian-intro__title {
        font-size: 1.05rem;
    }

    .librarian-intro__desc {
        font-size: 0.85rem;
    }

    .librarian-card-modern:hover {
        transform: translateY(-3px);
    }
}
