/* Article Page Styles */

/* Full-width article layout */
main#js-page-content.page-content {
    width: 100%;
    background: #ffffff;
}

/* Article Header Section */
.article-header-section {
    padding: 80px 0 60px;
    background: #f8f9ff;
}

/* Article Header Content - Full width like content */
.article-header-content {
    width: 100%;
}

/* Inline Author/Date Meta */
.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #666;
}

.article-author {
    color: #886ab5;
    font-weight: 600;
}

.article-separator {
    color: #ccc;
}

.article-date {
    color: #999;
}

/* Article Title */
.article-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    color: #2c3e50;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

/* Article Description */
.article-description {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 32px 0 0 0;
    font-weight: 400;
}

/* Article Image Section */
.article-image-section {
    padding: 60px 0;
    background: #ffffff;
}

.article-featured-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    max-width: 500px;
    margin: 0 auto;
}

/* Content section */
.article-content {
    padding: 40px 0;
    background: #ffffff;
}

/* Related articles section */
.related-articles-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

/* Article Content Styling */
.intro {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.intro h1, .intro h2, .intro h3, .intro h4, .intro h5, .intro h6 {
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    color: #2c3e50;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.intro h1 {
    font-size: 2rem;
    line-height: 1.3;
}

/* Enhanced typography with visual hierarchy */
.intro h1 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: #2c3e50;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.intro .lead {
    font-size: 15px;
    color: #555555;
    line-height: 1.5;
    margin-bottom: 40px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .intro h1 {
        font-size: 24px;
        line-height: 1.2;
    }
    .intro .lead {
        font-size: 13px;
        line-height: 1.4;
    }
}

@media (max-width: 576px) {
    .intro h1 {
        font-size: 20px;
        line-height: 1.2;
    }
    .intro .lead {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* Removed old author/date section styles - now using inline meta */

/* Enhanced content blocks container */
.container.content-space-2.content-space-lg-3 {
    min-height: 600px; /* Reserve space for article content */
}


.intro h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #2c3e50;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid #886ab5;
    position: relative;
}

.intro h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #886ab5, #6b4d9a);
    border-radius: 2px;
}

.intro h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #34495e;
    margin-top: 32px;
    margin-bottom: 12px;
}

.intro h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #34495e;
    margin-top: 28px;
    margin-bottom: 8px;
}

.intro h5 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: #34495e;
}

.intro h6 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #34495e;
    font-weight: 500;
}

.intro p {
    font-size: 13px;
    line-height: 1.8;
    color: #333333;
    margin-bottom: 16px;
    text-align: left;
}

@media (max-width: 768px) {
    .intro p {
        font-size: 12px;
        line-height: 1.7;
    }
}

@media (max-width: 576px) {
    .intro p {
        font-size: 11px;
        line-height: 1.6;
    }
}

