/* Individual Blog Article Stylesheet */
.article {
    color: #101828;
    background: #f8fafc;
    position: relative;
    padding-bottom: 90px;
}

.article__hero {
    padding-top: clamp(60px, 8vw, 100px);
    padding-bottom: clamp(40px, 5vw, 64px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 900px) {
    .article__hero {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 56px;
    }
}

.article__category {
    color: #6b4eff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.article__header h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    color: #101828;
    margin: 0 0 18px 0;
    letter-spacing: -0.03em;
}

[dir="rtl"] .article__header h1 {
    letter-spacing: normal;
    line-height: 1.25;
}

.article__description {
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    color: #475467;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

.article__meta {
    font-size: 14px;
    color: #667085;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ==================== HERO MEDIA IMAGE FIXES ==================== */
.article__hero-media {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px -12px rgba(35, 27, 75, 0.18);
    background: #140e2b;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/10;
}

.article__hero-media img {
    width: 100% !important;
    height: 100% !important;
    max-height: 480px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

@media (max-width: 767px) {
    .article__hero-media {
        aspect-ratio: 16/10 !important;
        border-radius: 14px !important;
        max-height: 280px !important;
    }
    .article__hero-media img {
        max-height: 280px !important;
    }
}

/* ==================== CONTENT GRID & BODY ==================== */
.article__content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    position: relative;
}

@media (min-width: 1024px) {
    .article__content-grid {
        grid-template-columns: 240px minmax(0, 1fr) 280px;
        gap: 40px;
        align-items: start;
    }
}

/* Table of Contents */
.article__toc {
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 16px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

.article__toc p {
    font-weight: 700;
    font-size: 14px;
    color: #101828;
    margin: 0 0 12px 0;
}

.article__toc nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article__toc-link {
    color: #475467;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    transition: color 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.article__toc-link:hover,
.article__toc-link.is-active {
    color: #6b4eff;
    font-weight: 600;
}

.article__toc-link span {
    font-weight: 700;
    font-size: 11px;
    color: #98a2b3;
}

/* Article Body Typography & Embedded Images */
.article__body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #344054;
    max-width: 100%;
}

.article__body h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #101828;
    margin: 44px 0 20px 0;
    letter-spacing: -0.02em;
}

.article__body h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: #101828;
    margin: 32px 0 16px 0;
}

.article__body p {
    margin: 0 0 24px 0;
}

.article__body ul, .article__body ol {
    margin: 0 0 28px 0;
    padding-inline-start: 24px;
}

.article__body li {
    margin-bottom: 10px;
}

/* ==================== EMBEDDED BODY IMAGES FIX ==================== */
.article__body img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 480px !important;
    object-fit: cover !important;
    border-radius: 16px !important;
    margin: 32px 0 !important;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.08) !important;
    display: block !important;
}

@media (max-width: 767px) {
    .article__body img {
        max-height: 280px !important;
        border-radius: 12px !important;
        margin: 20px 0 !important;
    }
}

/* Side CTA Card */
.article__side-cta {
    background: linear-gradient(135deg, #1d1738 0%, #291a4a 100%);
    color: #ffffff;
    padding: 32px 24px;
    border-radius: 20px;
    border: 1px solid rgba(157, 123, 255, 0.3);
    box-shadow: 0 20px 50px rgba(16, 12, 38, 0.25);
    position: sticky;
    top: 100px;
}

.article__side-cta h2 {
    color: #ffffff;
    font-size: 1.4rem;
    margin: 0 0 12px 0;
}

.article__side-cta p {
    color: #d0c8ec;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.article__side-primary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    background: #6b4eff;
    color: #ffffff;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    margin-bottom: 12px;
}

.article__side-secondary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
}

/* Author Box */
.article__author {
    margin-top: 48px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.article__author span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #6b4eff;
    color: #ffffff;
    font-weight: 800;
    display: grid;
    place-items: center;
    font-size: 20px;
}

.article__author strong {
    display: block;
    font-size: 1.1rem;
    color: #101828;
}

.article__author p {
    margin: 4px 0 8px 0;
    font-size: 0.95rem;
    color: #667085;
}

.article__author a {
    color: #6b4eff;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

@media (max-width: 1023px) {
    .article__toc {
        position: static !important;
        top: auto !important;
        margin-bottom: 24px !important;
    }
}

.article__toc {
    background: linear-gradient(135deg, #f3efff 0%, #e7e0ff 100%) !important;
    border: 1px solid #d4c7ff !important;
    border-radius: 20px !important;
    padding: 24px !important;
    box-shadow: 0 8px 24px rgba(107, 78, 255, 0.08) !important;
}

.article__toc p {
    color: #101426 !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    margin-bottom: 14px !important;
}

.article__toc-link {
    color: #3b2d69 !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
}

.article__toc-link span {
    color: #6b4eff !important;
    font-weight: 800 !important;
}

.article__toc-link:hover,
.article__toc-link.is-active {
    color: #6b4eff !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(107, 78, 255, 0.12) !important;
}

.article__toc-link:hover span,
.article__toc-link.is-active span {
    color: #6b4eff !important;
}
