
/* ============================================================
   RKMSM BLOG PAGES
   Presentation-only layer. Data/routes/content remain dynamic.
   ============================================================ */

.rkmsm-blog-page {
    --blog-navy: #001f43;
    --blog-navy-dark: #00172f;
    --blog-blue: #0b4f86;
    --blog-gold: #f4a000;
    --blog-gold-dark: #d98d00;
    --blog-text: #182b42;
    --blog-muted: #6b7787;
    --blog-border: #e3e9ef;
    background: #f6f8fb;
    min-height: 60vh;
    font-family: "Poppins", sans-serif;
}

.rkmsm-blog-page .site-container {
    width: min(calc(100% - 48px), 1180px);
    margin: 0 auto;
}

.blog-page-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0 48px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 20%, rgba(244,160,0,.18) 0 100px, transparent 101px),
        linear-gradient(110deg, var(--blog-navy-dark), var(--blog-navy) 62%, var(--blog-blue));
}

.blog-page-hero::after {
    content: "";
    position: absolute;
    right: -75px;
    bottom: -110px;
    width: 250px;
    height: 250px;
    border: 38px solid rgba(255,255,255,.05);
    border-radius: 50%;
}

.blog-hero-kicker {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 8px;
    color: #ffd477;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
}

.blog-page-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 4vw, 45px);
    font-weight: 700;
    line-height: 1.12;
}

.blog-page-hero > .site-container > p {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: 10px 0 0;
    color: rgba(255,255,255,.82);
    font-size: 11px;
    line-height: 1.7;
}

.post-page-hero h1 {
    max-width: 900px;
}

.post-hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    color: rgba(255,255,255,.82);
    font-size: 9px;
}

.post-hero-meta i {
    margin-right: 4px;
    color: var(--blog-gold);
}

.post-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
}

.post-tags span {
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    background: rgba(255,255,255,.07);
    color: #fff;
    font-size: 8px;
}

.blog-listing-section,
.single-post-section {
    padding: 38px 0 60px;
}

.blog-layout,
.single-post-layout {
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    gap: 27px;
    align-items: start;
}

.blog-sidebar-card {
    position: sticky;
    top: 20px;
    overflow: hidden;
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,31,67,.06);
}

.sidebar-block {
    padding: 19px;
    border-bottom: 1px solid var(--blog-border);
}

.sidebar-block:last-child {
    border-bottom: 0;
}

.sidebar-kicker,
.section-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--blog-gold-dark);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .13em;
}

.sidebar-block h2 {
    margin: 0 0 13px;
    color: var(--blog-navy);
    font-size: 17px;
    font-weight: 700;
}

.blog-categories,
.recent-posts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-categories li {
    border-bottom: 1px solid #edf0f3;
}

.blog-categories li:last-child {
    border-bottom: 0;
}

.blog-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 0;
    color: var(--blog-text);
    font-size: 9.5px;
    font-weight: 500;
    transition: .18s ease;
}

.blog-categories a span {
    color: var(--blog-gold);
    opacity: 0;
    transform: translateX(-3px);
    transition: .18s ease;
}

.blog-categories a:hover {
    color: var(--blog-blue);
}

.blog-categories a:hover span {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-empty {
    padding: 5px 0;
    color: var(--blog-muted);
    font-size: 9px;
}

.recent-posts li {
    margin-bottom: 11px;
}

.recent-posts li:last-child {
    margin-bottom: 0;
}

.recent-posts a {
    display: grid;
    grid-template-columns: 57px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}

.recent-posts img {
    width: 57px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: #edf1f5;
}

.recent-posts strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--blog-text);
    font-size: 8.5px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recent-posts a:hover strong {
    color: var(--blog-gold-dark);
}

.recent-posts small {
    display: block;
    margin-top: 3px;
    color: #8994a1;
    font-size: 7.5px;
}

.blog-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.blog-section-heading h2 {
    margin: 2px 0 0;
    color: var(--blog-navy);
    font-size: 24px;
    font-weight: 700;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px;
}

.blog-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--blog-border);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,31,67,.055);
    transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,31,67,.11);
}

.blog-card-image {
    display: block;
    height: 290px;
    overflow: hidden;
    background: #e8edf2;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform .35s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.045);
}

.blog-card-image img.image-load-error {
    opacity: .2;
}

.blog-card-body {
    display: flex;
    flex: 1;
    min-height: 205px;
    flex-direction: column;
    padding: 16px 18px 18px;
}

