body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    /* Header, Main (Article), Footer */
    grid-template-columns: 1fr;
    min-height: 100vh;
    /* Ensure it takes the full height of the viewport */
}

header,
footer {
    grid-column: 1 / -1;
    /* Make sure they span full width */
}

.article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.author-text {
    font-size: 14px;
    color: #555;
    flex: 1;
    min-width: 200px;
}

.author-text span {
    color: #0073e6;
    text-decoration: none;
    font-weight: bold;
}

.download-options {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.option-button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    white-space: nowrap;
    /* Mencegah tombol terpotong */
}

.option-button:hover {
    color: #0073e6;
}

/* ✅ RESPONSIVE STYLES */
@media screen and (max-width: 600px) {
    .article-header {
        align-items: flex-start;
    }

    .download-options {
        width: 100%;
    }

    .option-button {
        font-size: 12px;
        padding: 5px;
    }
}

.popular-insights {
    position: relative;
    right: 2%;
    padding: 3px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.popular-insights h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.popular-insights hr {
    border: none;
    height: 1px;
    background: #ccc;
    margin-bottom: 10px;
}

.popular-insights ol {
    margin-top: 10px;
    padding-left: 20px;
}

.popular-insights li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.popular-insights li a {
    text-decoration: none;
    color: black;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.popular-insights li a:hover {
    color: blue;
    text-decoration: underline;
}

@media screen and (max-width: 768px) {
    article {
        width: 100%;
        margin-right: 0;
        float: none;
    }

    .popular-insights {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        padding: 10px;
        border-radius: 8px;
    }

    .popular-insights li {
        font-size: 14px;
        line-height: 1.8;
    }
}

.img-wrapper-dtArticle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 1024px;
}

.img-dtArticle {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.caption-img-dtArticle {
    margin-top: 5px;
    color: #555;
    font-size: 14px;
    font-style: italic;
    text-align: left;
    padding-left: 5px;
}

.lede {
    font-size: 1.2rem;
    font-weight: 600;
    font-style: italic;
    color: #444;
    padding: 12px 16px;
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

.lede:hover {
    border-left-color: #0f2339;
    transform: scale(1.01);
}

@media (max-width: 768px) {
    .lede {
        font-size: 1rem;
        padding: 10px 14px;
    }
}

.download-section {
    margin-top: 20px;
    padding-top: 10px;
    text-align: center;
}

.download-section hr {
    border: none;
    border-top: 1px solid #000;
    margin-bottom: 10px;
}

.download-section h3 {
    font-size: 18px;
    font-weight: bold;
    color: #0f2339;
    padding-top: 24px;
    margin-bottom: 24px;
}

.thumb-item {
    display: flex;
    flex-direction: column;
    /* align-items: flex-start; */
    text-align: center;
    margin-bottom: 15px;
}

.thumb-img {
    width: 100%;
    max-width: 225px;
    display: block;
    margin-bottom: 1vh;
    align-self: center;
}

.thumb-title {
    font-size: 18px;
    line-height: 1.6;
    font-weight: bold;
    color: #0f2339;
}

.download-link {
    font-size: 1rem;
    color: blue;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}


.download-link i {
    margin-right: 5px;
    font-size: 1.2rem;
}

.download-link:hover {
    color: darkblue;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .download-link {
        font-size: 0.9rem;
    }
}

.post>blockquote,
.post>div.popular-insights {
    padding: 10px;
    grid-row: span 5;
    align-self: start
}

:root {
    --yellow: #ffc600
}

.post p:not(.thumb-title) {
    line-height: 1.8
}

.post a {
    color: #000;
    text-decoration: underline wavy var(--yellow)
}

.post h1,
.post h2 {
    font-size: 54px;
    font-weight: 700;
    font-family: Poppins, sans-serif;
    margin: 0
}

.post {
    display: grid;
    max-width: 1600px;
    margin: 30px auto;
    grid-template-columns: 5fr 30fr 10fr;
    grid-gap: 10px 20px
}

.post img:not(.thumb-img) {
    max-width: 100%
}

@media (min-width:320px) and (max-width:767px) {
    .post h1,
    .post h2 {
        font-size: 24px;
    }
}

.post>* {
    grid-column: 2/-2
}

.post>div.download-section {
    padding: 10px
}

.post>blockquote {
    background: #ebebeb
}

.tip-left {
    grid-column: 1/span 1;
    text-align: right;
    border-right: 2px solid var(--yellow)
}

.download-section,
.popular-insights {
    grid-column: span 1/-1
}

@media (max-width:768px) {
    .post {
        display: grid;
        max-width: 1800px;
        margin: 40px auto;
        grid-template-columns: 1fr 30fr 1fr;
        grid-gap: 10px 20px;
    }

    .post a:not(.article-header a, .popular-insights a) {
        /* display: block;
        width: fit-content; */
        margin: 0 auto;
    }

    .article-header {
        grid-column: 2;
        grid-row: 1;
        /* Keep it at the top */
    }

    h1 {
        grid-column: 2;
        grid-row: 2;
        /* Ensure title stays above blog-date */
    }

    .blog-date {
        grid-column: 2;
        grid-row: 3;
        /* Ensure it stays above .lede */
    }

    .lede {
        grid-column: 2;
        grid-row: 4;
        /* Keep .lede below blog-date */
    }

    .download-section {
        grid-column: 2;
        grid-row: 5;
        /* Place it below .lede */
        margin-top: 0;
        margin-bottom: 1rem;
    }

    .post>div.download-section {
        padding: 0
    }

    .download-section h3 {
        padding-top: 0px;
        display: none;
    }

    .img-wrapper-dtArticle {
        grid-column: 2;
        grid-row: 6;
    }

    :not(:has(.download-section)) .img-wrapper-dtArticle {
        grid-row: auto;
    }

    .popular-insights {
        order: 999;
        grid-column: 1/-1;
        justify-self: center;
        display: flex;
        flex-direction: column;
        margin: 10px 0;
        background: #f9f9f9;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
        width: 90%;
        max-width: 600px;
    }
}