/* Global Elegant Typography Reset */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --kemenkes-green: #009688;
    --kemenkes-green-dark: #00796b;
    --kemenkes-yellow: #FFB300;
}

body {
    font-family: var(--font-body) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #333;
}

h1,
h2,
h3,
h4,
h5,
h6,
.modal-title,
.header-text-animated,
.navigation a,
.top-nav a,
.btn {
    font-family: var(--font-heading) !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em;
}

.navigation a,
.top-nav a {
    transition: all 0.3s ease;
}

/* Elegant Modern Search Bar Redesign & Layout Fix */
.search {
    position: relative;
    max-width: 600px;
    flex: 1;
    margin: 0 30px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search__inner {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 2px 5px 2px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search:focus-within .search__inner {
    background: rgba(255, 255, 255, 0.98);
    border-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 5px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.search__text {
    width: 100%;
    height: 46px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none !important;
    transition: color 0.3s ease;
}

.search:focus-within .search__text {
    color: #1a237e;
}

.search__text::placeholder {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

.search:focus-within .search__text::placeholder {
    color: #a0a0a0;
}

.search__helper {
    position: relative;
    width: 42px;
    height: 42px;
    background: #fff;
    border: none;
    border-radius: 100%;
    color: #1a237e;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search:focus-within .search__helper {
    background: #1a237e;
    color: #fff;
    transform: scale(1.05);
}

.search__helper:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Micro-interaction: Shine effect on focus */
.search__inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.search:focus-within .search__inner::after {
    left: 100%;
}

/* Top Nav Layout Alignment */
.top-nav {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    margin-left: auto !important;
    padding: 0 !important;
    list-style: none !important;
    height: 100% !important;
}

.top-nav>li {
    padding: 0 10px;
    display: flex;
    align-items: center;
    height: 100%;
}

.top-nav>li>a:hover {
    color: var(--kemenkes-green) !important;
    transform: scale(1.1);
}

/* Advance Search Pill Redesign */
.btn-advance-search {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50px !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 8px 24px !important;
    font-family: 'Inter', sans-serif !important;
    text-transform: capitalize !important;
    letter-spacing: 0.5px !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.btn-advance-search:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.btn-advance-search::before {
    content: '\f15c';
    font-family: 'Material-Design-Iconic-Font';
    font-size: 16px;
}

/* Responsive Fixes */
@media (max-width: 991px) {
    .header {
        height: auto !important;
        min-height: 72px;
        padding: 10px 1rem !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }

    .header__logo {
        margin-bottom: 0 !important;
    }

    .search {
        order: 3;
        width: 100%;
        flex: none;
        margin: 15px 0 5px 0 !important;
        max-width: 100%;
    }

    .search__text {
        height: 40px;
        font-size: 14px;
    }

    .top-nav {
        order: 2;
        margin-left: 0 !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .header__logo span:last-child {
        display: none;
        /* Hide submenu name on very small screens to fit buttons */
    }
}

/* --- FULL ANIMATIF ENGINE --- (Sidebar & Navigation Only) */

/* Keyframes */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Global Content Animation - REMOVED per user request for "biasa saja" content area */
/* .content__inner, .todo, section#content {
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
} */

/* Standard Content Area - Animations removed per user request */
.card {
    transition: none !important;
    animation: none !important;
}

.card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Sidebar Navigation Staggered Animation - KEPT for premium feel */
.navigation>li {
    opacity: 0;
    animation: slideInLeft 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.navigation>li:nth-child(1) {
    animation-delay: 0.1s;
}

.navigation>li:nth-child(2) {
    animation-delay: 0.2s;
}

.navigation>li:nth-child(3) {
    animation-delay: 0.3s;
}

.navigation>li:nth-child(4) {
    animation-delay: 0.4s;
}

.navigation>li:nth-child(5) {
    animation-delay: 0.5s;
}

.navigation a:hover {
    padding-left: 20px !important;
    background: var(--kemenkes-green) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 150, 136, 0.3);
}

.navigation li.active>a {
    border-left: 5px solid var(--kemenkes-yellow) !important;
}

/* Right-side Widgets Animation (as requested) */
.col-md-4 .card {
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards,
        floating 4s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.col-md-4 .card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
    border-color: var(--kemenkes-green) !important;
}

/* Standard Content Area (Middle) - Animations remain removed */
.col-md-8 .card {
    transition: none !important;
    animation: none !important;
}

/* Listview Item Interaction (New Books) */
.listview__item {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.listview__item:hover {
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.listview__item img {
    transition: none !important;
}

.listview__item:hover img {
    transform: none !important;
}

/* Social Links Hover Animation */
.social-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.social-item:hover {
    transform: scale(1.05) translateX(5px);
}

.social-item:hover .icon-box {
    transform: rotate(360deg);
}

/* Modal Smooth Transition */
.modal.fade .modal-dialog {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Page Loader Fade */
.page-loader {
    transition: opacity 0.6s ease, visibility 0.6s;
}

/* Image Shimmer Effect for Loading state placeholder */
.avatar-img {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

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

    100% {
        background-position: -200% 0;
    }
}