/* Better Mobile Blog Theme Override
   Aligns django-blog-plus styles with the site's purple-gradient theme */

:root {
    --lotus-extras-primary: #7C3AED;
    --lotus-extras-primary-dark: #6D28D9;
    --lotus-extras-gradient: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 50%, #5B21B6 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;
}

/* Typography - match site fonts */
#lotus-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#lotus-content h1,
#lotus-content h2,
#lotus-content h3,
#lotus-content h4,
#lotus-content h5,
#lotus-content h6,
.lotus-extras-featured-article-title,
.lotus-extras-article-card-title,
.lotus-extras-article-title,
.lotus-extras-page-title,
.blog-hero-title {
    font-family: 'Poppins', sans-serif;
}

/* Blog mobile header - keep purple background on small screens (override theme white) */
.blog-header .wsmobileheader {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 50%, #5B21B6 100%) !important;
    box-shadow: none;
}

.blog-header .wsmobileheader .smllogo a {
    color: #fff;
}

/* Hamburger icon visible on purple */
.blog-header .wsmobileheader .wsanimated-arrow span,
.blog-header .wsmobileheader .wsanimated-arrow span:before,
.blog-header .wsmobileheader .wsanimated-arrow span:after {
    background: #fff !important;
}

/* Blog Hero Section - top spacing clears fixed header so subtitle doesn't overlap logo */
.blog-hero {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 50%, #5B21B6 100%);
    margin-top: 0;
    padding: 95px 0 50px; /* padding-top clears fixed header, reduced per request */
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.blog-hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.blog-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
    font-family: 'Inter', sans-serif;
}

/* Blog Category Sub-Navigation */
.blog-category-nav {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-category-nav .container {
    max-width: 1140px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.blog-category-nav .container::-webkit-scrollbar {
    display: none;
}

.blog-category-link {
    display: inline-block;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.blog-category-link:hover {
    color: #7C3AED;
}

.blog-category-link.active {
    color: #7C3AED;
    border-bottom-color: #7C3AED;
    font-weight: 600;
}

/* Blog container */
.lotus-extras-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Featured Article Override */
.lotus-extras-featured-article-overlay {
    background: linear-gradient(135deg, #3b1d73 0%, #5B21B6 50%, rgba(91, 33, 182, 0.85) 100%);
}

.lotus-extras-featured-article-category {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

.lotus-extras-featured-article:hover {
    box-shadow: 0 20px 40px rgba(107, 38, 212, 0.2);
}

/* Article Cards Override */
.lotus-extras-article-card:hover {
    border-color: #7C3AED;
    box-shadow: 0 12px 32px rgba(107, 38, 212, 0.12);
}

.lotus-extras-article-card-category {
    color: #7C3AED;
}

.lotus-extras-article-card-placeholder {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

/* Article card image: fill the wrapper (no empty purple space) */
.lotus-extras-article-card-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    display: block;
}

.lotus-extras-article-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Article Detail Override */
.lotus-extras-article-detail .breadcrumb-item a {
    color: #7C3AED;
    text-decoration: none;
    font-weight: 500;
}

.lotus-extras-article-detail .breadcrumb-item a:hover {
    color: #5B21B6;
}

.lotus-extras-article-detail .lotus-extras-article-content a {
    color: #7C3AED;
}

.lotus-extras-article-detail .lotus-extras-article-content a:hover {
    color: #5B21B6;
}

/* CTA Block Override */
.lotus-extras-cta-block {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 50%, #5B21B6 100%);
}

.lotus-extras-cta-button {
    color: #7C3AED;
}

.lotus-extras-cta-button:hover {
    box-shadow: 0 4px 12px rgba(107, 38, 212, 0.25);
    color: #5B21B6;
}

/* Tags Override */
.lotus-extras-tag {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

/* Pagination Override */
.lotus-extras-blog-container .pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 40px;
    padding: 0;
    list-style: none;
}

.lotus-extras-blog-container .pagination .page-link {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.lotus-extras-blog-container .pagination .page-link:hover {
    background: #7C3AED;
    border-color: #7C3AED;
    color: #fff;
}

.lotus-extras-blog-container .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    border-color: #7C3AED;
    color: #fff;
}

/* Article Nav (Prev/Next) Override */
.lotus-extras-article-nav {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.lotus-extras-article-nav a {
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    flex: 1;
}

.lotus-extras-article-nav a:hover {
    border-color: #7C3AED;
    box-shadow: 0 4px 12px rgba(107, 38, 212, 0.1);
}

.lotus-extras-article-nav a span {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}

.lotus-extras-article-nav a strong {
    display: block;
    color: #1e293b;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
}

.lotus-extras-article-nav-next {
    text-align: right;
}

/* Author Box Override */
.lotus-extras-author-box {
    border-color: #e2e8f0;
}

/* Reading Progress Bar Override */
.lotus-extras-reading-progress {
    background: linear-gradient(90deg, #8B5CF6, #6D28D9);
}

/* Empty State */
.lotus-extras-page-header {
    text-align: center;
    padding: 60px 0;
}

.lotus-extras-page-title {
    font-family: 'Poppins', sans-serif;
}

.lotus-extras-page-title .lotus-extras-highlight {
    color: #7C3AED;
}

/* Article Cover in Detail */
.lotus-extras-article-cover {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}

.lotus-extras-article-cover-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Featured image */
.lotus-extras-article-featured-image {
    margin: 32px 0;
}

.lotus-extras-article-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Article tags section */
.lotus-extras-article-tags {
    margin: 32px 0;
    font-family: 'Inter', sans-serif;
}

.lotus-extras-article-tags strong {
    margin-right: 8px;
    color: #475569;
}

/* Article meta row */
.lotus-extras-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Category hero title - smaller than article hero */
.blog-hero-title.category-title {
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 700;
}

/* Category page breadcrumb */
.category-breadcrumb {
    padding: 0 0 8px;
}

.category-breadcrumb .breadcrumb {
    margin-bottom: 0;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.category-breadcrumb .breadcrumb-item a {
    color: #7C3AED;
    text-decoration: none;
    font-weight: 500;
}

.category-breadcrumb .breadcrumb-item a:hover {
    color: #5B21B6;
}

.category-breadcrumb .breadcrumb-item.active {
    color: #94a3b8;
}

/* Breadcrumb */
.breadcrumb {
    --bs-breadcrumb-divider: "/";
}

.lotus-extras-article-detail .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 24px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.lotus-extras-article-detail .breadcrumb-item.active {
    color: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-hero {
        padding: 85px 0 32px; /* clear fixed header on mobile */
    }

    .blog-hero-title {
        font-size: 28px;
    }

    .blog-hero-title.category-title {
        font-size: 22px;
    }

    .blog-hero-subtitle {
        font-size: 16px;
    }

    .lotus-extras-article-nav {
        flex-direction: column;
    }

    .lotus-extras-article-nav-next {
        text-align: left;
    }
}
