/* ========================================
   AysimaPOS Blog System CSS
   Version: 3.0.0 - Enterprise SEO Optimized
   
   Google Best Practices:
   - Core Web Vitals Optimized
   - WCAG 2.1 Level AA Compliant
   - Mobile-First Responsive
   - Semantic HTML5 Structure
   - Performance Optimized
   ======================================== */

/* ========================================
   IMPORT Landing Page Design System
   ======================================== */
@import url('./landing/variables.css');

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
    /* Layout Variables */
    --navbar-height: 60px;
    --sidebar-top-offset: 20px;
    --sidebar-bottom-padding: 20px;
    
    /* Color Palette - Landing Page Integration */
    --blog-primary: var(--primary-600);
    --blog-primary-light: var(--primary-500);
    --blog-primary-dark: var(--primary-700);
    --blog-primary-rgb: 37, 99, 235;
    
    /* Accent Colors - Landing Page Integration */
    --blog-accent: var(--primary-600);
    --blog-accent-light: var(--primary-400);
    --blog-success: var(--success-500);
    --blog-warning: var(--warning-500);
    
    /* Neutral Colors - High Contrast */
    --blog-text-primary: var(--gray-900); /* Gray-900 - WCAG AAA */
    --blog-text-secondary: var(--gray-600); /* Gray-600 - WCAG AA (7:1) */
    --blog-text-tertiary: var(--gray-500); /* Gray-500 */
    --blog-text-disabled: var(--gray-400); /* Gray-400 - Disabled state */
    --blog-bg-primary: #ffffff;
    --blog-bg-secondary: var(--gray-50); /* Gray-50 */
    --blog-bg-tertiary: var(--gray-100); /* Gray-100 */
    --blog-background: var(--gray-50); /* Alias for bg-secondary */
    --blog-surface: #ffffff; /* Alias for bg-primary */
    --blog-border: var(--gray-200); /* Gray-200 */
    
    /* Typography Scale - Perfect Fourth (1.333) */
    --blog-font-xs: 0.75rem; /* 12px */
    --blog-font-sm: 0.875rem; /* 14px */
    --blog-font-base: 1rem; /* 16px */
    --blog-font-md: 1.125rem; /* 18px */
    --blog-font-lg: 1.25rem; /* 20px */
    --blog-font-xl: 1.5rem; /* 24px */
    --blog-font-2xl: 1.875rem; /* 30px */
    --blog-font-3xl: 2.25rem; /* 36px */
    --blog-font-4xl: 3rem; /* 48px */
    
    /* Font Weights */
    --blog-font-normal: 400;
    --blog-font-medium: 500;
    --blog-font-semibold: 600;
    --blog-font-bold: 700;
    --blog-font-extrabold: 800;
    
    /* Spacing Scale - 8px base */
    --blog-space-1: 0.25rem; /* 4px */
    --blog-space-2: 0.5rem; /* 8px */
    --blog-space-3: 0.75rem; /* 12px */
    --blog-space-4: 1rem; /* 16px */
    --blog-space-5: 1.25rem; /* 20px */
    --blog-space-6: 1.5rem; /* 24px */
    --blog-space-8: 2rem; /* 32px */
    --blog-space-10: 2.5rem; /* 40px */
    --blog-space-12: 3rem; /* 48px */
    --blog-space-16: 4rem; /* 64px */
    /* Legacy aliases for backward compatibility */
    --blog-space-xs: 0.5rem; /* 8px */
    --blog-space-sm: 0.75rem; /* 12px */
    --blog-space-md: 1rem; /* 16px */
    --blog-space-lg: 1.5rem; /* 24px */
    --blog-space-xl: 2rem; /* 32px */
    --blog-space-2xl: 3rem; /* 48px */
    --blog-space-3xl: 4rem; /* 64px */
    
    /* Border Radius */
    --blog-radius-sm: 0.375rem; /* 6px */
    --blog-radius-md: 0.5rem; /* 8px */
    --blog-radius-lg: 0.75rem; /* 12px */
    --blog-radius-xl: 1rem; /* 16px */
    
    /* Shadows - Material Design 3 */
    --blog-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --blog-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --blog-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --blog-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --blog-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --blog-transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --blog-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --blog-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Section Components
   ======================================== */
