/* Article Page Specific Styles */

.full-article {
    background: white;
}

.article-hero-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

.article-hero {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 600px;
    min-height: 400px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f8f9fa;
    position: relative;
}

.article-content-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.article-body-full {
    padding: 60px 10%;
    max-width: 100%;
}

.article-body-full h1 {
    font-size: 3rem;
    margin-bottom: 40px;
    margin-left: -80px;
    line-height: 1.2;
    color: #2d3748;
    font-weight: 800;
}

.article-body,
.article-body-full {
    max-width: 100%;
}

.article-body h2,
.article-body-full h2,
.article-content-en h2,
.article-content-fr h2 {
    font-size: 2rem;
    margin: 40px 0 20px -60px;
    color: #2d3748;
    font-weight: 700;
}

.article-body h3,
.article-body-full h3,
.article-content-en h3,
.article-content-fr h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px -40px;
    color: #4a5568;
    font-weight: 600;
}

.article-body p,
.article-body-full p,
.article-content-en p,
.article-content-fr p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #4a5568;
    margin-bottom: 20px;
    margin-left: 0;
}

.article-body ul, .article-body ol,
.article-body-full ul, .article-body-full ol,
.article-content-en ul, .article-content-en ol,
.article-content-fr ul, .article-content-fr ol {
    margin: 20px 0 20px 60px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-highlight {
    background: rgba(0, 47, 167, 0.05);
    padding: 30px;
    border-radius: 15px;
    border-left: 4px solid #002FA7;
    margin: 40px 0;
}

.article-highlight h3 {
    margin-top: 0;
    color: #002FA7;
}

.article-highlight ul {
    margin-left: 20px;
}

.article-cta {
    background: #002FA7;
    color: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    margin: 60px 0;
}

.article-cta h3 {
    font-size: 2rem;
    margin: 0 0 15px;
    color: white;
}

.article-cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
    color: white;
}

.article-cta .cta-button {
    background: white;
    color: #002FA7;
    display: inline-block;
}

.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.sidebar-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #2d3748;
}

.related-articles {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-articles li {
    margin-bottom: 15px;
}

.related-articles a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-articles a:hover {
    color: #002FA7;
    background: #f7fafc;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 8px 15px;
    background: #edf2f7;
    color: #4a5568;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Code blocks and technical content */
.article-body code,
.article-body-full code {
    background: #f7fafc;
    padding: 3px 8px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #002FA7;
}

.article-body pre {
    background: #2d3748;
    color: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 30px 0;
}

.article-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Image captions */
.article-body figure {
    margin: 40px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.article-body figure img {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
}

.article-body img,
.article-body-full img {
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    display: block !important;
}

.article-body p:has(img),
.article-body-full p:has(img) {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    padding: 0 !important;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
}

.article-body-full {
    overflow-x: hidden;
}

.article-body figcaption {
    text-align: center;
    font-style: italic;
    color: #718096;
    margin-top: 15px;
    font-size: 0.95rem;
}

/* Blockquotes */
.article-body blockquote,
.article-body-full blockquote {
    border-left: 4px solid #002FA7;
    padding-left: 25px;
    margin: 30px 0;
    font-size: 1.2rem;
    font-style: italic;
    color: #4a5568;
}

/* Tables */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.article-body th,
.article-body td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.article-body th {
    background: #f7fafc;
    font-weight: 700;
    color: #2d3748;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .article-sidebar {
        position: static;
    }

    .article-hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .article-hero {
        height: 400px;
    }

    .article-hero h1 {
        font-size: 2rem;
    }

    .article-hero-overlay {
        padding: 40px 5%;
    }

    .article-meta-info {
        flex-direction: column;
        gap: 10px;
    }

    /* Remove negative margins on mobile to prevent titles going off-screen */
    .article-body-full h1 {
        margin-left: 0;
        font-size: 2rem;
    }

    .article-body h2,
    .article-body-full h2,
    .article-content-en h2,
    .article-content-fr h2 {
        font-size: 1.5rem;
        margin-left: 0;
    }

    .article-body h3,
    .article-body-full h3,
    .article-content-en h3,
    .article-content-fr h3 {
        margin-left: 0;
    }

    .article-body-full {
        padding: 40px 5%;
    }

    .article-body p,
    .article-body ul,
    .article-body ol {
        font-size: 1rem;
    }

    .article-cta {
        padding: 30px 20px;
    }

    .article-cta h3 {
        font-size: 1.5rem;
    }
}
