/* ============================================
   Work Wins Blog Styles
   Premium visual polish for blog pages
   ============================================ */

/* ============================================
   BLOG PAGE - Shared Styles
   ============================================ */

.blog-page {
    background: var(--bg-primary);
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 32px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(-4px);
}

/* ============================================
   BLOG LISTING PAGE
   ============================================ */

/* Hero Section */
.blog-hero {
    position: relative;
    padding: 140px 0 80px;
    text-align: center;
    overflow: hidden;
}

.blog-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 77, 0, 0.03) 0%,
        rgba(191, 90, 242, 0.03) 50%,
        var(--bg-primary) 100%
    );
    z-index: -1;
}

.blog-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 77, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.blog-hero-content {
    max-width: 700px;
    margin: 0 auto 48px;
    animation: fadeInUp 0.6s ease-out;
}

.blog-hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 100px;
    margin-bottom: 24px;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    line-height: 1.1;
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Stats */
.blog-search-wrapper {
    display: flex;
    justify-content: center;
}

.blog-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 20px 32px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.blog-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.blog-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.blog-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Posts Grid */
.blog-grid {
    padding: 60px 0;
}

.blog-grid .container {
    max-width: 1100px;
}

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

/* Blog Card - Enhanced Design */
.blog-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out both;
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0, 0, 0, 0.04);
    pointer-events: none;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px;
    text-decoration: none;
    color: inherit;
}

/* Category Badge - Color Coded */
.blog-card .blog-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    width: fit-content;
}

/* Category Colors */
.blog-card .blog-category[data-category="Technology"] {
    background: rgba(10, 132, 255, 0.1);
    color: var(--efficiency);
}

.blog-card .blog-category[data-category="Personal Development"] {
    background: rgba(255, 77, 0, 0.1);
    color: var(--primary);
}

.blog-card .blog-category[data-category="Business"] {
    background: rgba(48, 209, 88, 0.1);
    color: var(--quality);
}

.blog-card .blog-category[data-category="Health & Wellness"] {
    background: rgba(191, 90, 242, 0.1);
    color: var(--enablement);
}

/* Default category style */
.blog-card .blog-category {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.blog-card h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.35;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.blog-card:hover h2 {
    color: var(--primary);
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card time::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* Newsletter Section */
.blog-newsletter {
    padding: 60px 0 80px;
}

.newsletter-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 48px 56px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: var(--radius-xl);
    color: white;
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 77, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.newsletter-content {
    position: relative;
    z-index: 1;
}

.newsletter-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 77, 0, 0.2);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 100px;
    margin-bottom: 16px;
}

.newsletter-card h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.newsletter-card p {
    color: #a0a0a0;
    font-size: 1rem;
}

.newsletter-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.newsletter-note {
    font-size: 0.8rem;
    color: #666;
}

/* ============================================
   BLOG POST PAGE
   ============================================ */

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

