.tengah{
    text-align: center;
}
/* --- CSS LIVE CHAT --- */
.chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 85px;
    background-color: #007bff;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    text-align: center;
    line-height: 55px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.3s;
}

.chat-bubble:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.chat-window {
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    /* display: none; */
    overflow: hidden;
    border: 1px solid #ddd;
}

.chat-header {
    background: #007bff;
    color: white;
    padding: 12px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    padding: 15px;
    height: 300px;
    overflow-y: auto;
    background: #fdfdfd;
}

.chat-footer {
    padding: 10px;
    border-top: 1px solid #eee;
    background: white;
}

.msg-wrap {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.msg-user {
    align-items: flex-end;
}

.msg-admin {
    align-items: flex-start;
}

.msg-text {
    padding: 8px 12px;
    border-radius: 14px;
    max-width: 85%;
    font-size: 13px;
    position: relative;
}

/* Style khusus untuk gambar di dalam pesan */
.msg-text img {
    max-width: 100%;
    /* Gambar tidak akan lebih lebar dari balon chat */
    height: auto;
    /* Menjaga rasio foto agar tidak gepeng */
    border-radius: 10px;
    /* Membuat sudut gambar melengkung lembut */
    display: block;
    margin-top: 5px;
    cursor: pointer;
    /* Memberi indikasi bisa diklik */
    transition: 0.3s;
}

.msg-text img:hover {
    opacity: 0.8;
    /* Efek saat kursor diarahkan ke gambar */
}

/* Memastikan balon chat menyesuaikan jika ada gambar */
.msg-text {
    word-wrap: break-word;
    display: inline-block;
}

.msg-user .msg-text {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 2px;
}

.msg-admin .msg-text {
    background: #e9ebee;
    color: #333;
    border-bottom-left-radius: 2px;
}

.msg-time {
    font-size: 9px;
    color: #aaa;
    margin-top: 3px;
}

.form-chat-reg label {
    font-size: 12px;
    color: #666;
}

.form-chat-reg .form-control {
    margin-bottom: 8px;
    height: 34px;
    font-size: 13px;
}
/* --- END CSS LIVE CHAT --- */


/* --- START FOOTER --- */
/* BACKGROUND */
.footer-modern {
    background: linear-gradient(135deg, #f4fbfa 0%, #e6f5f4 100%);
    color: #333;
}

/* TITLE */
.footer-modern .widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #047d78;
}

/* TEXT */
.footer-modern p {
    font-size: 13px;
    line-height: 1.6;
}

/* LINK */
.footer-modern a {
    color: #333;
    transition: 0.3s;
    text-decoration: none;
}

.footer-modern a:hover {
    color: #047d78;
}

/* SOCIAL */
.footer-social a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(4,125,120,0.1);
    color: #047d78;
    margin-right: 6px;
}

.footer-social a:hover {
    background: #047d78;
    color: #fff;
}

