@import url('../../../../css/core.css');

/* =====================================================
   ROOT VARIABLES
===================================================== */
:root {
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --secondary: #020617;
    --accent: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    --text: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
    --card: #ffffff;

    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

/* =====================================================
   BASE
===================================================== */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   NAVBAR
===================================================== */
.navbar {
    background: var(--secondary) !important;
    box-shadow: 0 8px 28px rgba(2, 6, 23, 0.45);
    position: relative;
    z-index: 9999;
}

.navbar-brand,
.navbar .nav-link {
    color: #e5e7eb !important;
    font-size: 14px;
}

.navbar .nav-link:hover {
    color: #ffffff !important;
}

/* =====================================================
   HEADER / HERO
===================================================== */
.c-header {
    min-height: 70vh;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.35), transparent 40%),
        linear-gradient(135deg, #020617, #020617);
}

/* =====================================================
   SEARCH (HERO)
===================================================== */
.search {
    margin: -70px 0 60px;
    position: relative;
    z-index: 10;
}

.search .card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.18);
}

.search input[type="text"] {
    height: 52px;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
}

.search input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
    outline: none;
}

/* =====================================================
   SECTION TITLE
===================================================== */
.section-title {
    text-align: center;
    margin: 70px 0 40px;
}

.section-title h2,
.section-title h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-title p {
    max-width: 720px;
    margin: auto;
    font-size: 14px;
    color: var(--muted);
}

.section-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    margin: 18px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* =====================================================
   SUBJECT / KATEGORI
===================================================== */
.subject-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px 0 80px;
}

.subject-list a {
    width: 140px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
}

.subject-list .icon-wrap {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff, #f0fdf4);
    box-shadow: 0 18px 35px rgba(2, 6, 23, 0.15);
    transition: .35s ease;
}

.subject-list img {
    width: 46px;
}

.subject-list span {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.subject-list a:hover .icon-wrap {
    transform: translateY(-10px);
    box-shadow: 0 35px 60px rgba(2, 6, 23, 0.3);
}

/* =====================================================
   FILTER TAG
===================================================== */
.filter-tags,
.search-type {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 40px;
}

.filter-tags a,
.search-type a {
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    transition: .25s ease;
}

.filter-tags a:hover,
.search-type a.active {
    background: linear-gradient(135deg, var(--primary), #1e40af);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(37,99,235,.35);
}

/* =====================================================
   CARD / KOLEKSI
===================================================== */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid #eef2f7;
    transition: .35s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 70px rgba(2, 6, 23, 0.25);
}

.card-body {
    padding: 16px;
}

.card-text.title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.card-text,
.card small {
    font-size: 12px;
    color: var(--muted);
}

/* =====================================================
   TAGS
===================================================== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tags a {
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
}

.tag-author  { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.tag-subject { background: linear-gradient(135deg, #22c55e, #15803d); }
.tag-year    { background: linear-gradient(135deg, #64748b, #334155); }
.tag-isbn    { background: linear-gradient(135deg, #f59e0b, #b45309); }

/* =====================================================
   FOOTER
===================================================== */
footer {
    background: var(--secondary);
    color: #cbd5f5;
    padding: 50px 0 28px;
}

footer h6 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 14px;
}

footer p,
footer li {
    font-size: 13px;
    line-height: 1.7;
}

footer a {
    color: #e5e7eb;
    text-decoration: none;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.12);
    margin: 32px 0;
}

.footer-bottom {
    font-size: 12px;
    color: #94a3b8;
}

/* =====================================================
   RESPONSIVE (≤ 768px)
===================================================== */
@media (max-width: 768px) {

    /* NAVBAR */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 12px;
        right: 12px;
        background: var(--secondary);
        padding: 22px;
        border-radius: 18px;
        box-shadow: 0 30px 60px rgba(0,0,0,.55);
    }

    .navbar-collapse .nav-link {
        padding: 10px 0;
    }

    /* SECTION */
    .section-title h2 {
        font-size: 20px;
    }

    /* SUBJECT */
    .subject-list {
        gap: 18px;
    }

    .subject-list a {
        width: 120px;
    }

    /* FOOTER */
    footer {
        text-align: center;
        padding: 48px 20px 32px;
    }

    footer .row > div {
        margin-bottom: 32px;
    }

    footer form {
        margin-top: 24px;
    }

    footer .input-group {
        max-width: 320px;
        margin: 12px auto 0;
    }

    footer input[type="text"],
    footer button {
        height: 42px;
        font-size: 13px;
    }

    footer input[type="text"] {
        border-radius: 999px 0 0 999px;
    }

    footer button {
        border-radius: 0 999px 999px 0;
    }

    footer small {
        display: block;
        margin-top: 10px;
        font-size: 12px;
        color: #9ca3af;
    }
}
