/**
 * Django Lotus Extras - Blog Styles
 * 
 * These styles are designed to be customizable via CSS variables.
 * Override these variables in your project's CSS to customize the appearance.
 * 
 * CSS Variable Reference:
 * --lotus-extras-primary: Primary color (default: #5DBEA3)
 * --lotus-extras-primary-dark: Dark primary color (default: #30BE93)
 * --lotus-extras-text-primary: Primary text color
 * --lotus-extras-text-secondary: Secondary text color
 * --lotus-extras-text-tertiary: Tertiary text color
 * --lotus-extras-border: Border color
 * --lotus-extras-bg-secondary: Secondary background color
 */

:root {
    --lotus-extras-primary: #5DBEA3;
    --lotus-extras-primary-dark: #30BE93;
    --lotus-extras-gradient: linear-gradient(135deg, var(--lotus-extras-primary) 0%, var(--lotus-extras-primary-dark) 100%);
    --lotus-extras-text-primary: #1e293b;
    --lotus-extras-text-secondary: #475569;
    --lotus-extras-text-tertiary: #94a3b8;
    --lotus-extras-border: #e2e8f0;
    --lotus-extras-border-light: #f1f5f9;
    --lotus-extras-bg-secondary: #f8fafc;
    --lotus-extras-radius-sm: 4px;
    --lotus-extras-radius-md: 8px;
    --lotus-extras-radius-lg: 12px;
    --lotus-extras-radius-xl: 16px;
    --lotus-extras-spacing-xs: 4px;
    --lotus-extras-spacing-sm: 8px;
    --lotus-extras-spacing-md: 16px;
    --lotus-extras-spacing-lg: 24px;
    --lotus-extras-spacing-xl: 32px;
    --lotus-extras-spacing-2xl: 48px;
}

/* Blog Main Container */
.lotus-extras-blog-main {
    background: var(--lotus-extras-bg-secondary);
    min-height: 60vh;
}

.lotus-extras-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--lotus-extras-spacing-xl) var(--lotus-extras-spacing-lg);
}

/* Featured Article Hero */
.lotus-extras-featured-article {
    position: relative;
    border-radius: var(--lotus-extras-radius-xl);
    overflow: hidden;
    margin-bottom: var(--lotus-extras-spacing-xl);
    min-height: 400px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lotus-extras-featured-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.lotus-extras-featured-article-bg {
    position: absolute;
    top: 0;
    left: 50%;
    right: 0;
    bottom: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.lotus-extras-featured-article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a4d3e 0%, #2d6a5a 50%, rgba(45, 106, 90, 0.85) 100%);
    z-index: 0;
}

.lotus-extras-featured-article-content {
    position: relative;
    z-index: 3;
    padding: var(--lotus-extras-spacing-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lotus-extras-featured-article-meta {
    display: flex;
    align-items: center;
    gap: var(--lotus-extras-spacing-md);
    margin-bottom: var(--lotus-extras-spacing-md);
}

.lotus-extras-featured-article-category {
    background: var(--lotus-extras-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: var(--lotus-extras-radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lotus-extras-featured-article-date,
.lotus-extras-featured-article-readtime {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.lotus-extras-featured-article-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: white;
    margin: 0 0 var(--lotus-extras-spacing-md) 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.lotus-extras-featured-article-intro {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

/* Article Cards Grid */
.lotus-extras-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--lotus-extras-spacing-lg);
}

.lotus-extras-articles-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--lotus-extras-spacing-lg);
    margin-bottom: var(--lotus-extras-spacing-xl);
}

/* Article Cards */
.lotus-extras-article-card {
    background: white;
    border-radius: var(--lotus-extras-radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--lotus-extras-border-light);
}

.lotus-extras-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--lotus-extras-primary);
}

.lotus-extras-article-card-image-wrapper {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lotus-extras-article-card-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lotus-extras-article-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lotus-extras-gradient);
    color: rgba(255, 255, 255, 0.3);
    font-size: 80px;
    font-weight: 800;
}

.lotus-extras-article-card-body {
    padding: var(--lotus-extras-spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lotus-extras-article-card-meta {
    display: flex;
    align-items: center;
    gap: var(--lotus-extras-spacing-sm);
    margin-bottom: var(--lotus-extras-spacing-sm);
    font-size: 13px;
}

.lotus-extras-article-card-category {
    color: var(--lotus-extras-primary);
    font-weight: 600;
}

.lotus-extras-article-card-date {
    color: var(--lotus-extras-text-tertiary);
}

.lotus-extras-article-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--lotus-extras-text-primary);
    margin: 0 0 var(--lotus-extras-spacing-sm) 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.lotus-extras-article-card-intro {
    font-size: 14px;
    color: var(--lotus-extras-text-secondary);
    line-height: 1.6;
    flex: 1;
    margin: 0;
}

/* Article Detail Styles */
.lotus-extras-article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--lotus-extras-spacing-xl) var(--lotus-extras-spacing-lg);
}