.section-title {
    font-size: var(--blog-font-2xl);
    font-weight: var(--blog-font-bold);
    color: var(--gray-900);
    margin-bottom: var(--blog-space-xl);
    padding-bottom: var(--blog-space-md);
    border-bottom: 3px solid var(--primary-600);
    letter-spacing: -0.02em;
    display: inline-block;
}

/* Featured Posts Section */
.featured-posts {
    margin-bottom: var(--blog-space-2xl);
}

/* Grid pattern for featured posts (same as post content) */
.featured-posts .row {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 2rem;
    border-radius: 12px;
    --bs-gutter-x: 1rem; /* 0.5rem each side = 1rem total */
}

/* Recent Posts Section */
.recent-posts {
    margin-bottom: var(--blog-space-2xl);
}

/* Grid pattern for recent posts wrapper (includes title + content) */
.recent-posts-wrapper {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 2rem;
    border-radius: 12px;
}

.recent-posts-wrapper .row {
    --bs-gutter-x: 1rem; /* 0.5rem each side = 1rem total */
}

/* Category Posts Section */
.category-posts {
    margin-bottom: var(--blog-space-2xl);
}

/* Grid pattern for category posts (same as post content) */
.category-posts .row {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 2rem;
    border-radius: 12px;
    --bs-gutter-x: 1rem; /* 0.5rem each side = 1rem total */
}

/* ========================================
   Blog Header - Professional & Accessible
   ======================================== */
.blog-header {
    /* EXACT same gradient as landing page hero */
    background: var(--gradient-primary);
    padding: 3rem 0 2rem;
    color: var(--gray-50);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.blog-header .container {
    max-width: 1280px;
}

/* Grid Pattern Overlay (Same as Landing Hero) */
.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.2)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.8;
    pointer-events: none;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-50);
    margin-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.blog-description {
    font-size: 1.05rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    max-width: 1280px;
    margin: 0 auto 2rem;
    position: relative;
    padding: 0 1.5rem;
}

/* Internal Links in Description - SEO Optimized */
.blog-description a,
.text-link-highlight {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
    padding-bottom: 2px;
}

.blog-description a:hover,
.blog-description a:focus,
.text-link-highlight:hover,
.text-link-highlight:focus {
    color: var(--gray-50);
    border-bottom-color: rgba(255, 255, 255, 0.9);
    border-bottom-style: solid;
}

/* Strong Keywords in Description */
.blog-description strong {
    font-weight: 600;
    color: var(--gray-50);
}

/* Category Header - EXACT same as landing page hero */
.category-header {
    background: var(--gradient-primary);
}

.category-header .container {
    max-width: 1280px;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-50);
    margin-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    z-index: 10;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.category-description {
    font-size: 1.05rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    max-width: 1280px;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 10;
    padding: 0 1.5rem;
}

/* Internal Links in Category Description - SEO Optimized */
.category-description a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
    transition: all var(--blog-transition-fast);
    padding-bottom: 2px;
}

.category-description a:hover,
.category-description a:focus {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.9);
    border-bottom-style: solid;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.category-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 10;
}

.category-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-meta i {
    font-size: 0.875rem;
}

/* Blog Header CTA Buttons */
.blog-header-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

/* CTA Button Styles */
.btn-cta {
    background: var(--gradient-cta);
    color: var(--gray-50);
    border: none;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(178, 66, 25, 0.3);
}

.btn-cta:hover {
    background: var(--gradient-cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(178, 66, 25, 0.4);
    color: var(--gray-50);
}

/* Outline Light Button (for hero on dark background) */
.btn-outline-light {
    color: var(--gray-50);
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gray-50);
    color: var(--gray-50);
}

/* Blog Header Features (Trust Signals) */
.blog-header-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 10;
}