/* Article Header */
.article-header {
    padding: 140px 0 60px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.article-header .container {
    max-width: 900px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb svg {
    width: 14px;
    height: 14px;
    opacity: 0.4;
}

/* Article Header Content */
.article-header-content {
    animation: fadeInUp 0.6s ease-out;
}

.article-category {
    display: inline-block;
    padding: 8px 18px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 100px;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 800px;
}

.article-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 700px;
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.author-avatar span {
    color: white;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.article-date {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Article Actions */
.article-actions {
    display: flex;
    gap: 8px;
}

.share-btn,
.bookmark-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.share-btn:hover,
.bookmark-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 77, 0, 0.05);
}

/* Article Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1100px) {
    .article-layout {
        grid-template-columns: 1fr 280px;
    }
}

/* Article Content */
.article-content {
    max-width: 760px;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.tldr-box {
    background: var(--surface-secondary, #f8f9fa);
    border-left: 4px solid var(--accent-gold, #c9a84c);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 0 0 32px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.tldr-box strong {
    color: var(--text-primary);
    font-weight: 700;
    margin-right: 6px;
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 56px 0 20px;
    color: var(--text-primary);
    scroll-margin-top: 100px;
    position: relative;
    padding-left: 20px;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.35rem;
    margin: 40px 0 16px;
    color: var(--text-primary);
    scroll-margin-top: 100px;
}

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

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.2s;
}

.article-content a:hover {
    color: var(--primary-dark);
    text-decoration-thickness: 2px;
}

.article-content ul,
.article-content ol {
    margin: 24px 0;
    padding-left: 28px;
}

.article-content li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.article-content li::marker {
    color: var(--primary);
}

.article-content blockquote {
    margin: 36px 0;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(255, 77, 0, 0.04) 0%, rgba(191, 90, 242, 0.04) 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-primary);
}

.article-content pre {
    margin: 28px 0;
    padding: 24px;
    background: #1a1a1a;
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.article-content code {
    font-family: 'SF Mono', 'Fira Code', Monaco, monospace;
    font-size: 0.9rem;
}

.article-content pre code {
    color: #e5e5e5;
}

.article-content p code,
.article-content li code {
    background: var(--bg-secondary);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 36px 0;
    box-shadow: var(--shadow-md);
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Tables */
.article-content table {
    width: 100%;
    margin: 28px 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.article-content th,
.article-content td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-content th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.article-content tr:hover td {
    background: rgba(255, 77, 0, 0.02);
}

/* Horizontal Rules / Dividers */
.article-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}

/* Mobile TOC */
.toc-mobile {
    display: block;
    margin-bottom: 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

@media (min-width: 1100px) {
    .toc-mobile {
        display: none;
    }
}

.toc-mobile summary {
    padding: 18px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.toc-mobile summary::-webkit-details-marker {
    display: none;
}

.toc-mobile summary .chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.toc-mobile[open] summary .chevron {
    transform: rotate(180deg);
}

.toc-mobile .toc-content {
    padding: 0 20px 20px;
}

/* TOC Sidebar */
.toc-sidebar {
    display: none;
}

@media (min-width: 1100px) {
    .toc-sidebar {
        display: block;
        position: sticky;
        top: 100px;
        height: fit-content;
    }
}

.toc {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.toc h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    font-weight: 600;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 4px;
}

.toc-list a {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-left: 2px solid transparent;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all 0.2s;
}

.toc-list a:hover {
    color: var(--primary);
    background: rgba(255, 77, 0, 0.05);
}

.toc-list a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(255, 77, 0, 0.05);
    font-weight: 500;
}

.toc-list .toc-h3 {
    padding-left: 24px;
}

.toc-list .toc-h3 a {
    font-size: 0.8rem;
}

/* Sidebar CTA */
.sidebar-cta {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}

.sidebar-cta p {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.sidebar-cta .btn {
    width: 100%;
    justify-content: center;
}

/* FAQ Section */
.faq-section {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.faq-section h2 {
    margin-top: 0 !important;
    padding-left: 0 !important;
}

.faq-section h2::before {
    display: none;
}

.faq-item {
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    margin: 0 !important;
    padding: 20px 24px;
    font-size: 1.05rem !important;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item p {
    padding: 0 24px 20px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Related Section */
.related-section {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.related-section h2 {
    margin-top: 0 !important;
    padding-left: 0 !important;
    font-size: 1.5rem;
}

.related-section h2::before {
    display: none;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.related-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 77, 0, 0.2);
}

.related-card .related-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
}

.related-card h3 {
    font-size: 1rem !important;
    margin: 0 !important;
    color: var(--text-primary);
    line-height: 1.45;
}

/* Article CTA */
.article-cta {
    margin-top: 64px;
    padding: 48px;
    background: linear-gradient(135deg, rgba(255, 77, 0, 0.04) 0%, rgba(191, 90, 242, 0.04) 100%);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid rgba(255, 77, 0, 0.1);
}

.cta-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.article-cta h3 {
    margin: 0 0 12px !important;
    font-size: 1.5rem !important;
    color: var(--text-primary);
}

.article-cta > p {
    margin-bottom: 28px !important;
    color: var(--text-secondary);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.article-cta .btn {
    margin-bottom: 12px;
}

.article-cta .btn-primary {
    background: var(--primary);
    color: white;
}

.article-cta .btn-primary svg {
    fill: white;
}

.cta-note {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 77, 0, 0.3);
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(255, 77, 0, 0.4);
}

/* ============================================
   BLOG FOOTER
   ============================================ */

.blog-footer {
    padding: 60px 24px 32px;
    background: #000000;
    color: white;
}

.blog-footer .footer-content {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.blog-footer .footer-brand {
    max-width: 280px;
}

.blog-footer .footer-brand .logo {
    color: white;
    margin-bottom: 14px;
}

.blog-footer .footer-brand .logo-icon {
    background: var(--primary);
}

.blog-footer .footer-brand p {
    color: #86868b;
    font-size: 0.9rem;
}

.blog-footer .footer-links {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.blog-footer .footer-column h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #86868b;
    margin-bottom: 16px;
}

.blog-footer .footer-column a {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.blog-footer .footer-column a:hover {
    color: var(--primary);
}

.blog-footer .footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #38383a;
    text-align: center;
}

.blog-footer .footer-bottom p {
    color: #636366;
    font-size: 0.8rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .newsletter-card {
        flex-direction: column;
        text-align: center;
        padding: 36px 28px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .article-actions {
        align-self: flex-start;
    }
}

@media (max-width: 640px) {
    .blog-hero {
        padding: 120px 0 60px;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero-subtitle {
        font-size: 1rem;
    }

    .blog-stats {
        padding: 16px 24px;
        gap: 16px;
    }

    .blog-stat-value {
        font-size: 1.25rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-description {
        font-size: 1rem;
    }

    .article-layout {
        padding: 40px 20px;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.4rem;
        margin: 40px 0 16px;
    }

    .article-content h3 {
        font-size: 1.15rem;
    }

    .article-cta {
        padding: 32px 24px;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .blog-footer .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .blog-footer .footer-links {
        flex-direction: column;
        gap: 32px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .related-card,
    .scroll-top,
    .reading-progress {
        transition: none;
    }

    .blog-card {
        animation: none;
    }
}
