/* ============================================================
   MULTI OPAC LANDING PAGE STYLES
   Version: 1.1.0 (Selaras dengan navbar baru)
   Focus: Landing Layout, Integrated Multi-Library Search, Topics Grid
   ============================================================ */

:root {
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --bg-body: #f8f9fa;
    --text-dark: #212529;
    --text-muted: #6c757d;
    
    /* Dynamic Theme Defaults */
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #e7f1ff;
    --secondary-color: #212529;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ============================================================
   NAVBAR CUSTOM - SELARAS DENGAN _NAVBAR_PLUGIN.INC.PHP
   ============================================================ */
.navbar-custom-library {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.navbar-custom-library .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.3px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.navbar-custom-library .brand-logo {
    max-height: 38px;
    width: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

.navbar-custom-library .brand-text {
    display: inline-block;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-custom-library .nav-link {
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-custom-library .nav-link:hover,
.navbar-custom-library .nav-item.active .nav-link {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    color: #ffffff !important;
}

/* Dropdown menu */
.navbar-custom-library .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 220px;
    max-height: 380px;
    overflow-y: auto;
}

.navbar-custom-library .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-custom-library .dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0d6efd;
}

.navbar-custom-library .dropdown-item.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
}

/* Library Switcher Dropdown */
.navbar-custom-library .lib-select-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
}

/* Member Dropdown */
.navbar-custom-library .member-dropdown .dropdown-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    color: white !important;
}

.navbar-custom-library .member-dropdown .dropdown-toggle .member-name {
    display: inline-block;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Toggler Mobile */
.navbar-custom-library .navbar-toggler {
    border: none;
    box-shadow: none;
    color: white;
}

.navbar-custom-library .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Navbar */
@media (max-width: 992px) {
    .navbar-custom-library .navbar-brand .brand-text {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .navbar-custom-library .navbar-brand .brand-text {
        max-width: 100px;
        font-size: 0.95rem;
    }
    .navbar-custom-library .brand-logo {
        max-height: 30px;
    }
    .navbar-custom-library .nav-link {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .navbar-custom-library .navbar-brand .brand-text {
        max-width: 70px;
        font-size: 0.85rem;
    }
    .navbar-custom-library .brand-logo {
        max-height: 25px;
    }
}

/* ============================================================
   LAYOUT & CONTAINERS
   ============================================================ */
.container {
    max-width: 1200px;
}

.content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================================
   HERO HEADER
   ============================================================ */
.landing-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 3.5rem 0 4rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.landing-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ============================================================
   INTEGRATED SEARCH BOX & FORM CONTROLS
   ============================================================ */
.integrated-search-box {
    background: #ffffff;
    border-radius: 50px;
    padding: 5px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    border: 2px solid transparent;
    transition: var(--transition);
    width: 100%;
}

.integrated-search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(13, 110, 253, 0.25);
}

.search-input-group {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}

.integrated-search-box .form-control {
    border: none;
    box-shadow: none !important;
    background: transparent;
    font-size: 1rem;
    padding-left: 0.75rem;
    width: 100%;
}

.select-library-wrapper {
    flex: 0 0 220px;
    max-width: 230px;
    border-left: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.integrated-search-box .form-select {
    border: none;
    box-shadow: none !important;
    background-color: transparent;
    font-weight: 500;
    color: #495057;
    font-size: 0.95rem;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    padding-right: 2rem;
}

.integrated-search-box .btn-search {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 40px;
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.integrated-search-box .btn-search:hover {
    filter: brightness(0.9);
}

.btn-theme {
    background-color: var(--secondary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-theme:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #ffffff;
}

/* ============================================================
   LIBRARY SWITCHER CARD
   ============================================================ */
.library-switcher-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    backdrop-filter: blur(10px);
}

.library-switcher-card .form-select {
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-weight: 500;
}

/* ============================================================
   SECTION HEADER & TITLES
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* ============================================================
   TOPIC GRID SYSTEM
   ============================================================ */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 0;
    margin: 2rem 0;
    list-style: none;
}

.topic-grid li {
    margin: 0;
}

.topic-grid li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.5rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid #eef2f5;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-dark);
    height: 100%;
}

.topic-grid li a:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.topic-grid li a img {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    object-fit: contain;
}

.topic-grid li a span {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

/* ============================================================
   CARD MODERN & BOOK COVERS
   ============================================================ */
.card-modern {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 0, 0, 0.05);
}

.card-modern .card-body {
    padding: 1.25rem;
}

.book-cover {
    height: 180px;
    background: var(--primary-light, #f1f3f5);
    color: var(--primary-color, #0d6efd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   BADGES & RANK INDICATORS
   ============================================================ */
.library-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 50px;
    margin-top: 4px;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid #eef2f5;
    box-shadow: var(--shadow-sm);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.8;
}

/* ============================================================
   AVATAR & LIBRARIANS
   ============================================================ */
.avatar-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--primary-light, #f1f3f5);
    color: var(--primary-color, #0d6efd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 0.75rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.landing-footer {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 2.5rem 0 1.5rem;
    margin-top: 4rem;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 991.98px) {
    .landing-header {
        text-align: center;
        padding: 2.5rem 0;
    }
    .landing-header h1 {
        font-size: 1.75rem;
    }
    .library-switcher-card {
        margin-top: 1rem;
    }
    .select-library-wrapper {
        flex: 0 0 160px;
        max-width: 170px;
    }
}

@media (max-width: 767.98px) {
    .integrated-search-box {
        flex-direction: column;
        border-radius: 16px;
        padding: 12px;
        gap: 10px;
    }
    .search-input-group {
        width: 100%;
    }
    .select-library-wrapper {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        border-left: none;
        border-top: 1px solid #dee2e6;
        padding-left: 0;
        padding-top: 8px;
    }
    .integrated-search-box .btn-search {
        width: 100%;
        border-radius: 10px;
    }
    .section-title {
        font-size: 1.1rem;
    }
    .topic-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    .topic-grid li a {
        padding: 0.75rem 0.3rem;
    }
    .topic-grid li a img {
        width: 28px;
        height: 28px;
    }
    .topic-grid li a span {
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .topic-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    .topic-grid li a {
        padding: 0.5rem 0.2rem;
    }
    .topic-grid li a img {
        width: 24px;
        height: 24px;
    }
    .topic-grid li a span {
        font-size: 0.6rem;
    }
    .stat-value {
        font-size: 1.3rem;
    }
}

/* ============================================================
   DROPDOWN OVERRIDES
   ============================================================ */
.navbar .container,
.navbar-collapse,
.navbar-nav {
    overflow: visible !important;
}

.navbar-custom-library .dropdown-menu {
    display: none !important;
}

.navbar-custom-library .dropdown-menu.show {
    display: block !important;
}

/* ============================================================
   MEMBER BASKET PAGE
   ============================================================ */
.basket-page-wrapper .table th {
    font-weight: 600;
    color: var(--secondary-color);
}

.basket-page-wrapper .table td {
    vertical-align: middle;
}

.basket-page-wrapper .badge {
    font-weight: 500;
}

.memberBasketInfo {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.memberBasketAction .btn {
    margin-right: 4px;
}