.intro ol, .intro ul {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.intro ol {
    list-style-type: decimal;
}

.intro ul {
    list-style-type: disc;
}

.intro li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.intro strong {
    font-weight: 600;
    color: #2c3e50;
}

.intro em {
    font-style: italic;
    color: #555;
}

.intro a {
    color: #886ab5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.intro a:hover {
    color: #6b4d9a;
    text-decoration: underline;
}

.intro blockquote {
    border-left: 4px solid #886ab5;
    padding-left: 24px;
    margin: 24px 0;
    font-style: italic;
    color: #555555;
    font-size: 13px;
    line-height: 1.6;
    background: rgba(136, 106, 181, 0.05);
    padding: 16px 24px;
    border-radius: 6px;
}

.intro img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* CRITICAL: Ensure content block images have dimensions to prevent layout shift */
.intro img:not([width]):not([height]) {
    /* Let images maintain their natural aspect ratio */
    width: 100%;
    height: auto;
}

/* Ensure images in content blocks don't cause layout shift */
.intro .mb-4 img {
    width: 100%;
    height: auto;
    max-width: 100%;
    /* Remove forced aspect ratio to preserve original proportions */
    object-fit: contain;
}

.intro iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Enhanced related articles - Modern Grid Layout */
.card-container {
    position: relative;
    width: 100%;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.card {
    border: 1px solid rgba(136, 106, 181, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(136, 106, 181, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(136, 106, 181, 0.15);
    border-color: rgba(136, 106, 181, 0.3);
}

/* Arrow icons removed - using grid layout instead */

.card-img-top {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8efff 100%);
}

.card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top img {
    transform: scale(1.05);
}

.card-body {
    padding: 24px;
}

.card-body .badge {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    margin-bottom: 16px;
    display: inline-block;
    background: linear-gradient(135deg, #886ab5, #6b4d9a);
    color: white;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    display: block;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.card-title:hover {
    color: #886ab5;
    text-decoration: none;
}

.card-text {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-text .read-more {
    color: #886ab5;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-text .read-more:hover {
    color: #6b4d9a;
    text-decoration: underline;
}

.card-footer {
    padding: 16px 24px;
    background: rgba(136, 106, 181, 0.05);
    border-top: 1px solid rgba(136, 106, 181, 0.1);
}

.card-footer small {
    font-size: 12px;
    color: #666666;
}

.related-title {
    font-size: 32px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 48px;
    text-align: center;
    position: relative;
    padding-bottom: 16px;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #886ab5, #6b4d9a);
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .article-header-section {
        padding: 50px 20px 40px;
    }

    .article-image-section {
        padding: 40px 20px;
    }

    .article-content {
        padding: 40px 0;
    }

    .article-title {
        font-size: 20px;
        line-height: 1.15;
    }

    .article-description {
        font-size: 12px;
        line-height: 1.5;
    }

    .article-meta {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .intro h1 {
        font-size: 36px;
    }

    .intro .lead {
        font-size: 20px;
    }

    .intro h2 {
        font-size: 18px;
        margin-top: 44px;
    }

    .intro h3 {
        font-size: 16px;
        margin-top: 36px;
    }

    .intro h4 {
        font-size: 14px;
        margin-top: 32px;
    }

    .intro p {
        font-size: 12px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .related-title {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .article-header-section {
        padding: 40px 20px 30px;
    }

    .article-title {
        font-size: 18px;
        line-height: 1.2;
    }

    .article-description {
        font-size: 11px;
        line-height: 1.5;
        margin-top: 24px;
    }

    .article-meta {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .article-image-section {
        padding: 30px 20px;
    }

    .intro h1 {
        font-size: 30px;
    }

    .intro .lead {
        font-size: 18px;
    }

    .intro h2 {
        font-size: 16px;
    }

    .intro h3 {
        font-size: 14px;
    }

    .intro p {
        font-size: 11px;
    }

    .related-title {
        font-size: 24px;
    }
}

/* Responsive grid adjustments */
@media (max-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Adjust content block styling for tablets */
  
}

/* Large screen optimizations */
@media (min-width: 1200px) {
    .article-title {
        font-size: 32px;
    }

    .article-description {
        font-size: 16px;
    }

    .article-meta {
        font-size: 15px;
    }

    .intro h1 {
        font-size: 34px;
    }

    .intro .lead {
        font-size: 18px;
    }

    .intro h2 {
        font-size: 24px;
    }

    .intro p {
        font-size: 16px;
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

@media (min-width: 1600px) {
    .article-title {
        font-size: 36px;
    }

    .article-description {
        font-size: 18px;
    }

    .intro h1 {
        font-size: 38px;
    }

    .intro .lead {
        font-size: 20px;
    }

    .intro h2 {
        font-size: 26px;
    }
}

/* Content Block Styling */
.intro .alert,
.intro .info,
.intro .warning,
.intro .code,
.intro .primary,
.intro .success {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.intro .alert {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.intro .info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.intro .warning {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.intro .code {
    background: #f4f4f4;
    border-color: #6c757d;
    color: #343a40;
}

.intro .primary {
    background: #e7f3ff;
    border-color: #886ab5;
    color: #4a3a6b;
}

.intro .success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.intro pre {
    background: #f4f4f4;
    border: 1px solid #e7ecf3;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.intro pre code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
}