.lotus-extras-article-detail .lotus-extras-article-title {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    color: var(--lotus-extras-text-primary);
    margin: var(--lotus-extras-spacing-lg) 0 var(--lotus-extras-spacing-sm) 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.lotus-extras-article-detail .lotus-extras-article-meta {
    color: var(--lotus-extras-text-tertiary);
    font-size: 14px;
    margin-bottom: var(--lotus-extras-spacing-lg);
}

.lotus-extras-article-detail .lotus-extras-article-introduction {
    font-size: 18px;
    color: var(--lotus-extras-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--lotus-extras-spacing-lg);
    padding-bottom: var(--lotus-extras-spacing-lg);
    border-bottom: 1px solid var(--lotus-extras-border);
}

.lotus-extras-article-detail .lotus-extras-article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--lotus-extras-text-primary);
}

.lotus-extras-article-detail .lotus-extras-article-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: var(--lotus-extras-spacing-2xl);
    margin-bottom: var(--lotus-extras-spacing-md);
}

.lotus-extras-article-detail .lotus-extras-article-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: var(--lotus-extras-spacing-xl);
    margin-bottom: var(--lotus-extras-spacing-sm);
}

.lotus-extras-article-detail .lotus-extras-article-content p {
    margin-bottom: var(--lotus-extras-spacing-md);
}

.lotus-extras-article-detail .lotus-extras-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--lotus-extras-radius-md);
    margin: var(--lotus-extras-spacing-lg) 0;
}

.lotus-extras-article-detail .lotus-extras-article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: var(--lotus-extras-radius-md);
    padding: var(--lotus-extras-spacing-lg);
    overflow-x: auto;
}

.lotus-extras-article-detail .lotus-extras-article-content code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
}

.lotus-extras-article-detail .lotus-extras-article-content a {
    color: var(--lotus-extras-primary);
    text-decoration: none;
    font-weight: 500;
}

.lotus-extras-article-detail .lotus-extras-article-content a:hover {
    text-decoration: underline;
}

/* CTA Block */
.lotus-extras-cta-block {
    background: var(--lotus-extras-gradient);
    border-radius: var(--lotus-extras-radius-lg);
    padding: var(--lotus-extras-spacing-2xl);
    margin: var(--lotus-extras-spacing-2xl) 0;
    color: white;
}

.lotus-extras-cta-block h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 var(--lotus-extras-spacing-md) 0;
}

.lotus-extras-cta-block p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: var(--lotus-extras-spacing-lg);
    opacity: 0.9;
}

.lotus-extras-cta-button {
    display: inline-block;
    background: white;
    color: var(--lotus-extras-primary);
    padding: 12px 24px;
    border-radius: var(--lotus-extras-radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lotus-extras-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Page Headers */
.lotus-extras-page-header {
    margin-bottom: var(--lotus-extras-spacing-xl);
}

.lotus-extras-page-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 900;
    color: var(--lotus-extras-text-primary);
    margin: 0 0 var(--lotus-extras-spacing-sm) 0;
    letter-spacing: -0.02em;
}

.lotus-extras-page-title .lotus-extras-highlight {
    color: var(--lotus-extras-primary);
}

.lotus-extras-page-description {
    font-size: 18px;
    color: var(--lotus-extras-text-secondary);
    line-height: 1.6;
}

/* Tags */
.lotus-extras-tag {
    background: var(--lotus-extras-gradient);
    border: none;
    padding: 6px 12px;
    border-radius: var(--lotus-extras-radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
}

.lotus-extras-tag:hover {
    opacity: 0.9;
}

/* Author Box */
.lotus-extras-author-box {
    display: flex;
    gap: var(--lotus-extras-spacing-lg);
    padding: var(--lotus-extras-spacing-lg);
    background: white;
    border-radius: var(--lotus-extras-radius-lg);
    border: 1px solid var(--lotus-extras-border);
    margin: var(--lotus-extras-spacing-xl) 0;
}

.lotus-extras-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.lotus-extras-author-info h4 {
    margin: 0 0 var(--lotus-extras-spacing-xs) 0;
    font-weight: 700;
}

.lotus-extras-author-info p {
    margin: 0;
    color: var(--lotus-extras-text-secondary);
    font-size: 14px;
}

/* Reading Progress Bar */
.lotus-extras-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--lotus-extras-gradient);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    .lotus-extras-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .lotus-extras-articles-grid,
    .lotus-extras-articles-grid-2 {
        grid-template-columns: 1fr;
    }

    .lotus-extras-featured-article {
        min-height: 300px;
        grid-template-columns: 1fr;
    }

    .lotus-extras-featured-article-bg {
        position: relative;
        left: 0;
        height: 200px;
        order: -1;
    }

    .lotus-extras-featured-article-content {
        padding: var(--lotus-extras-spacing-lg);
    }

    .lotus-extras-featured-article-title {
        font-size: 24px;
    }

    .lotus-extras-blog-container {
        padding: var(--lotus-extras-spacing-lg) var(--lotus-extras-spacing-md);
    }
}

@media (max-width: 640px) {
    .lotus-extras-featured-article {
        min-height: auto;
    }

    .lotus-extras-featured-article-bg {
        height: 180px;
    }
}
