/* Article / Single Post Styles - Midnight Luxury Theme v3.3 Final Safety */

/* Hero Section */
.article-hero {
    position: relative;
    height: 350px;
    /* Reduced from 500px as requested "shorter" */
    width: 100%;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    margin-bottom: 0;
    border-bottom: none;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background-color: #1a1a1a;
    background-image: linear-gradient(45deg, #1a1a1a 0%, #2a2a2a 100%);
}

.article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.8) 100%);
}

.article-hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Centered instead of flex-end to bring text "up" */
    /* KEY FIX: Matching the settings of .article-card effectively */
    max-width: 1000px;
    margin: 0 auto;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 4rem;
    /* Restoring normal padding since overlap is gone */
    height: 100%;
}

.article-breadcrumbs {
    margin-bottom: 0.5rem;
    /* Tighter spacing */
    font-size: var(--text-xs);
    color: var(--color-accent);
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

.article-breadcrumbs span {
    color: rgba(255, 255, 255, 0.8);
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: white;
    margin-bottom: 1.5rem;
    /* Removed heavy text shadow for cleaner, flatter look like homepage */
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-sans);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    width: 100%;
    /* Full width underline effect */
}

/* Article Container & Card */
.article-container {
    max-width: 1000px;
    margin: 0 auto 5rem auto;
    /* SAFETY FIX: Removed negative margin overlap entirely */
    /* No overlap = No collision risk */
    position: relative;
    z-index: 10;
    padding: 0;
    /* Remove side padding constraint here, handled by card */
}


.article-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    /* Padding is now handled by inner divs for full-width image support */
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
    color: var(--color-text-muted);
    height: auto;
    overflow: hidden;
    /* Ensure image corners align */
}

/* Typography (Prose) - Optimized for Human Readability */
.article-content {
    font-size: 1.25rem;
    /* Larger, more comfortable size */
    line-height: 1.9;
    /* More breathing room between lines */
    color: #cbd5e1;
    /* Softer, slightly muted text color (less harsh than white) */
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center the readable content */
}

/* Limit line length for comfortable reading (approx 75 characters) */
.article-content>p,
.article-content>ul,
.article-content>ol,
.article-content>h2,
.article-content>h3,
.article-content>blockquote,
.article-content>div:not(.article-share) {
    max-width: 720px;
    width: 100%;
}

/* Hide duplicate H1 in content if present */
.article-content h1 {
    display: none;
}

.article-content h2 {
    font-family: var(--font-serif);
    color: var(--color-accent);
    /* Golden accents */
    font-size: 2rem;
    margin-top: 3.5rem;
    /* More space before headings */
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding-left: 0;
    border-left: none;
    line-height: 1.3;
}

.article-content h3 {
    font-family: var(--font-serif);
    color: #e2e8f0;
    /* Slightly brighter than body */
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-content p {
    margin-bottom: 2rem;
    /* Clearer separation of paragraphs */
    font-weight: 400;
    /* Normal weight for better legibility */
    color: #cbd5e1;
}

.article-content ul,
.article-content ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    position: relative;
}

/* Custom List Markers */
.article-content ul {
    list-style: none;
    padding-left: 1rem;
}

.article-content ul li::before {
    content: "•";
    color: var(--color-accent);
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
    font-size: 1.2em;
    vertical-align: middle;
    line-height: 1;
}


.article-content blockquote {
    border: none;
    position: relative;
    margin: 3rem 0;
    padding: 2rem;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: white;
    background: rgba(255, 255, 255, 0.03);
    /* Subtle background */
    border-left: 2px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    line-height: 1.6;
}

.article-content blockquote::before {
    display: none;
    /* Removed giant quote mark for cleaner look */
}

.article-content code {
    background: #0f1115;
    /* Darker, distinct background */
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    color: #6ee7b7;
    /* Code green highlight */
    font-family: 'Fira Code', monospace;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-content pre {
    background: #0f1115;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-content a {
    color: var(--color-accent);
    text-decoration: none;
    background-image: linear-gradient(var(--color-accent), var(--color-accent));
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s;
}

.article-content a:hover {
    background-size: 100% 2px;
}

/* Related Posts */
.related-section {
    padding-top: 6rem;
    border-top: 1px solid var(--color-border);
    background: linear-gradient(to bottom, var(--color-bg), #050507);
}

.related-header {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: white;
    letter-spacing: -0.02em;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.related-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.related-card:hover {
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
    border-color: var(--color-accent);
}

.related-image {
    height: 220px;
    width: 100%;
    background-color: #2a2a2a;
    /* Fallback color */
    background-size: cover;
    background-position: center;
    filter: brightness(0.9);
    transition: transform 0.6s;
    display: block;
}

.related-card:hover .related-image {
    transform: scale(1.05);
    filter: brightness(1);
}

.related-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #f1f5f9;
    line-height: 1.3;
}

.related-card:hover .related-title {
    color: var(--color-accent);
}

.related-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}