.blog-header-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-header-features i {
    color: var(--success-400);
    font-size: 1rem;
}

/* ========================================
   Breadcrumb - SEO & Accessibility
   ======================================== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: var(--blog-space-lg);
    font-size: var(--blog-font-sm);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity var(--blog-transition-fast);
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus {
    text-decoration: underline;
    opacity: 0.8;
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.95);
}

/* ========================================
   Blog Content Section
   ======================================== */
.blog-content {
    background: var(--gray-50);
    padding: var(--blog-space-2xl) 0;
}

.blog-content .container {
    max-width: 1280px;
}

.blog-content .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   Post Card - Material Design 3 Elevated
   ======================================== */
.post-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gray-200);
    height: 100%; /* Equal height cards */
    display: flex;
    flex-direction: column;
}

.post-card:hover,
.post-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-600);
}

.post-card.featured {
    border: 2px solid var(--primary-600);
    position: relative;
}

.post-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-600), var(--accent-500));
}

/* ========================================
   Post Image - Optimized for Core Web Vitals
   ======================================== */
.post-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9; /* Modern CSS - CLS prevention */
    background-color: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
    .post-image {
        padding-top: 56.25%; /* 16:9 */
        display: block;
    }
    
    .post-image img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
    }
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

/* Featured Badge - High Contrast */
.featured-badge {
    position: absolute;
    top: var(--blog-space-md);
    right: var(--blog-space-md);
    background: var(--warning-500);
    color: var(--gray-900);
    padding: var(--blog-space-xs) var(--blog-space-md);
    border-radius: 9999px; /* Full rounded */
    font-size: var(--blog-font-xs);
    font-weight: var(--blog-font-semibold);
    display: inline-flex;
    align-items: center;
    gap: var(--blog-space-xs);
    box-shadow: var(--blog-shadow-md);
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

/* Category Badge on Image - Landing Page Style */
.post-image .post-category-badge {
    position: absolute;
    bottom: var(--blog-space-md);
    left: var(--blog-space-md);
    z-index: 2;
}

/* ========================================
   Post Content - Typography Excellence
   ======================================== */
.post-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--blog-space-md);
    margin-bottom: var(--blog-space-md);
    font-size: var(--blog-font-sm);
    color: var(--gray-600);
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: var(--blog-space-xs);
}

.post-meta i {
    opacity: 0.7;
}

/* Post Category Link */
.post-category a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: var(--blog-font-semibold);
    transition: color var(--blog-transition-fast);
}

.post-category a:hover,
.post-category a:focus {
    color: var(--primary-700);
    text-decoration: underline;
}

/* Post Date */
.post-date {
    color: var(--gray-600);
}

/* Post Author */
.post-author {
    color: var(--gray-600);
}

/* Post Reading Time */
.post-time {
    color: var(--gray-600);
}

/* Post Title - Hierarchical & Accessible */
.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.015em;
    min-height: 2.6em; /* 2 lines */
}

.featured .post-title {
    font-size: 1.5rem;
    min-height: 2em;
}

.post-title a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 200ms ease;
}

.post-title a:hover,
.post-title a:focus {
    color: var(--primary-600);
    outline: none;
}

/* Post Excerpt - Readable Line Height with Line Clamp */
.post-excerpt {
    color: var(--gray-600);
    line-height: 1.65;
    margin-bottom: 1rem;
    flex-grow: 1;
    font-size: 0.95rem;
    
    /* Line clamp for consistent card heights */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Post Footer - Category + Read More */
.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}

/* Category Badge */
.post-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 1rem;
    background: var(--gradient-primary);
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
    transition: all 200ms ease;
}

.post-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.post-category-badge a {
    color: white;
    text-decoration: none;
}

/* Read More CTA - Action-Oriented with Arrow Animation */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.read-more:hover,
.read-more:focus {
    gap: 0.75rem;
    color: var(--primary-700);
    text-decoration: none;
}

