/* Blog Styles - World-Class Design with Theme Integration */

/* Blog-specific CSS Custom Properties */
:root {
    --blog-gradient-primary: linear-gradient(135deg, var(--theme-primary) 0%, #3b82f6 100%);
    --blog-gradient-hero: linear-gradient(135deg, var(--theme-primary) 0%, #6366f1 50%, #8b5cf6 100%);
    --blog-shadow-card: var(--theme-shadow-light);
    --blog-shadow-elevated: var(--theme-shadow-heavy);
    --blog-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --blog-border-radius: 12px;
    --blog-border-radius-lg: 20px;
}

/* Dark theme blog adjustments - Remove since using shared theme system */
[data-theme="dark"] {
    /* Use shared theme variables */
}

/* Blog Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Blog Header */
.blog-header {
    background: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.blog-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    min-height: 60px;
}

.blog-logo-section {
    display: flex;
    align-items: center;
}

.blog-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--theme-text-primary);
    transition: var(--blog-transition);
}

.blog-logo-link:hover {
    transform: translateY(-1px);
}

.blog-logo {
    height: 36px;
    width: auto;
    margin-right: 12px;
}

.blog-title-wrapper {
    display: flex;
    flex-direction: column;
}

.blog-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--theme-text-primary);
}

.blog-subtitle {
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
    font-weight: 500;
    margin-top: -2px;
}

.blog-nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.blog-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.blog-nav-link {
    color: var(--theme-nav-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: var(--blog-transition);
}

.blog-nav-link:hover {
    color: var(--theme-primary);
    background: var(--theme-bg-secondary);
    transform: translateY(-1px);
}

/* Reuse existing theme-toggle styling and extend it for blog page */
.theme-toggle {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--theme-text-secondary);
    transition: var(--blog-transition);
}

.theme-toggle:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: var(--theme-primary);
    transform: scale(1.05);
}

.theme-toggle .theme-icon {
    fill: var(--theme-text-secondary);
    transition: all 0.2s ease;
}

.theme-toggle:hover .theme-icon {
    fill: var(--theme-primary);
}

.theme-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Blog Hero Section */
.blog-hero {
    background: var(--blog-gradient-hero);
    padding: 4rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="36" cy="14" r="2"/><circle cx="6" cy="44" r="2"/><circle cx="36" cy="44" r="4"/></g></svg>') repeat;
    opacity: 0.3;
}

.blog-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.blog-hero-text {
    color: white;
}

.blog-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.blog-hero-highlight {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.blog-hero-stats {
    display: flex;
    gap: 2rem;
}

.blog-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.blog-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.blog-stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
}

.blog-hero-visual {
    display: flex;
    justify-content: center;
}

.blog-hero-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--blog-border-radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--blog-shadow-elevated);
}

.blog-hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.blog-hero-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.blog-hero-card-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-hero-preview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-hero-preview-item:last-child {
    border-bottom: none;
}

.blog-preview-icon {
    font-size: 1.25rem;
}

.blog-preview-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Blog Main Content */
.blog-main {
    padding: 4rem 0;
    background: var(--theme-bg-primary);
}

/* Coming Soon Section */
.blog-coming-soon {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.blog-coming-soon-content {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: var(--blog-border-radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--blog-shadow-card);
}

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

.blog-coming-soon-icon svg {
    width: 28px;
    height: 28px;
}

.blog-coming-soon-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-bottom: 1rem;
}

.blog-coming-soon-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--theme-text-secondary);
    margin-bottom: 3rem;
}

.blog-coming-soon-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
    padding: 1.5rem;
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border);
    border-radius: var(--blog-border-radius);
    transition: var(--blog-transition);
}

.blog-feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-card);
    border-color: var(--theme-primary);
}

.blog-feature-icon {
    font-size: 1.5rem;
    background: var(--theme-bg-secondary);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blog-feature-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-bottom: 0.5rem;
}

.blog-feature-description {
    color: var(--theme-text-secondary);
    line-height: 1.5;
}

.blog-cta-section {
    text-align: center;
}

.blog-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--blog-gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--blog-border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--blog-transition);
    box-shadow: var(--blog-shadow-card);
}

.blog-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-elevated);
}

.blog-cta-button svg {
    width: 20px;
    height: 20px;
}

.blog-cta-note {
    color: var(--theme-text-secondary);
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Blog Footer */
.blog-footer {
    background: var(--theme-bg-secondary);
    border-top: 1px solid var(--theme-border);
    padding: 3rem 0 2rem;
}

.blog-footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.blog-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-footer-logo {
    width: 120px;
    height: auto;
}

.blog-footer-tagline {
    color: var(--theme-text-secondary);
    line-height: 1.5;
}

.blog-footer-links {
    display: flex;
    gap: 3rem;
}

.blog-footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-footer-title {
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-bottom: 0.5rem;
}

.blog-footer-link {
    color: var(--theme-text-secondary);
    text-decoration: none;
    transition: var(--blog-transition);
}

.blog-footer-link:hover {
    color: var(--theme-primary);
}

.blog-footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--theme-border);
    text-align: center;
}

