table {
    width: 100%;
    border-collapse: collapse;
}
td,
th {
    padding: 8px;
    text-align: left;
}
@media screen and(max-width:768px) {
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
        width: 100% !important;
    }
    td,
    th {
        box-sizing: border-box;
        width: 100% !important;
        padding: 5px;
    }
    td img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    thead {
        display: none;
    }
}
:root {
    --primary-color: #1c266d;
    --text-color: #333;
    --heading-color: #2c3e50;
    --light-grey: #f8f9fa;
    --border-color: #dee2e6;
    --font-family-base: "Open Sans", sans-serif;
}
.article-detail {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 0.08);
    border: 1px solid var(--border-color);
}

/* ================= IMAGE ================= */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.05);
}

.article-detail figure {
    display: flex;
    justify-content: center;
}

.article-detail figure img {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (min-width: 768px) {
    .article-detail figure img {
        width: 50%;
    }
}
.article-title {
    font-family: var(--font-family-heading);
    font-size: 2.8em;
    color: var(--heading-color);
    margin-bottom: 20px;
    line-height: 1.2;
    padding-bottom: 15px;
}
.article-meta {
    font-size: 0.95em;
    color: #6c757d;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 30px;
    font-style: italic;
}
.article-content {
    font-size: 1.1em;
    line-height: 1.7;
}
.article-content p {
    margin-bottom: 1em;
}
.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--font-family-heading);
    color: var(--heading-color);
    margin-top: 2em;
    margin-bottom: 0.8em;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--border-color);
}
.article-content h2 {
    font-size: 2em;
    color: var(--primary-color);
}
.article-content h3 {
    font-size: 1.6em;
}
.article-content h4 {
    font-size: 1.3em;
}
.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 700;
}
.article-content hr {
    border: 1px solid var(--primary-color);
}
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.05);
}
.article-content.image-caption {
    font-size: 0.9em;
    color: #6c757d;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 30px;
    font-style: italic;
}
.article-content ul,
.article-content ol {
    margin-left: 25px;
    margin-bottom: 1em;
    list-style-type: disc;
}
.article-content ul li,
.article-content ol li {
    margin-bottom: 0.5em;
}
.article-content blockquote {
    background-color: var(--light-grey);
    border-left: 5px solid var(--primary-color);
    margin: 30px 0;
    padding: 20px 25px;
    font-style: italic;
    color: #555;
    border-radius: 4px;
}
.article-content blockquote p {
    margin: 0;
}
.article-content blockquote footer {
    text-align: right;
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}
.article-content pre {
    background-color: #282c34;
    color: #abb2bf;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 30px 0;
    font-family: "Fira Code", "Cascadia Code", monospace;
    font-size: 0.95em;
    line-height: 1.5;
}
.article-content code {
    font-family: inherit;
    background-color: rgb(27 31 35 / 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}
.article-content figure.image_resized {
    width: 100% !important;
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .article-content figure.image_resized img {
        width: 100% !important; /* Cho iPad, PC, laptop */
    }
}

.article-content iframe {
    width: 100% !important;
}

@media (min-width: 768px) {
    .article-content iframe {
        width: 100% !important; /* Cho iPad, PC, laptop */
    }
}

.article-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
    text-align: center;
}
.article-tags span {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    margin: 5px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.article-tags span:hover {
    background-color: #003f80;
}
@media (max-width: 768px) {
    .article-detail {
        margin: 20px auto;
        padding: 20px 25px;
        box-shadow: none;
    }
    .article-title {
        font-size: 2em;
        padding-bottom: 10px;
    }
    .article-content {
        font-size: 1em;
    }
    .article-content h2 {
        font-size: 1.8em;
    }
    .article-content h3 {
        font-size: 1.4em;
    }
    .article-content img {
        margin: 15px auto;
    }
    .article-content pre {
        padding: 10px;
    }
    .article-content figcaption {
        text-align: center;
        font-style: italic;
    }
    body {
        padding: 10px;
    }
}
@media (max-width: 767px) {
    .table table,
    .table tbody,
    .table tr {
        display: block;
        width: 100%;
    }

    .table td {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }

    .table td figure.image {
        width: 100% !important;
    }

    .table td p {
        text-align: center;
    }
}