.read-more i {
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.read-more:hover i {
    transform: translateX(6px);
}

/* =====================================================
   SIDEBAR COMPONENTS
   - Sticky positioning with performance optimization
   - Material Design 3 elevation for widgets
   - WCAG 2.1 touch targets (44x44px minimum)
   - Semantic hover states with proper contrast
===================================================== */

.blog-sidebar {
    position: sticky;
    top: var(--blog-space-4);
    /* Performance: contain paint for sidebar */
    contain: layout style paint;
    /* Smooth scrolling optimization */
    will-change: transform;
}

/* Widget Container - Compact Design */
.sidebar-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-100);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-widget:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--gray-200);
    transform: translateY(-2px);
}

/* Widget Title - Modern & Elegant */
.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-600);
    letter-spacing: -0.01em;
}

/* Sidebar CTA Widget - Conversion Focused */
.sidebar-cta-widget {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--accent-50) 100%);
    border: 2px solid var(--primary-600);
    position: relative;
    overflow: hidden;
}

.sidebar-cta-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-cta-widget .cta-icon {
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
}

.sidebar-cta-widget .widget-title {
    border-bottom: none;
    color: var(--primary-700);
    position: relative;
    z-index: 1;
}

.sidebar-cta-widget .trust-signals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.sidebar-cta-widget .trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.sidebar-cta-widget .trust-item i {
    font-size: 1rem;
}

/* RSS Feed Link */
.rss-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--blog-space-2);
    /* WCAG 2.1: Minimum 44x44px touch target */
    min-height: 44px;
    padding: var(--blog-space-3) var(--blog-space-4);
    background: linear-gradient(135deg, var(--cta-500) 0%, var(--cta-600) 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: var(--blog-font-semibold);
    font-size: var(--font-family-base);
    transition: all var(--blog-transition-normal);
    /* Focus state for accessibility */
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.rss-link:hover {
    background: linear-gradient(135deg, var(--cta-600) 0%, var(--danger-600) 100%);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--blog-shadow-md);
}

.rss-link:focus-visible {
    outline-color: var(--primary-600);
    outline-offset: 2px;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: var(--blog-space-2);
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* WCAG 2.1: Minimum 44x44px touch target */
    min-height: 44px;
    padding: var(--blog-space-2) var(--blog-space-3);
    color: var(--gray-900);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--blog-transition-fast);
    /* Focus state for keyboard navigation */
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.category-list li a:hover {
    background: var(--primary-500);
    color: var(--primary-600);
    text-decoration: none;
    transform: translateX(4px);
}

.category-list li a:focus-visible {
    outline-color: var(--primary-600);
    background: var(--primary-500);
}

.category-list .count {
    color: var(--gray-600);
    font-size: var(--blog-font-sm);
    font-weight: var(--blog-font-medium);
    background: var(--gray-50);
    padding: var(--blog-space-1) var(--blog-space-2);
    border-radius: var(--border-radius-sm);
}

/* Popular Posts Widget - Card Style */
.popular-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.popular-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.popular-post-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: var(--gray-50);
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    padding: 0.875rem;
}

.popular-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.popular-post-title a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.2s ease;
}

.popular-post-title a:hover {
    color: var(--primary-600);
}

.popular-post-excerpt {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 0.625rem;
}

.popular-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.popular-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.popular-category-badge a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.popular-category-badge a:hover {
    opacity: 0.9;
}

.popular-post-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--gray-600);
    white-space: nowrap;
}

.popular-post-meta i {
    opacity: 0.7;
}

/* =====================================================
   PAGINATION
   - WCAG 2.1: 44x44px minimum touch targets
   - Material Design 3 states (enabled, hover, active, disabled)
   - Proper focus indicators for keyboard navigation
===================================================== */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: var(--blog-space-8) 0;
}

.blog-pagination {
    width: 100%;
}

.blog-pagination .pagination-info {
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    gap: var(--blog-space-2);
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    display: flex;
}

