/* blog-styles.css */
:root {
    --bg-gradient-start: #8A74C0;
    --bg-gradient-end: #6E5D9A;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: 12px;
    --text-main: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
    --accent: #fff;
    --hover-bg: rgba(255, 255, 255, 0.2);
    --font-family: 'Outfit', sans-serif;
}

body.custom-bg {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-family);
}

/* Glass Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
}

.glass-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    background: var(--hover-bg);
}

/* Typography Overrides */
.blog-hero {
    position: relative;
    padding: 12rem 2rem 8rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.blog-hero-content {
    display: inline-block;
    padding: 3rem 4rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Archive Page */
.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Post Cards */
.card-img-container {
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.glass-card:hover .card-img {
    transform: scale(1.05);
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

.card-img-placeholder::after {
    content: 'Fără imagine';
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.read-more-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    text-align: center;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s;
    text-decoration: none;
    margin-top: 1rem;
}

.read-more-btn:hover {
    background: var(--accent);
    color: var(--bg-gradient-start);
    transform: translateY(-2px);
}

/* Single Post Hero - Redesigned */
.article-hero-section {
    background: linear-gradient(135deg, #8A74C0 0%, #6E5D9A 100%);
    padding-top: 150px;
    padding-bottom: 3rem;
    text-align: center;
}

.article-hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    animation: fadeInDown 0.8s ease backwards;
}

.article-title {
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    max-width: 900px;
    margin: 0 auto;
    font-weight: 700;
}

.article-cover-glass {
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 2rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.article-cover-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* Post Content */
.post-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.glass-reading-panel {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin: 0 auto;
}

.content-wrapper {
    padding: 3rem;
}

/* Markdown Elements Styling inside content */
.markdown-body {
    color: rgba(255, 255, 255, 0.85);
    /* Semi-transparent white body text */
    font-size: 1.125rem;
    line-height: 1.8;
}

.markdown-body ::selection {
    background: #8a74c0;
    color: #ffffff;
}

.markdown-body h1 {
    font-size: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 700;
}

.markdown-body h2 {
    font-size: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.markdown-body h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.markdown-body p {
    margin-bottom: 1.5rem;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    list-style-type: disc;
}

.markdown-body ol {
    list-style-type: decimal;
}

.markdown-body li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.markdown-body li::marker {
    color: #ffffff;
}

.markdown-body blockquote {
    border-left: 4px solid #8a74c0;
    margin: 2rem 0;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.markdown-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.markdown-body a {
    color: #8a74c0;
    text-decoration: underline;
    text-decoration-color: rgba(138, 116, 192, 0.4);
    text-underline-offset: 4px;
    transition: all 0.3s ease;
}

.markdown-body a:hover {
    text-decoration-color: #8a74c0;
    color: #ffffff;
}

.markdown-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #e2e8f0;
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.markdown-body pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-left: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-btn {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease, transform 0.2s ease;
}

.lang-btn:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.lang-switcher .separator {
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
}

/* For when sticky nav makes items dark */
#navbar.bg-white .lang-btn {
    color: rgba(0, 0, 0, 0.6);
}

#navbar.bg-white .lang-btn:hover {
    color: var(--bg-gradient-start);
}

#navbar.bg-white .lang-switcher .separator {
    color: rgba(0, 0, 0, 0.2);
}

#navbar.bg-white .lang-switcher {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 8rem 1rem 4rem;
    }

    .blog-hero-content {
        padding: 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .content-wrapper {
        padding: 1.5rem;
    }
}
