/* =========================================================
   MOLAS EDUCATION
   ARTICLE PAGE
   MATCHES HOMEPAGE VISUAL STYLE
   Desktop • Tablet • Mobile
========================================================= */
/* =========================================================
   ARTICLE PAGE BACKGROUND
========================================================= */
html,
body {
    background: var(--bg);
    color: var(--text);
}
/* =========================================================
   ARTICLE WRAPPER
========================================================= */
.article-wrapper {
    width: min(
        calc(100% - (var(--page-padding) * 2)),
        var(--container)
    );
    margin-inline: auto;
    padding-top: 72px;
    padding-bottom: 100px;
}
/* =========================================================
   ARTICLE TOP
========================================================= */
.article-top {
    max-width: 900px;
    margin: 0 auto 38px;
    text-align: center;
}
/* =========================================================
   CATEGORY
========================================================= */
.article-category {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    border: 1px solid var(--border-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
/* =========================================================
   ARTICLE TITLE
========================================================= */
.article-title {
    margin: 18px 0 18px;
    color: var(--brand-navy);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.035em;
}
/* =========================================================
   ARTICLE META
========================================================= */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}
.article-meta .source {
    color: var(--brand-navy);
    font-weight: 750;
}
.meta-dot {
    color: var(--brand-cyan);
    font-weight: 900;
}
/* =========================================================
   ARTICLE IMAGE
========================================================= */
.article-image-wrap {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto 48px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-lg);
}
.article-image {
    display: block;
    width: 100%;
    height: min(560px, 52vw);
    min-height: 300px;
    object-fit: cover;
}
/* =========================================================
   IMAGE OVERLAY
========================================================= */
.image-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            to bottom,
            rgba(16, 27, 77, 0.02),
            rgba(16, 27, 77, 0.10)
        );
}
/* =========================================================
   ARTICLE CONTENT
========================================================= */
.article-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 46px 52px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-soft);
}
/* =========================================================
   ARTICLE CONTENT — TEXT
========================================================= */
.article-content p {
    margin: 0 0 24px;
}
.article-content p:last-child {
    margin-bottom: 0;
}
/* =========================================================
   ARTICLE CONTENT — HEADINGS
========================================================= */
.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--brand-navy);
    line-height: 1.25;
    letter-spacing: -0.02em;
    font-weight: 850;
    margin-top: 38px;
    margin-bottom: 16px;
}
.article-content h2 {
    font-size: 30px;
}
.article-content h3 {
    font-size: 24px;
}
.article-content h4 {
    font-size: 20px;
}
/* =========================================================
   ARTICLE CONTENT — STRONG
========================================================= */
.article-content strong,
.article-content b {
    color: var(--brand-navy);
    font-weight: 800;
}
/* =========================================================
   ARTICLE CONTENT — LINKS
========================================================= */
.article-content a {
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}
.article-content a:hover {
    color: var(--brand-navy);
}
/* =========================================================
   ARTICLE CONTENT — LISTS
========================================================= */
.article-content ul,
.article-content ol {
    margin: 0 0 26px;
    padding-left: 26px;
}
.article-content li {
    margin-bottom: 10px;
}
/* =========================================================
   ARTICLE CONTENT — BLOCKQUOTE
========================================================= */
.article-content blockquote {
    margin: 32px 0;
    padding: 22px 26px;
    border-left: 4px solid var(--brand-cyan);
    background: var(--brand-pale-blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--brand-navy);
    font-weight: 650;
}
/* =========================================================
   ARTICLE CONTENT — IMAGES
========================================================= */
.article-content img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 30px auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
}
/* =========================================================
   ARTICLE CONTENT — TABLES
========================================================= */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
}
.article-content th,
.article-content td {
    padding: 12px 14px;
    border: 1px solid var(--border);
    text-align: left;
}
.article-content th {
    background: var(--brand-navy);
    color: var(--white);
    font-weight: 750;
}
/* =========================================================
   SOURCE
========================================================= */
.article-source {
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.article-source a {
    color: var(--blue-dark);
    font-weight: 750;
    text-decoration: none;
}
.article-source a:hover {
    text-decoration: underline;
}
/* =========================================================
   ARTICLE ERROR
========================================================= */
.article-error {
    max-width: 650px;
    margin: 80px auto;
    padding: 52px 40px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}
.article-error h2 {
    margin: 0 0 12px;
    color: var(--brand-navy);
    font-size: 30px;
    font-weight: 850;
}
.article-error p {
    margin: 0 0 26px;
    color: var(--muted);
}
.back-news {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--brand-navy);
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 750;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}
.back-news:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
}
/* =========================================================
   RELATED NEWS
========================================================= */
.related-section {
    margin-top: 90px;
}
/* =========================================================
   RELATED HEADING
========================================================= */
.related-heading {
    margin-bottom: 28px;
}
.related-heading .small-label {
    display: block;
    margin-bottom: 8px;
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.related-heading h2 {
    margin: 0;
    color: var(--brand-navy);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -0.025em;
}
/* =========================================================
   RELATED GRID
========================================================= */
.related-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 24px;
}
/* =========================================================
   RELATED CARD
========================================================= */
.related-card {
    display: block;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}