.blog-footer-copyright {
    color: var(--theme-text-secondary);
    font-size: 0.875rem;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .blog-container {
        padding: 0 1rem;
    }

    .blog-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .blog-nav-controls {
        gap: 1rem;
    }

    .blog-nav-links {
        gap: 1rem;
    }

    .blog-hero {
        padding: 3rem 0 4rem;
    }

    .blog-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .blog-hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    .blog-main {
        padding: 3rem 0;
    }

    .blog-coming-soon-content {
        padding: 2rem 1.5rem;
    }

    .blog-coming-soon-title {
        font-size: 1.875rem;
    }

    .blog-coming-soon-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .blog-footer-links {
        justify-content: center;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .blog-hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .blog-feature {
        flex-direction: column;
        text-align: center;
    }

    .blog-footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Blog Post Grid Mobile Styles */
    .blog-featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .blog-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Individual Blog Post Mobile Styles */
    .blog-post-article {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .blog-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .blog-post-author {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-share-buttons {
        flex-direction: column;
    }

    .blog-post-navigation {
        flex-direction: column;
        text-align: center;
    }

    .blog-related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-related-posts {
        margin-top: 3rem;
        padding: 0 1rem;
    }
}

/* Blog Post Grid Styles */
.blog-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-bottom: 0.5rem;
}

.blog-section-description {
    font-size: 1.125rem;
    color: var(--theme-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Featured Posts Grid */
.blog-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.blog-featured-card {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: var(--blog-border-radius);
    overflow: hidden;
    transition: var(--blog-transition);
    box-shadow: var(--blog-shadow-card);
}

.blog-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--blog-shadow-elevated);
    border-color: var(--theme-primary);
}

/* Recent Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-post-card {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: var(--blog-border-radius);
    overflow: hidden;
    transition: var(--blog-transition);
    box-shadow: var(--blog-shadow-card);
}

.blog-post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-elevated);
    border-color: var(--theme-primary);
}

/* Blog Card Components */
.blog-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
}

.blog-card-category {
    background: var(--theme-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card-date,
.blog-card-read-time {
    font-weight: 500;
}

.blog-card-title {
    margin-bottom: 0.75rem;
}

.blog-card-title a {
    color: var(--theme-text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: var(--theme-primary);
}

.blog-card-excerpt {
    color: var(--theme-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
}

.blog-card-author {
    font-weight: 500;
}

.blog-card-views {
    background: var(--theme-bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Individual Blog Post Styles */
.blog-post-main {
    padding: 2rem 0 4rem;
    background: var(--theme-bg-primary);
}

.blog-post-article {
    max-width: 800px;
    margin: 0 auto;
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: var(--blog-border-radius);
    padding: 3rem;
    box-shadow: var(--blog-shadow-card);
}

.blog-post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--theme-border);
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
    flex-wrap: wrap;
}

.blog-post-category {
    background: var(--theme-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-post-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--theme-text-primary);
    margin-bottom: 1rem;
}

.blog-post-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--theme-text-secondary);
    margin-bottom: 2rem;
}

.blog-post-author {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-post-tag {
    color: var(--theme-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.blog-post-featured-image {
    margin-top: 2rem;
    border-radius: var(--blog-border-radius);
    overflow: hidden;
}

.blog-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--theme-text-primary);
    margin-bottom: 3rem;
}

.blog-post-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 2rem 0 1rem 0;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

.blog-post-content a {
    color: var(--theme-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.blog-post-content a:hover {
    color: var(--theme-primary-hover);
}

.blog-post-content strong {
    font-weight: 700;
}

/* Blog Post Footer */
.blog-post-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--theme-border);
}

.blog-post-share {
    margin-bottom: 2rem;
}

.blog-post-share h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-bottom: 1rem;
}

.blog-share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--blog-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-share-twitter {
    background: #1da1f2;
    color: white;
}

.blog-share-linkedin {
    background: #0077b5;
    color: white;
}

.blog-share-whatsapp {
    background: #25d366;
    color: white;
}

.blog-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-card);
}

.blog-post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.blog-nav-back,
.blog-nav-calculator {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--blog-transition);
}

.blog-nav-back {
    background: var(--theme-bg-primary);
    color: var(--theme-text-primary);
    border: 1px solid var(--theme-border);
}

.blog-nav-calculator {
    background: var(--theme-primary);
    color: white;
}

.blog-nav-back:hover,
.blog-nav-calculator:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-card);
}

/* Related Posts */
.blog-related-posts {
    margin-top: 4rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.blog-related-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    text-align: center;
    margin-bottom: 2rem;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.blog-related-card {
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border);
    border-radius: var(--blog-border-radius);
    overflow: hidden;
    transition: var(--blog-transition);
    box-shadow: var(--blog-shadow-card);
}

.blog-related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-elevated);
    border-color: var(--theme-primary);
}

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

/* Performance Optimizations */
.blog-hero-card,
.blog-feature,
.blog-cta-button,
.blog-post-card,
.blog-featured-card {
    will-change: transform;
}

/* Smooth animations for theme transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Focus styles for accessibility */
.blog-nav-link:focus,
.blog-theme-toggle:focus,
.blog-cta-button:focus,
.blog-footer-link:focus {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}