.portal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff; /* ubah jika background navbar terang */
    white-space: nowrap;
}

.header-logo img {
    display: block;
}

.work .thumbnail .image img {
    width: 100%;
    height: 250px;
    border-radius: 90px;
    object-fit: scale-down !important;
}

.work .thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px !important;
}

.work .info {
    padding: 15px 0 !important;
}

.work .title {
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 48px !important;
}

.work .desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    min-height: 70px;
}

.btn-outline-primary {
    border-radius: 6px !important;
}

/* --- Search and Filter Bar (Doc Controls) --- */
.search-box {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 15px;
    background-color: var(--white);
    width: 350px;
    height: 52px;
}

.search-icon {
    color: var(--grey-text);
    margin-right: 10px;
}

.search-input {
    border: none !important;
    outline: none !important;
    width: 0px;
    min-height: 26px !important;
    background: transparent;
    font-size: 1em;
    color: var(--text-color);
    padding: 5px 0;
    font-family: inherit;
}

.search-input::placeholder {
    color: #888;
    font-style: italic;
}

.filter-dropdown {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: var(--white);
    padding: 8px 15px;
    width: 200px;
    height: 52px;
    position: relative;
}

.filter-dropdown select {
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 1em;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0;
    height: 100%;
    color: var(--grey-text);
}

.filter-dropdown::after {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--grey-text);
}

.dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--grey-text);
}

.btn-filter {
    background-color: var(--main-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-filter:hover {
    background-color: #004aad;
    transform: translateY(-2px);
}

/* --- Document Grid --- */
.document-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    justify-content: center;
    max-width: 1500px;
    margin: 0 auto;
}

.doc-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.doc-filter-form {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doc-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--white);
    padding: 10px 30px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    max-width: 500px;
    flex: 0 0 80%;
}

.doc-card p {
    border-top: 2px solid #ddd;
    padding-top: 20px;
}

.doc-card img {
    width: 150px;
    margin-bottom: 15px;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.pdf-icon {
    width: 80px;
    height: auto;
    margin: 0 auto 40px;
    display: block;
}

.doc-title {
    font-size: 1.2em;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 600;
    text-align: left;
}

.doc-meta {
    display: flex;
    justify-content: left;
    gap: 20px;
    font-size: 0.9em;
    color: var(--grey-text);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.meta-icon {
    margin-right: 5px;
}

/* --- Download Button --- */
.download-btn {
    display: inline-block;
    background-color: var(--main-blue);
    color: var(--white);
    text-decoration: none;
    padding: 0px 15px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #0056b3;
    color: white;
}

/* --- "Lihat Dokumen Lain" Link --- */
.more-docs-link {
    transform: translateY(-3px);
    color: #0045a3;
    margin-top: 40px;
}

.lihat-lain-link {
    color: var(--main-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: transform 0.3s, box-shadow 0.3s;
}

.lihat-lain-link:hover {
    color: #0056b3;
}

/* SCROLL TENTANG */

@media (max-width: 768px) {
    .portal-title {
        font-size: 1rem;
    }
    /* Dokumen */
    .document-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-behavior: smooth;
        gap: 15px;
        padding: 10px 10px 10px 10px;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        align-items: stretch;
        overflow-anchor: none;
    }

    .doc-card {
        flex: 0 0 80%;
        scroll-snap-align: start;
        min-width: 280px;
        max-width: 90%;
    }

    .doc-controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .search-box {
        width: 100%;
        max-width: 350px;
    }

    .document-grid::-webkit-scrollbar {
        height: 6px;
    }
    .document-grid::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
    }

    .scrollable-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-behavior: smooth;
        gap: 20px;
        padding-bottom: 10px;
    }

    .scrollable-row .col {
        flex: none;
        max-width: 100%;
    }
}