.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-blue);
}
/* =========================================================
   RELATED IMAGE
========================================================= */
.related-image {
    position: relative;
    height: 210px;
    background:
        var(--brand-pale-blue)
        center / cover
        no-repeat;
    border-bottom: 1px solid var(--border-soft);
}
/* =========================================================
   RELATED CATEGORY
========================================================= */
.related-category {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand-navy);
    border: 1px solid rgba(215, 231, 239, 0.9);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
/* =========================================================
   RELATED CONTENT
========================================================= */
.related-content {
    padding: 20px 20px 22px;
}
.related-content h3 {
    margin: 0 0 12px;
    color: var(--brand-navy);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}
.related-date {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
/* =========================================================
   BACK TO TOP
========================================================= */
.molas-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-blue);
    border-radius: 50%;
    background: var(--brand-navy);
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    box-shadow: var(--shadow-md);
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        background 0.2s ease;
}
.molas-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.molas-top:hover {
    background: var(--blue-dark);
}
/* =========================================================
   TABLET
========================================================= */
@media (max-width: 1050px) {
    .article-wrapper {
        padding-top: 60px;
        padding-bottom: 80px;
    }
    .article-title {
        font-size: clamp(32px, 5vw, 50px);
    }
    .article-image {
        height: 480px;
    }
    .article-content {
        padding: 40px;
    }
    .related-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}
/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 768px) {
    .article-wrapper {
        width: min(
            calc(100% - (var(--page-padding) * 2)),
            var(--container)
        );
        padding-top: 48px;
        padding-bottom: 65px;
    }
    .article-top {
        margin-bottom: 28px;
    }
    .article-category {
        font-size: 11px;
        padding: 7px 12px;
    }
    .article-title {
        margin-top: 15px;
        font-size: clamp(30px, 8vw, 42px);
        line-height: 1.1;
    }
    .article-meta {
        font-size: 13px;
    }
    .article-image-wrap {
        margin-bottom: 30px;
        border-radius: var(--radius-lg);
    }
    .article-image {
        height: 300px;
        min-height: 0;
    }
    .article-content {
        padding: 30px 24px;
        border-radius: var(--radius-lg);
        font-size: 16px;
        line-height: 1.75;
    }
    .article-content h2 {
        font-size: 26px;
    }
    .article-content h3 {
        font-size: 21px;
    }
    .article-content h4 {
        font-size: 18px;
    }
    .related-section {
        margin-top: 65px;
    }
    .related-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .related-image {
        height: 220px;
    }
    .molas-top {
        right: 18px;
        bottom: 18px;
        width: 44px;
        height: 44px;
    }
}
/* =========================================================
   SMALL MOBILE
========================================================= */
@media (max-width: 480px) {
    .article-wrapper {
        padding-top: 38px;
    }
    .article-title {
        font-size: 34px;
    }
    .article-meta {
        gap: 7px;
        font-size: 12px;
    }
    .article-image-wrap {
        border-radius: var(--radius-md);
    }
    .article-image {
        height: 230px;
    }
    .article-content {
        padding: 25px 19px;
        border-radius: var(--radius-md);
        font-size: 15.5px;
    }
    .article-content h2 {
        font-size: 24px;
    }
    .article-content h3 {
        font-size: 20px;
    }
    .article-source {
        margin-top: 32px;
    }
    .article-error {
        margin: 50px auto;
        padding: 38px 22px;
    }
    .related-image {
        height: 190px;
    }
}
/* =========================================================
   VERY SMALL DEVICES
========================================================= */
@media (max-width: 360px) {
    .article-title {
        font-size: 31px;
    }
    .article-content {
        padding: 22px 16px;
    }
    .article-content h2 {
        font-size: 22px;
    }
    .article-content h3 {
        font-size: 19px;
    }
}
/* =========================================================
   REDUCED MOTION
========================================================= */
@media (prefers-reduced-motion: reduce) {
    .related-card,
    .back-news,
    .molas-top,
    .article-content a {
        transition: none;
    }
}