/* =====================================================
   FINANCE ASSISTANT
   NEWS & UPDATE
   File : /news/style.css
===================================================== */


/* =====================================================
   GLOBAL
===================================================== */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background: #ffffff;
    color: #111827;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =====================================================
   NEWS HEADER
===================================================== */

.news-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;
}

.news-header-inner {
    width: 100%;
    max-width: 1200px;

    min-height: 88px;

    margin: 0 auto;
    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


/* =====================================================
   HAMBURGER
===================================================== */

.news-menu-button {
    width: 48px;
    height: 48px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 12px;

    background: transparent;

    color: #6b7280;

    font-size: 31px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.news-menu-button:hover {
    background: #f3f4f6;
    color: #111827;
}

.news-menu-button:active {
    transform: scale(0.94);
}


/* =====================================================
   BRAND
===================================================== */

.news-brand {
    min-width: 0;

    flex: 1;

    display: flex;
    align-items: center;

    gap: 13px;
}

.news-brand-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    object-fit: contain;

    border-radius: 10px;
}

.news-brand-title {
    overflow: hidden;

    color: #111827;

    font-size: 27px;
    font-weight: 700;

    line-height: 1.2;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =====================================================
   NEWS HOME BUTTON
===================================================== */

.news-home-button {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    font-size: 27px;
    line-height: 1;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.news-home-button:hover {
    background: #f3f4f6;
}

.news-home-button:active {
    transform: scale(0.94);
}


/* =====================================================
   MENU OVERLAY
===================================================== */

.news-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;

    background: rgba(17, 24, 39, 0.28);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


/*
   Ketika menu dibuka, app.js dapat menambahkan:

   body.news-menu-open
*/

body.news-menu-open {
    overflow: hidden;
}

body.news-menu-open .news-menu-overlay {
    opacity: 1;
    visibility: visible;
}


/* =====================================================
   NAVIGATION DRAWER
===================================================== */

.news-drawer {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    z-index: 1100;

    width: min(330px, 88vw);

    padding: 24px;

    background: #ffffff;

    border-right: 1px solid #e5e7eb;

    box-shadow:
        12px 0 35px rgba(17, 24, 39, 0.10);

    overflow-y: auto;

    transform: translateX(-105%);

    transition:
        transform 0.28s ease;
}


/*
   Drawer terbuka.
*/

body.news-menu-open .news-drawer {
    transform: translateX(0);
}


/* =====================================================
   DRAWER HEADER
===================================================== */

.news-drawer-header {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 8px 4px 22px;

    margin-bottom: 12px;

    border-bottom: 1px solid #e5e7eb;
}

.news-drawer-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    object-fit: contain;

    border-radius: 10px;
}

.news-drawer-header strong {
    display: block;

    color: #111827;

    font-size: 17px;
    font-weight: 700;

    line-height: 1.3;
}

.news-drawer-header span {
    display: block;

    margin-top: 2px;

    color: #6b7280;

    font-size: 13px;
}


/* =====================================================
   DRAWER NAVIGATION
===================================================== */

.news-drawer-nav {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.news-drawer-link {
    min-height: 50px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 11px 13px;

    border-radius: 11px;

    color: #374151;

    font-size: 15px;
    font-weight: 500;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.news-drawer-link span:first-child {
    width: 26px;

    flex: 0 0 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.news-drawer-link:hover {
    background: #f3f4f6;

    color: #111827;
}

.news-drawer-link.active {
    background: #eff6ff;

    color: #2563eb;

    font-weight: 600;
}


/* =====================================================
   MAIN
===================================================== */

.news-main {
    width: 100%;

    min-height: calc(100vh - 88px);
}

.news-content {
    width: 100%;
    max-width: 920px;

    margin: 0 auto;

    padding: 44px 28px 70px;
}


/* =====================================================
   LOADING
===================================================== */

.news-loading {
    min-height: 240px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #6b7280;

    text-align: center;
}

.news-loading p {
    margin: 0;

    font-size: 15px;
}


/* =====================================================
   FOCUS / ACCESSIBILITY
===================================================== */

.news-menu-button:focus-visible,
.news-home-button:focus-visible,
.news-brand:focus-visible,
.news-drawer-link:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}


/* =====================================================
   SCROLLBAR
===================================================== */

.news-drawer {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.news-drawer::-webkit-scrollbar {
    width: 6px;
}

.news-drawer::-webkit-scrollbar-track {
    background: transparent;
}

.news-drawer::-webkit-scrollbar-thumb {
    background: #d1d5db;

    border-radius: 10px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 700px) {

    .news-header-inner {
        min-height: 76px;

        padding: 0 16px;

        gap: 10px;
    }


    .news-menu-button {
        width: 44px;
        height: 44px;

        font-size: 29px;
    }


    .news-brand {
        gap: 10px;
    }


    .news-brand-icon {
        width: 38px;
        height: 38px;

        flex-basis: 38px;

        border-radius: 9px;
    }


    .news-brand-title {
        font-size: 22px;
    }


    .news-home-button {
        width: 44px;
        height: 44px;

        flex-basis: 44px;

        font-size: 24px;
    }


    .news-content {
        padding: 30px 18px 55px;
    }


    .news-main {
        min-height: calc(100vh - 76px);
    }

}


@media (max-width: 420px) {

    .news-header-inner {
        padding: 0 12px;
    }


    .news-brand-title {
        font-size: 20px;
    }


    .news-brand-icon {
        width: 36px;
        height: 36px;

        flex-basis: 36px;
    }


    .news-content {
        padding-left: 15px;
        padding-right: 15px;
    }


    .news-drawer {
        width: min(310px, 88vw);

        padding: 20px;
    }

}


/* =====================================================
   ARTICLE STYLES
   -----------------------------------------------------
   Style khusus halaman artikel akan ditambahkan
   di bawah bagian ini.
===================================================== */
/* =====================================================
   NEWS ARTICLE
===================================================== */

/* -----------------------------------------------------
   ARTICLE LIST
----------------------------------------------------- */

.news-article-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.news-article-card {
    display: flex;
    gap: 22px;

    padding: 20px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;

    text-decoration: none;
    color: inherit;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.news-article-card:hover {
    transform: translateY(-2px);

    border-color: #d1d5db;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.07);
}

.news-article-card-image {
    flex: 0 0 220px;

    width: 220px;
    height: 145px;

    overflow: hidden;

    border-radius: 14px;

    background: #f3f4f6;
}

.news-article-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.news-article-card-body {
    display: flex;
    flex-direction: column;

    min-width: 0;
    flex: 1;
}

.news-article-card-date {
    margin-bottom: 7px;

    font-size: 13px;
    line-height: 1.4;

    color: #6b7280;
}

.news-article-card-title {
    margin: 0 0 9px;

    font-size: 21px;
    line-height: 1.35;
    font-weight: 700;

    color: #111827;
}

.news-article-card-excerpt {
    margin: 0;

    font-size: 15px;
    line-height: 1.7;

    color: #4b5563;
}

.news-article-card-more {
    display: inline-flex;
    align-items: center;

    width: fit-content;

    margin-top: 13px;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;

    color: #2563eb;
}


/* -----------------------------------------------------
   LOAD MORE
----------------------------------------------------- */

.news-load-more {
    display: flex;
    justify-content: center;

    margin-top: 34px;
}

.news-load-more button {
    appearance: none;

    padding: 11px 20px;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    background: #ffffff;

    font: inherit;
    font-size: 14px;
    font-weight: 600;

    color: #374151;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.news-load-more button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.news-load-more button:active {
    transform: translateY(1px);
}

.news-load-more button:disabled {
    opacity: 0.55;
    cursor: default;
}


/* -----------------------------------------------------
   ARTICLE DETAIL
----------------------------------------------------- */

.news-article {
    max-width: 920px;

    margin: 0 auto;
}

.news-article-header {
    margin-bottom: 30px;
}

.news-article-date {
    margin-bottom: 10px;

    font-size: 14px;
    line-height: 1.5;

    color: #6b7280;
}

.news-article-title {
    margin: 0;

    font-size: 38px;
    line-height: 1.2;
    font-weight: 750;

    letter-spacing: -0.02em;

    color: #111827;
}

.news-article-cover {
    width: 100%;

    margin-bottom: 34px;

    overflow: hidden;

    border-radius: 20px;

    background: #f3f4f6;
}

.news-article-cover img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 520px;

    object-fit: cover;
}


/* -----------------------------------------------------
   ARTICLE CONTENT
----------------------------------------------------- */

.news-article-content {
    font-size: 16px;
    line-height: 1.85;

    color: #374151;
}

.news-article-content p {
    margin: 0 0 20px;
}

.news-article-content h2 {
    margin: 42px 0 16px;

    font-size: 25px;
    line-height: 1.35;
    font-weight: 700;

    color: #111827;
}

.news-article-content h3 {
    margin: 30px 0 12px;

    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;

    color: #111827;
}

.news-article-content strong {
    font-weight: 700;
    color: #111827;
}

.news-article-content ul,
.news-article-content ol {
    margin: 0 0 22px;
    padding-left: 24px;
}

.news-article-content li {
    margin-bottom: 8px;
}

.news-article-content a {
    color: #2563eb;
    text-decoration: none;
}

.news-article-content a:hover {
    text-decoration: underline;
}


/* -----------------------------------------------------
   ARTICLE IMAGE
----------------------------------------------------- */

.news-article-content img {
    display: block;

    width: 100%;
    height: auto;

    margin: 28px auto;

    border-radius: 16px;
}


/* -----------------------------------------------------
   INFO BOX
----------------------------------------------------- */

.news-info-box {
    margin: 28px 0;
    padding: 18px 20px;

    border: 1px solid #dbeafe;
    border-radius: 14px;

    background: #eff6ff;
}

.news-info-box strong {
    display: block;

    margin-bottom: 7px;

    font-size: 15px;
    line-height: 1.5;

    color: #1e40af;
}

.news-info-box p {
    margin: 0;

    font-size: 15px;
    line-height: 1.7;

    color: #374151;
}


/* -----------------------------------------------------
   HIGHLIGHT BOX
----------------------------------------------------- */

.news-highlight-box {
    margin: 34px 0;
    padding: 22px;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    background: #f9fafb;
}

.news-highlight-box strong {
    display: block;

    margin-bottom: 8px;

    font-size: 17px;
    line-height: 1.5;

    color: #111827;
}

.news-highlight-box p {
    margin: 0 0 15px;

    font-size: 15px;
    line-height: 1.7;

    color: #4b5563;
}

.news-highlight-link {
    display: inline-flex;
    align-items: center;

    font-size: 14px;
    font-weight: 600;

    color: #2563eb;

    text-decoration: none;
}

.news-highlight-link:hover {
    text-decoration: underline;
}


/* -----------------------------------------------------
   ARTICLE NAVIGATION
----------------------------------------------------- */

.news-article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    margin-top: 56px;
    padding-top: 24px;

    border-top: 1px solid #e5e7eb;
}

.news-article-navigation a,
.news-article-navigation button {
    display: inline-flex;
    align-items: center;

    min-width: 0;

    padding: 11px 16px;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    background: #ffffff;

    font: inherit;
    font-size: 14px;
    font-weight: 600;

    color: #374151;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.news-article-navigation a:hover,
.news-article-navigation button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.news-article-navigation .is-disabled,
.news-article-navigation button:disabled {
    opacity: 0.4;

    pointer-events: none;
    cursor: default;
}


/* -----------------------------------------------------
   ARTICLE EMPTY / NOT FOUND
----------------------------------------------------- */

.news-empty {
    padding: 60px 20px;

    text-align: center;
}

.news-empty-title {
    margin: 0 0 8px;

    font-size: 22px;
    font-weight: 700;

    color: #111827;
}

.news-empty-text {
    margin: 0;

    font-size: 15px;
    line-height: 1.6;

    color: #6b7280;
}


/* =====================================================
   NEWS ARTICLE RESPONSIVE
===================================================== */

@media (max-width: 700px) {

    .news-article-list {
        gap: 18px;
        margin-top: 24px;
    }

    .news-article-card {
        flex-direction: column;
        gap: 16px;

        padding: 16px;

        border-radius: 16px;
    }

    .news-article-card-image {
        flex: none;

        width: 100%;
        height: 190px;

        border-radius: 12px;
    }

    .news-article-card-title {
        font-size: 19px;
    }

    .news-article-card-excerpt {
        font-size: 14px;
        line-height: 1.65;
    }

    .news-article-card-more {
        margin-top: 11px;
    }


    .news-article-title {
        font-size: 30px;
    }

    .news-article-header {
        margin-bottom: 24px;
    }

    .news-article-cover {
        margin-bottom: 26px;

        border-radius: 16px;
    }

    .news-article-cover img {
        max-height: 360px;
    }

    .news-article-content {
        font-size: 15px;
        line-height: 1.8;
    }

    .news-article-content h2 {
        margin-top: 34px;

        font-size: 22px;
    }

    .news-article-content h3 {
        font-size: 19px;
    }

    .news-info-box,
    .news-highlight-box {
        padding: 16px;
    }

    .news-article-navigation {
        margin-top: 42px;
    }

    .news-article-navigation a,
    .news-article-navigation button {
        padding: 10px 13px;

        font-size: 13px;
    }
}


@media (max-width: 430px) {

    .news-article-title {
        font-size: 27px;
    }

    .news-article-card-image {
        height: 170px;
    }

    .news-article-navigation {
        gap: 10px;
    }

    .news-article-navigation a,
    .news-article-navigation button {
        max-width: 48%;
    }
}

/* =====================================================
   NEWS ARTICLE SHARE
===================================================== */

.news-article-share {

    display: flex;

    justify-content: center;

    align-items: center;

    width: 100%;

    margin-top: 34px;

    margin-bottom: 26px;

}


.news-article-share-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 44px;

    padding: 0 20px;

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.05);

    color: inherit;

    font-family: inherit;

    font-size: 14px;

    font-weight: 600;

    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;

}


.news-article-share-button:hover {

    background: rgba(255, 255, 255, 0.09);

    border-color: rgba(255, 255, 255, 0.2);

}


.news-article-share-button:active {

    transform: scale(0.97);

}


.news-article-share-button:focus-visible {

    outline: 2px solid currentColor;

    outline-offset: 3px;

}


.news-article-share-icon {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 18px;

    height: 18px;

    font-size: 18px;

    line-height: 1;

}


.news-article-share-text {

    display: inline-block;

    white-space: nowrap;

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 480px) {

    .news-article-share {

        margin-top: 30px;

        margin-bottom: 24px;

    }


    .news-article-share-button {

        min-height: 42px;

        padding: 0 18px;

        border-radius: 11px;

        font-size: 13px;

    }


    .news-article-share-icon {

        width: 17px;

        height: 17px;

        font-size: 17px;

    }

}

/* =====================================================
   SHARETHIS
===================================================== */

.news-article-share {
    margin-top: 36px;
}

.news-share-title {
    display: block;
    margin: 0 0 14px 0;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
}

.news-article-share .sharethis-inline-share-buttons {
    display: block !important;
    width: 100%;
}