.blog-card-meta {
    margin-bottom: 7px;
    color: #8a95a3;
    font-size: 8.5px;
    font-weight: 600;
}

.blog-card-meta i {
    margin-right: 4px;
    color: var(--blog-gold);
}

.blog-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
}

.blog-card h3 a {
    color: var(--blog-navy);
}

.blog-card h3 a:hover {
    color: var(--blog-gold-dark);
}

.blog-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 15px;
    color: #687587;
    font-size: 10px;
    line-height: 1.65;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--blog-navy);
    font-size: 9.5px;
    font-weight: 700;
}

.blog-card-link span {
    color: var(--blog-gold);
    font-size: 14px;
    transition: transform .18s ease;
}

.blog-card-link:hover {
    color: var(--blog-gold-dark);
}

.blog-card-link:hover span {
    transform: translateX(3px);
}

.blog-empty {
    grid-column: 1 / -1;
    padding: 55px 25px;
    border: 1px solid var(--blog-border);
    border-radius: 11px;
    background: #fff;
    text-align: center;
}

.blog-empty i {
    color: var(--blog-gold);
    font-size: 27px;
}

.blog-empty h3 {
    margin: 11px 0 5px;
    color: var(--blog-navy);
    font-size: 16px;
}

.blog-empty p {
    margin: 0;
    color: var(--blog-muted);
    font-size: 9px;
}

.single-post-layout {
    grid-template-columns: minmax(0, 1fr) 255px;
}

.single-post-main {
    min-width: 0;
}

.single-post-cover {
    overflow: hidden;
    border-radius: 12px;
    background: #e8edf2;
    box-shadow: 0 8px 24px rgba(0,31,67,.08);
}

.single-post-cover img {
    display: block;
    width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.single-post-content {
    margin-top: 20px;
    padding: 30px 32px;
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    background: #fff;
    color: #34465a;
    font-size: 11px;
    line-height: 1.85;
    box-shadow: 0 6px 20px rgba(0,31,67,.04);
}

.single-post-content h1,
.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
    color: var(--blog-navy);
    font-weight: 700;
    line-height: 1.35;
}

.single-post-content h2 {
    margin-top: 25px;
    font-size: 22px;
}

.single-post-content h3 {
    margin-top: 21px;
    font-size: 18px;
}

.single-post-content p {
    margin: 0 0 13px;
}

.single-post-content a {
    color: var(--blog-blue);
    text-decoration: underline;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 7px;
}

.single-post-content table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
}

.single-post-content th,
.single-post-content td {
    padding: 9px;
    border: 1px solid var(--blog-border);
}

.single-post-content blockquote {
    margin: 20px 0;
    padding: 13px 17px;
    border-left: 4px solid var(--blog-gold);
    border-radius: 0 7px 7px 0;
    background: #fff8e9;
    color: #5f5239;
}

.single-post-sidebar {
    position: sticky;
    top: 20px;
}

.category-pill {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 20px;
    background: #fff4df;
    color: #bf7900;
    font-size: 8px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .blog-layout,
    .single-post-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar-card,
    .single-post-sidebar {
        position: static;
    }

    .blog-sidebar-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .sidebar-block {
        border-bottom: 0;
    }

    .sidebar-block + .sidebar-block {
        border-left: 1px solid var(--blog-border);
    }
}

@media (max-width: 680px) {
    .rkmsm-blog-page .site-container {
        width: calc(100% - 30px);
    }

    .blog-page-hero {
        padding: 40px 0 35px;
    }

    .blog-page-hero h1 {
        font-size: 30px;
    }

    .blog-page-hero > .site-container > p {
        font-size: 10px;
    }

    .blog-listing-section,
    .single-post-section {
        padding: 28px 0 42px;
    }

    .blog-sidebar-card {
        display: block;
    }

    .sidebar-block + .sidebar-block {
        border-top: 1px solid var(--blog-border);
        border-left: 0;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .blog-card-image {
        height: 205px;
    }

    .blog-card-body {
        min-height: 0;
    }

    .single-post-content {
        padding: 22px 18px;
        font-size: 10.5px;
    }

    .single-post-cover img {
        max-height: 300px;
    }
}

@media (max-width: 420px) {
    .blog-page-hero h1 {
        font-size: 27px;
    }

    .blog-card-image {
        height: 180px;
    }

    .blog-section-heading h2 {
        font-size: 21px;
    }
}
