/* ==========================================================================
   DuoVibers Blog Premium Editorial Design System (Light Theme)
   ========================================================================== */

/* Light Theme Variables scoped to blog pages */
body.blog-page {
    --bg-color: #FAFAFC;
    --bg-secondary: #FFFFFF;
    --primary-color: #37AC6E;
    --primary-light: #25855A;
    --text-color: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --font-family: 'Sora', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Light Theme Header Navigation */
body.blog-page .header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #E2E8F0;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.02);
}

body.blog-page .header .logo img {
    filter: brightness(0.12) drop-shadow(0 0 1px rgba(0, 0, 0, 0.1));
}

body.blog-page .nav a {
    color: #475569;
}

body.blog-page .nav a:hover {
    color: var(--post-primary, #843EB6);
}

body.blog-page .nav a.active {
    color: var(--post-primary, #843EB6) !important;
    font-weight: 600;
}

body.blog-page .nav a.active::after {
    width: 100%;
    background: var(--post-primary, #843EB6);
}

body.blog-page .header .btn-primary {
    background: var(--post-button-gradient, linear-gradient(135deg, #4C1361 0%, #843EB6 100%));
    border-color: transparent;
    color: #FFFFFF;
    box-shadow: 0 2px 10px var(--post-button-shadow, rgba(132, 62, 182, 0.3));
}

body.blog-page .header .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--post-button-shadow, rgba(132, 62, 182, 0.45));
    color: #FFFFFF;
}

/* Main Layout & Unified Width Container */
.blog-main {
    padding-top: 104px;
    padding-bottom: 120px;
    background-color: #FAFAFC;
}

.blog-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Article Header Section */
.blog-header {
    margin-bottom: 28px;
}

.blog-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 20px;
}

.blog-breadcrumbs a {
    color: #64748B;
}

.blog-breadcrumbs a:hover {
    color: var(--post-primary, #843EB6);
}

.blog-breadcrumbs .sep {
    opacity: 0.4;
}

.blog-post-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #0F172A;
    margin-bottom: 18px;
}

.blog-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.875rem;
    color: #64748B;
}

.blog-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #CBD5E1;
}

.blog-category-badge {
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--post-badge-bg, rgba(132, 62, 182, 0.12));
    color: var(--post-badge-text, #843EB6);
    font-size: 0.775rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--post-badge-border, rgba(132, 62, 182, 0.25));
}

