:root {
    --apl-ink: #1d1d1f;
    --apl-body: #333336;
    --apl-muted: #6e6e73;
    --apl-blue: #0071e3;
    --apl-blue-dark: #0058b0;
    --apl-border: #e8e8ed;
    --apl-bg-soft: #f5f5f7;
    --apl-radius-lg: 22px;
    --apl-radius-md: 14px;
    --apl-radius-sm: 10px;
    --apl-font: "Manrope", sans-serif;
}

/* ---------------- 1. Global Page Banner ---------------- */
.cim-page-banner {
    background: #090c5e;
    padding: 90px 24px 76px;
    text-align: center;
    color: #fff;
}

.cim-page-banner-inner {
    max-width: 780px;
    margin: 0 auto;
}

.cim-page-banner-subtitle {
    display: inline-block;
    font-family: var(--apl-font);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #86868b;
    margin-bottom: 12px;
    text-transform: none;
}

.cim-page-banner-title {
    font-family: var(--apl-font);
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.08;
    margin: 0;
    background: linear-gradient(180deg, #ffffff 0%, #c9c9cc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------------- Container / Grid ---------------- */
.cim-blog-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 24px 100px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 64px;
    align-items: start;
    font-family: var(--apl-font);
    color: var(--apl-body);
}

/* ---------------- 2. Main Article Column ---------------- */
.cim-blog-main {
    min-width: 0;
}

.cim-article-wrapper {
    width: 100%;
}

.cim-article-header {
    margin-bottom: 32px;
}

.cim-article-title {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: var(--apl-ink);
    margin: 0 0 24px;
}

.cim-article-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--apl-border);
    border-bottom: 1px solid var(--apl-border);
}

.cim-meta-info {
    display: flex;
    align-items: center;
    gap: 22px;
}

.cim-meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
    color: var(--apl-muted);
}

.cim-meta-item svg {
    stroke: #a1a1a6 !important;
    flex-shrink: 0;
}

/* ---------------- Action Buttons (Share / Download) ---------------- */
.cim-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--apl-font);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.25s cubic-bezier(0.28, 0.11, 0.32, 1);
}

.cim-share-btn {
    background: var(--apl-bg-soft);
    color: var(--apl-ink);
    padding: 9px 18px;
    border-radius: 999px;
}

.cim-share-btn:hover {
    background: #e8e8ed;
}

.cim-share-btn svg {
    stroke: currentColor;
}

/* ---------------- Featured Media ---------------- */
.cim-article-featured-media {
    position: relative;
    width: 100%;
    margin: 0 0 40px;
    border-radius: var(--apl-radius-lg);
    overflow: hidden;
    background: var(--apl-bg-soft);
}

.cim-article-image {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

.cim-download-btn {
    position: absolute;
    bottom: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--apl-ink);
    padding: 9px 18px;
    border-radius: 999px;
    backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.cim-download-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.cim-download-btn svg {
    stroke: currentColor;
}

/* ---------------- Article Content ---------------- */
.cim-article-content {
    font-size: 19px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--apl-body);
}

.cim-article-content p {
    margin: 0 0 24px;
}

.cim-article-content h2,
.cim-article-content h3 {
    font-family: var(--apl-font);
    color: var(--apl-ink);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 44px 0 18px;
}

.cim-article-content h2 { font-size: 29px; }
.cim-article-content h3 { font-size: 22px; }

.cim-article-content a {
    color: var(--apl-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 113, 227, 0.35);
    transition: border-color 0.2s ease;
}

.cim-article-content a:hover {
    border-color: var(--apl-blue);
}

.cim-article-content strong {
    font-weight: 700;
    color: var(--apl-ink);
}

.cim-article-content blockquote {
    margin: 36px 0;
    padding: 26px 30px;
    background: var(--apl-bg-soft);
    border-radius: var(--apl-radius-md);
    font-size: 21px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--apl-ink);
    border-left: none;
}

.cim-article-content ul,
.cim-article-content ol {
    margin: 0 0 24px 22px;
}

.cim-article-content li {
    margin-bottom: 10px;
}

.cim-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--apl-radius-md);
    margin: 32px 0;
}

.cim-article-content hr {
    border: none;
    border-top: 1px solid var(--apl-border);
    margin: 40px 0;
}

.cim-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15.5px;
}

.cim-article-content table th {
    background: var(--apl-bg-soft);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

.cim-article-content table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--apl-border);
}

.cim-article-content code {
    font-family: "SF Mono", "SFMono-Regular", Consolas, Menlo, monospace;
    background: var(--apl-bg-soft);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.86em;
}

/* ---------------- 3. Sidebar ---------------- */
.cim-blog-sidebar {
    width: 100%;
}

.sticky-widget {
    position: sticky;
    top: 32px;
}

.cim-sidebar-widget {
    background: var(--apl-bg-soft);
    border-radius: var(--apl-radius-lg);
    padding: 28px;
}

.cim-widget-title {
    font-family: var(--apl-font);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--apl-ink);
    margin: 0 0 20px;
}

.cim-related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cim-related-post-card {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    padding: 10px;
    margin: -10px;
    border-radius: var(--apl-radius-sm);
    transition: background 0.2s ease;
}

.cim-related-post-card:hover {
    background: #ffffff;
}

.cim-related-thumb {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 12px;
    overflow: hidden;
    background: #e8e8ed;
}

.cim-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cim-related-info {
    min-width: 0;
}

.cim-related-title {
    font-family: var(--apl-font);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--apl-ink);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cim-related-date {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--apl-muted);
}

.cim-no-related {
    font-size: 14px;
    color: var(--apl-muted);
    margin: 0;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
    .cim-blog-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .sticky-widget {
        position: static;
    }

    .cim-blog-sidebar {
        max-width: 640px;
    }
}

@media (max-width: 768px) {
    .cim-page-banner {
        padding: 64px 20px 52px;
    }

    .cim-page-banner-title {
        font-size: 38px;
    }

    .cim-blog-container {
        padding: 40px 18px 72px;
        gap: 40px;
    }

    .cim-article-title {
        font-size: 29px;
    }

    .cim-article-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .cim-meta-info {
        gap: 16px;
        flex-wrap: wrap;
    }

    .cim-article-content {
        font-size: 17px;
    }

    .cim-article-content h2 { font-size: 24px; }
    .cim-article-content h3 { font-size: 20px; }

    .cim-article-content blockquote {
        font-size: 18px;
        padding: 20px 22px;
    }

    .cim-article-image {
        max-height: 320px;
    }

    .cim-download-btn {
        bottom: 12px;
        right: 12px;
        padding: 7px 14px;
        font-size: 12.5px;
    }
}

@media (max-width: 480px) {
    .cim-page-banner-title {
        font-size: 30px;
    }

    .cim-article-title {
        font-size: 24px;
        line-height: 1.22;
    }

    .cim-sidebar-widget {
        padding: 20px;
    }
}