/* POST */
.footer-post {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.footer-post img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

/* TITLE FIX (NO CUT BUG) */
.footer-post-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

/* MENU */
.footer-menu,
.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-menu li,
.footer-contact li {
    margin-bottom: 8px;
    font-size: 13px;
}

.footer-contact i {
    margin-right: 6px;
    color: #047d78;
}

/* BOTTOM */
.footer-bottom-modern {
    background: #e0f2f1;
    font-size: 12px;
}

/* --- END FOOTER --- */


/* CARD */
.book-card {
    background: #fff;
    border-radius: 7px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 5px;
}

/* SHADOW + HOVER */
.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* COVER */
.book-cover {
    height: 230px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

/* ZOOM EFFECT */
.book-card:hover img {
    transform: scale(1.05);
}

/* INFO */
.book-info {
    padding: 10px;
}

/* TITLE */
.book-title {
    font-size: 13px;
    font-weight: 600;
    height: 38px;
    overflow: hidden;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 baris */
    -webkit-box-orient: vertical;
}

/* AUTHOR */
.book-author {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.book-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #28a745;
    color: #fff;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
}

.section-buku {
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}


.empty-buku {
    padding: 40px 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px dashed #ddd;
}

/* BASE */
.skeleton {
    background: #eee;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

/* SHIMMER */
.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150px;
    height: 100%;
    width: 150px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% { left: -150px; }
    100% { left: 100%; }
}

/* CARD WRAPPER */
.skeleton-card {
    background: #fff;
    border-radius: 7px;
    padding: 5px;
}

/* COVER DEFAULT */
.skeleton-cover {
    height: 230px;
}

/* USER COVER (LEBIH PENDEK) */
.skeleton-cover.user {
    height: 180px;
}

/* TEXT */
.skeleton-text {
    height: 12px;
    margin-top: 10px;
}

.skeleton-text.small {
    width: 60%;
}

.skeleton-text.center {
    margin-left: auto;
    margin-right: auto;
}

/* Start Card Modular*/


/* VARIANT: TOP BOOK */
.book-card.top-book .book-badge {
    background: #ff9800;
}

/* VARIANT: MAHASISWA */
.book-card.user-card .book-cover {
    height: 180px;
}

.book-card.user-card img {
    object-fit: cover;
}

.book-card.user-card .book-title {
    text-align: center;
}

.book-card.user-card .book-author {
    text-align: center;
}

/* tambahan info */
.book-meta {
    font-size: 11px;
    color: #888;
    text-align: center;
}

/* BASE BADGE */

/* WRAPPER */
.thumb-info {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

/* WRAPPER */
.thumb-info-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* portrait */
    overflow: hidden;
}

/* IMAGE */
.thumb-info-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* HOVER ZOOM */
.thumb-info:hover img {
    transform: scale(1.05);
}

/* OVERLAY TITLE */
.thumb-info-title {
    position: absolute;
    left: 0;
    bottom: 1%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px;
    max-width: 90%;
    border-radius: 0 6px 6px 0;
    transition: 0.3s;
}

/* NAME */
.thumb-info-inner {
    display: block;
    font-size: 12px;
    font-weight: 600;
}

/* NIM */
.thumb-info-type {
    display: inline-block;
    font-size: 10px;
    margin-top: 2px;
    padding: 2px 5px;
    background: #047d78;
    border-radius: 5px;
    text-transform: uppercase;
}

/* RANK BADGE (tetap pakai sebelumnya) */
.rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
}

/* TOP 3 */
.rank-1 { background: linear-gradient(135deg,#FFD700,#FFC107); color:#000; }
.rank-2 { background: linear-gradient(135deg,#C0C0C0,#9E9E9E); color:#000; }
.rank-3 { background: linear-gradient(135deg,#CD7F32,#A0522D); }

/* End Card Modular*/


/* SECTION PENGUMUMAN & BERITA*/
.section-content-carousel {
    background: #ffffff;
}

/* HEADER */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header .title {
    margin: 0;
}

/* ACTION */
.btn-lihat-semua {
    font-size: 13px;
    font-weight: 600;
    color: #047d78;
    border: 1px solid #047d78;
    padding: 6px 14px;
    border-radius: 20px;
    transition: 0.3s;
    text-decoration: none;
}

.btn-lihat-semua:hover {
    background: #047d78;
    color: #fff;
}

.btn-lihat-semua i {
    transition: 0.3s;
}

.btn-lihat-semua:hover i {
    margin-left: 4px;
}

/* ===== CARD ===== */
.content-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
}

.content-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* IMAGE */
.content-thumb {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.content-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
    border-radius: 12px 12px 0 0; /* rounded atas */
}

.content-card:hover img {
    transform: scale(1.05);
}

/* OVERLAY */
.content-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transition: 0.3s;
}

.content-card:hover .content-overlay {
    opacity: 1;
}

/* CONTENT */
.content-info {
    padding: 12px;
}

/* META */
.content-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 6px;
}

/* TITLE */
.content-title {
    font-size: 14px;
    font-weight: 600;
    height: 40px;
    overflow: hidden;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* DESC */
.content-desc {
    font-size: 12px;
    color: #555;
    height: 45px;
    overflow: hidden;
}

/* EMPTY */
.empty-content {
    padding: 40px;
    border: 1px dashed #ddd;
    border-radius: 10px;
}

/*Section Funfact*/

/* SECTION BACKGROUND */
.section-funfact {
    background: linear-gradient(135deg, #00baae, #00a79c);
    color: #fff;


}

/* CARD */
.funfact-card {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    backdrop-filter: blur(6px);
    transition: 0.3s;
}

/* HOVER */
.funfact-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

/* ICON */
.funfact-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.funfact-icon i {
    font-size: 22px;
}

/* NUMBER */
.funfact-card h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 5px 0;
}

/* LABEL */
.funfact-card p {
    font-size: 13px;
    opacity: 0.9;
}

/* HIGHLIGHT CARD (opsional) */
.funfact-card.highlight {
    background: rgba(255,255,255,0.15);
}

.funfact-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.funfact-card.show {
    opacity: 1;
    transform: translateY(0);
}


/* BASE */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal.show,
.reveal-left.show,
.reveal-right.show {
    opacity: 1;
    transform: translate(0,0);
}