/* Cover Image Hero Container */
.blog-cover-wrapper {
    width: 100%;
    margin-bottom: 44px;
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.blog-cover-img {
    width: 100%;
    height: auto;
    max-height: 480px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-cover-wrapper:hover .blog-cover-img {
    transform: scale(1.01);
}

/* 2-Column Article Layout Grid */
.blog-layout-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 52px;
    align-items: start;
    position: relative;
    width: 100%;
}

/* Left Sidebar (Sticky Reading Time & TOC) */
.blog-left-sidebar {
    position: sticky;
    top: 108px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Reading Time Pill */
.reading-time-pill {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.reading-time-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 10px;
}

.reading-time-header svg {
    color: var(--post-primary, #843EB6);
}

.reading-progress-track {
    width: 100%;
    height: 5px;
    background: #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--post-progress-gradient, linear-gradient(90deg, #4C1361 0%, #843EB6 100%));
    border-radius: 10px;
    transition: width 0.1s linear;
}

/* Table of Contents */
.blog-toc-widget {
    background: transparent;
}

.blog-toc-title {
    font-size: 0.725rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748B;
    margin-bottom: 14px;
}

.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-toc-link {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.45;
    display: block;
    padding: 4px 0 4px 12px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.blog-toc-link:hover {
    color: #0F172A;
    border-left-color: #CBD5E1;
}

.blog-toc-link.active {
    color: var(--post-primary, #843EB6);
    font-weight: 600;
    border-left-color: var(--post-primary, #843EB6);
    background: var(--post-badge-bg, rgba(132, 62, 182, 0.08));
    border-radius: 0 6px 6px 0;
}

/* Article Body Content */
.blog-article-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: #334155;
}

.blog-article-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #0F172A;
    margin-top: 44px;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
    scroll-margin-top: 115px;
}

.blog-article-content h2:first-child {
    margin-top: 0;
}

.blog-article-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #0F172A;
    margin-top: 32px;
    margin-bottom: 14px;
    scroll-margin-top: 115px;
}

.blog-article-content p {
    margin-bottom: 22px;
}

.blog-article-content ul, .blog-article-content ol {
    margin-bottom: 26px;
    padding-left: 22px;
}

.blog-article-content li {
    margin-bottom: 10px;
    color: #334155;
}

.blog-article-content strong {
    color: #0F172A;
    font-weight: 600;
}

/* Image Visual Container */
.blog-img-container {
    margin: 36px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
}

.blog-body-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.blog-img-container figcaption {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #64748B;
    text-align: center;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
}

/* In-Article App Promotion Card (Simple & Neat Flat Style) */
.app-cta-card {
    margin: 40px 0;
    padding: 26px 28px;
    background: #FFFFFF;
    border: 1px solid var(--post-card-border, rgba(132, 62, 182, 0.25));
    border-left: 4px solid var(--post-primary, #843EB6);
    border-radius: 14px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.app-cta-card::before {
    display: none;
}

.app-cta-card:hover {
    border-color: var(--post-primary, #843EB6);
    background: #FAF5FF;
    box-shadow: none;
}

.app-cta-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.app-cta-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

.app-cta-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--post-badge-text, #843EB6);
    background: var(--post-badge-bg, rgba(132, 62, 182, 0.1));
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 4px;
}

.app-cta-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0F172A;
    margin: 0;
    line-height: 1.3;
}

.app-cta-desc {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
}

.app-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 22px;
    background: var(--post-button-gradient, linear-gradient(135deg, #4C1361 0%, #843EB6 100%));
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    border: none;
    box-shadow: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.app-cta-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: none;
    color: #FFFFFF;
}

/* Floating Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #0F172A;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 900;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background: var(--post-primary, #843EB6);
    border-color: var(--post-primary, #843EB6);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Mobile Bottom Sticky Conversion Bar (< 768px) */
.mobile-app-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid #E2E8F0;
    padding: 12px 20px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
    animation: slideUpBar 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideUpBar {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.mobile-app-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-app-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.mobile-app-text h5 {
    font-size: 0.925rem;
    font-weight: 600;
    color: #0F172A;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.mobile-app-sub {
    font-size: 0.75rem;
    color: #64748B;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mobile-app-btn {
    padding: 9px 18px;
    background: var(--post-button-gradient, linear-gradient(135deg, #4C1361 0%, #843EB6 100%));
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
    box-shadow: 0 4px 14px var(--post-button-shadow, rgba(132, 62, 182, 0.35));
    text-decoration: none;
}

/* ==========================================================================
   Blog Hub Page Styles (/blog/index.html)
   ========================================================================== */
.blog-hub-hero {
    text-align: center;
    padding: 48px 0 32px;
}

.blog-hub-title {
    font-size: clamp(2.4rem, 4.5vw, 3.5rem);
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 14px;
}

.blog-hub-subtitle {
    font-size: 1.1rem;
    color: #475569;
    max-width: 580px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.blog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 44px;
    flex-wrap: wrap;
}

.blog-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-filter-btn {
    padding: 8px 18px;
    border-radius: 100px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-filter-btn:hover, .blog-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
}

.blog-search-box {
    position: relative;
    width: 270px;
}

.blog-search-input {
    width: 100%;
    padding: 9px 16px 9px 40px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 100px;
    color: #0F172A;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.blog-search-input:focus {
    border-color: var(--primary-color);
}

.blog-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

a.blog-card, .blog-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(55, 172, 110, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
}

.blog-card-img-wrapper {
    width: 100%;
    height: 190px;
    overflow: hidden;
    position: relative;
    background: #F1F5F9;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.03);
}

.blog-card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #64748B;
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0F172A;
    line-height: 1.35;
    margin-bottom: 10px;
}

.blog-card-desc {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 18px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #F1F5F9;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563EB;
}

/* Light Theme Footer Override */
body.blog-page .footer {
    background-color: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    color: #64748B;
}

body.blog-page .footer-follow-text {
    color: #64748B;
}

body.blog-page .social-link {
    color: #64748B;
}

body.blog-page .social-link:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
    .blog-layout-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .blog-left-sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .mobile-app-bar {
        display: flex;
    }

    .blog-main {
        padding-bottom: 150px;
    }

    .back-to-top-btn {
        bottom: 80px;
    }
}