.page-link {
    /* WCAG 2.1: Minimum 44x44px touch target */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--blog-space-2) var(--blog-space-3);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--gray-200);
    background: #ffffff;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: var(--blog-font-medium);
    font-size: var(--font-family-base);
    transition: all var(--blog-transition-normal);
    /* Focus state for accessibility */
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.page-link:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--blog-shadow-sm);
}

.page-link:focus-visible {
    outline-color: var(--primary-600);
    outline-offset: 2px;
}

.page-item.active .page-link {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: #ffffff;
    box-shadow: var(--blog-shadow-sm);
    /* Prevent hover effect on active */
    pointer-events: none;
}

.page-item.disabled .page-link {
    background: var(--gray-50);
    border-color: var(--gray-200);
    color: var(--gray-400);
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* =====================================================
   RESPONSIVE DESIGN
   - Mobile-first approach (base styles above)
   - Tablet breakpoint: 768px
   - Desktop breakpoint: 992px
   - Fluid typography for better readability
===================================================== */

/* Tablet: Sidebar becomes static */
@media (max-width: 991px) {
    .blog-sidebar {
        position: static;
        margin-top: var(--blog-space-8);
    }
    
    .sidebar-widget {
        margin-bottom: var(--blog-space-6);
    }
}

/* Mobile: Compact layout (Optimized for touch) */
@media (max-width: 767px) {
    /* Grid pattern containers - reduced padding for mobile */
    .featured-posts .row,
    .recent-posts-wrapper,
    .category-posts .row {
        padding: 1rem;
        border-radius: 8px;
    }

    /* Fluid typography: Optimized for mobile readability */
    .blog-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .category-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .post-title {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    /* Touch-optimized cards */
    .post-card {
        margin-bottom: 1.5rem;
    }
    
    .post-card:hover {
        transform: none; /* Disable lift on mobile for performance */
    }
    
    .post-meta {
        font-size: var(--blog-font-xs);
        flex-wrap: wrap;
    }
    
    /* Compact sidebar spacing */
    .sidebar-widget {
        padding: var(--blog-space-3);
        margin-bottom: var(--blog-space-4);
    }
    
    .widget-title {
        font-size: var(--font-family-base);
        margin-bottom: var(--blog-space-3);
    }
    
    /* Compact pagination */
    .pagination {
        gap: var(--blog-space-1);
    }
    
    .page-link {
        min-width: 40px;
        min-height: 40px;
        padding: var(--blog-space-1) var(--blog-space-2);
        font-size: var(--blog-font-sm);
    }
}

/* Extra small devices: minimal spacing */
@media (max-width: 575px) {
    .blog-title {
        font-size: var(--blog-font-xl);
    }
    
    .featured-badge {
        font-size: var(--blog-font-xs);
        padding: var(--blog-space-1) var(--blog-space-2);
    }
}

/* =====================================================
   ACCESSIBILITY ENHANCEMENTS
   - Reduced motion support for users with vestibular disorders
   - High contrast support for visually impaired
===================================================== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .blog-sidebar {
        will-change: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .post-card,
    .sidebar-widget {
        border: 2px solid currentColor;
    }
    
    .page-link {
        border: 2px solid currentColor;
    }
}

/* =====================================================
   PRINT STYLES
   - SEO: Better content sharing and archiving
   - Remove unnecessary elements (navigation, sidebar)
   - Optimize for black & white printing
===================================================== */

@media print {
    /* Hide interactive elements */
    .blog-sidebar,
    .pagination-wrapper,
    .rss-link {
        display: none !important;
    }
    
    /* Optimize typography for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    /* Prevent page breaks inside cards */
    .post-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    /* Show URLs for links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
    
    /* Optimize images for print */
    .post-image {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* ========================================
   BLOG SHOW PAGE SIDEBAR - SEO Optimized
   Mobile-First Design with Sticky Positioning
   ======================================== */

/* Sidebar Container */
.blog-sidebar {
    font-size: var(--blog-font-sm);
}

/* Sidebar Widgets */
.blog-sidebar .card {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.blog-sidebar .card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.blog-sidebar .card-header {
    background-color: var(--gray-100);
    border-bottom: 2px solid var(--primary-600);
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: var(--font-family-base);
    color: var(--gray-900);
}

.blog-sidebar .card-body {
    padding: 1rem;
}

/* Table of Contents Widget */
.toc-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    color: var(--gray-600);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.toc-list a:hover {
    color: var(--primary-600);
    background-color: var(--gray-50);
    padding-left: 0.75rem;
}

.toc-list a.active {
    color: var(--primary-600);
    font-weight: 600;
    background-color: rgba(var(--blog-primary-rgb), 0.1);
    border-left: 3px solid var(--primary-600);
    padding-left: 0.75rem;
}

/* TOC Nested (H3 under H2) */
.toc-list .toc-nested {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    border-left: 2px solid var(--gray-200);
}

.toc-list .toc-nested li {
    margin-bottom: 0.25rem;
}

.toc-list .toc-nested a {
    font-size: var(--blog-font-xs);
    color: var(--gray-500);
}

/* Author Widget */
.author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-info i {
    font-size: 2rem;
    color: var(--primary-600);
}

.author-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-size: var(--font-family-base);
}

.author-role {
    color: var(--gray-600);
    font-size: var(--blog-font-xs);
}

/* Category Widget */
.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--gray-50);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-link:hover {
    background-color: var(--primary-600);
    color: white;
    transform: translateX(4px);
}

/* Sidebar Mini Post Cards */
.post-card-mini {
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.post-card-mini:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.post-card-mini .post-image {
    height: 120px;
    overflow: hidden;
}

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

.post-card-mini:hover .post-image img {
    transform: scale(1.08);
}

.post-card-mini .post-content {
    padding: 0.75rem;
}

.post-card-mini .post-title {
    font-size: var(--blog-font-sm);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
}

.post-card-mini .post-title a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-card-mini .post-title a:hover {
    color: var(--primary-600);
}

.post-card-mini .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: var(--blog-font-xs);
    color: var(--gray-500);
}

.post-card-mini .post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-card-mini .post-meta i {
    font-size: 0.875em;
}

/* Back to Blog Button */
.btn-back-to-blog {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-back-to-blog:hover {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

/* Sidebar Post Card Overrides - Compact Style */
.blog-sidebar .post-card .post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.blog-sidebar .post-card .post-content {
    padding: 0.5rem;
}

.blog-sidebar .post-card .post-excerpt {
    margin: 0.5rem 0;
}

.blog-sidebar .post-card .post-footer {
    margin-top: 0.5rem;
}

/* Responsive Behavior */
@media (min-width: 992px) {
    /* Normal flow sidebar - no sticky, no scroll */
}

@media (max-width: 991px) {
    /* Stack sidebar below content on mobile/tablet */
    .blog-sidebar {
        margin-top: 2rem;
    }
    
    /* Reduce card margins on mobile */
    .blog-sidebar .card {
        margin-bottom: 1rem;
    }
}

/* Smooth Scroll for TOC Links */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Navbar height + spacing */
}

/* Accessibility: Focus States */
.toc-list a:focus,
.category-link:focus,
.related-post-link:focus,
.sidebar-post-link:focus,
.btn-back-to-blog:focus {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}

/* ========================================
   Blog CTA Banner - REMOVED (Now integrated in hero)
   ======================================== */
/* CTA is now part of .blog-header */

/* Responsive Blog Header */
@media (max-width: 767px) {
    .blog-header-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog-header-cta-buttons .btn {
        width: 100%;
    }
    
    .blog-header-features {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ========================================
   Mobile Optimization (Touch-First Design)
   ======================================== */

/* Body Mobile Enhancements */
@media (max-width: 767px) {
    body {
        overflow-x: hidden; /* Prevent horizontal scroll */
        font-size: 16px !important; /* Prevent iOS zoom on focus */
    }
    
    /* Ensure all interactive elements meet 48x48px touch target */
    a, button, .btn, .post-card, .category-card, .sidebar-widget a {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    /* Post Cards - Full Width on Mobile */
    .post-card {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    /* Typography - Mobile First */
    .blog-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .blog-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Mobile Navigation - Larger Touch Targets */
    .nav-link {
        padding: 1rem;
        font-size: 16px;
    }
    
    /* Mobile Forms */
    input, textarea, select {
        font-size: 16px !important; /* Prevent zoom on focus */
        min-height: 48px;
        padding: 0.75rem 1rem;
    }
    
    /* Sidebar - Stack on Mobile */
    .blog-sidebar {
        margin-top: 2rem;
    }
    
    .sidebar-widget {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile CTA - Full Width */
    .blog-cta-buttons .btn,
    .post-cta-buttons .btn {
        width: 100%;
        padding: 1rem;
        font-size: 16px;
    }
    
    /* Popular Posts - Larger Touch Area */
    .popular-post-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Category List - Better Spacing */
    .category-list li a {
        padding: 0.875rem 1rem;
        display: block;
    }
    
    /* Post Images - Optimize for Mobile */
    .post-image img {
        width: 100%;
        height: auto;
    }
    
    /* Reading Progress Bar (if exists) */
    .reading-progress-bar {
        height: 4px; /* Thicker for mobile visibility */
    }
    
    /* Mobile-Specific Utilities */
    .hide-on-mobile {
        display: none !important;
    }
    
    .show-on-mobile {
        display: block !important;
    }
}

/* Tablet Optimization */
@media (min-width: 768px) and (max-width: 991px) {
    /* Touch targets for tablets */
    a, button, .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Sidebar - Adjust Spacing */
    .blog-sidebar {
        margin-top: 2rem;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 767px) and (orientation: landscape) {
    .blog-header {
        padding: 2rem 0;
    }
    
    .blog-cta-banner {
        padding: 2rem 0;
    }
}

/* High DPI Displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images for retina displays */
    .post-image img,
    .popular-post-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Blog will respect user's OS dark mode preference */
    /* Currently disabled, can be enabled in future */
}

/* Reduced Motion (Accessibility) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .blog-cta-icon {
        animation: none !important;
    }
}

/* High Contrast Mode (Accessibility) */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor !important;
    }
    
    .post-card {
        border: 2px solid var(--gray-900) !important;
    }
}

/* ========================================
   Final Polish & Micro-interactions
   ======================================== */

/* Smooth Card Entrance */
.post-card,
.sidebar-widget,
.category-card {
    transition: all var(--transition-duration-300);
}

/* Hover State - Lift Effect */
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Image Zoom on Hover */
.post-image:hover img,
.popular-post-image:hover img {
    transform: scale(1.05);
}

/* Link Hover - Smooth Color Transition */
a {
    transition: color var(--transition-duration-300);
}

/* Button Press Effect */
.btn:active {
    transform: scale(0.98);
}

/* ========================================
   Sidebar Features CTA Card - Modern Professional Design
   ======================================== */

.sidebar-features-cta {
    margin-bottom: var(--blog-space-6);
}

.features-cta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: var(--blog-space-6);
    text-align: center;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    transition: all var(--transition-duration-300);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.features-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.features-cta-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 80px rgba(102, 126, 234, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.features-cta-header {
    position: relative;
    z-index: 1;
    margin-bottom: var(--blog-space-4);
}

.features-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: var(--blog-space-3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    letter-spacing: 0.5px;
}

.features-cta-badge i {
    font-size: 12px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

.features-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.features-cta-icon i {
    font-size: 36px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.features-cta-title {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: var(--blog-space-3);
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.features-cta-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin-bottom: var(--blog-space-4);
    position: relative;
    z-index: 1;
}

.features-cta-description strong {
    color: #ffd700;
    font-weight: 700;
}

.features-cta-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--blog-space-2);
    margin-bottom: var(--blog-space-5);
    position: relative;
    z-index: 1;
}

.feature-highlight-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
}

.feature-highlight-item i {
    color: #4ade80;
    font-size: 16px;
    filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.5));
}

.btn-features-explore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ffffff;
    color: #667eea;
    font-size: 16px;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition-duration-300);
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.btn-features-explore::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-features-explore:hover::before {
    left: 100%;
}

.btn-features-explore:hover {
    background: #ffd700;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

.btn-features-explore i {
    transition: transform var(--transition-duration-300);
}

.btn-features-explore:hover i {
    transform: translateX(5px);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .features-cta-card {
        padding: var(--blog-space-5);
        border-radius: 16px;
    }
    
    .features-cta-icon {
        width: 70px;
        height: 70px;
    }
    
    .features-cta-icon i {
        font-size: 32px;
    }
    
    .features-cta-title {
        font-size: 24px;
    }
    
    .btn-features-explore {
        font-size: 15px;
        padding: 14px 28px;
    }
}

/* Sidebar Normal Flow (Desktop) - No Sticky, No Scroll */
@media (min-width: 992px) {
    .blog-sidebar {
        /* Normal document flow - scrolls with page */
        position: relative;
    }
}

/* Loading State Skeleton (Future Enhancement) */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   BLOG SEARCH BAR - Tam Genişlik Gri Şerit
   ======================================== */

/* Tam genişlik gri şerit */
.blog-search-container {
    width: 100%;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 0;
    margin: 0;
}

/* Form container - ortada ve sınırlı genişlik */
.blog-search-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Arama kutusu */
.blog-search-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.blog-search-wrapper:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Arama ikonu */
.blog-search-icon {
    color: #6c757d;
    font-size: 1rem;
    margin-right: 0.75rem;
}

.blog-search-wrapper:focus-within .blog-search-icon {
    color: #6366f1;
}

/* Input */
.blog-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: #212529;
    padding: 0.35rem 0;
}

.blog-search-input:focus {
    outline: none;
}

.blog-search-input::placeholder {
    color: #6c757d;
}

/* Temizle butonu */
.blog-search-clear {
    background: #f8f9fa;
    border: none;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    cursor: pointer;
    color: #6c757d;
    text-decoration: none;
}

.blog-search-clear:hover {
    background: #6c757d;
    color: white;
}

/* Ara butonu */
.blog-search-submit {
    background: #6366f1;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.blog-search-submit:hover {
    background: #4f46e5;
}

/* Sonuç bilgisi */
.blog-search-results-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    background: #e7f5ff;
    border-left: 3px solid #6366f1;
    border-radius: 6px;
    color: #495057;
    font-size: 0.875rem;
}

.blog-search-results-info i {
    color: #6366f1;
}

.blog-search-results-info strong {
    color: #212529;
    font-weight: 600;
}

/* Mobile */
@media (max-width: 575.98px) {
    .blog-search-container {
        padding: 1rem 0;
    }
    
    .blog-search-wrapper {
        padding: 0.55rem 0.75rem;
    }
    
    .blog-search-submit {
        width: 32px;
        height: 32px;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .blog-search-wrapper,
    .blog-search-submit,
    .blog-search-clear,
    .blog-search-icon {
        transition: none;
    }
    
    .blog-search-submit:hover,
    .blog-search-wrapper:focus-within {
        transform: none;
    }
}

/* Dark Mode Support (Future-Proof) */
@media (prefers-color-scheme: dark) {
    .blog-search-wrapper {
        background: rgba(45, 55, 72, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .blog-search-input {
        color: #ffffff;
    }
    
    .blog-search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }
    
    .blog-search-results-info {
        background: rgba(45, 55, 72, 0.6);
        color: rgba(255, 255, 255, 0.8);
    }
    
    .blog-search-results-info strong {
        color: #ffffff;
    }
}

/* Print Styles */
@media print {
    .blog-header,
    .blog-cta-banner,
    .blog-sidebar,
    .post-actions,
    .share-buttons,
    .blog-search-container,
    nav,
    footer {
        display: none !important;
    }
    
    .post-content {
        max-width: 100%;
        font-size: 12pt;
        line-height: 1.5;
    }
}
