/* Compact Breadcrumb - Properly Centered */
.breadcrumb-container {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-bottom: 1px solid rgba(255, 159, 103, 0.1);
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
}

.breadcrumb-container .rank-math-breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
}

.breadcrumb-container .rank-math-breadcrumb p {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin: 0;
    display: flex;
    align-items: center;
}

/* Ultra Compact Blog Hero */
.blog-hero {
    padding: 1.25rem 0;
    background: linear-gradient(135deg, rgba(255, 159, 103, 0.04) 0%, rgba(255, 181, 132, 0.08) 50%, rgba(255, 159, 103, 0.04) 100%);
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.blog-hero h1 {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.blog-hero .lead {
    font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
    color: var(--gray-600);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Dark mode for breadcrumb and hero */
[data-theme="dark"] .breadcrumb-container {
    background: #374151;
    border-bottom-color: #4B5563;
}

[data-theme="dark"] .breadcrumb-container .rank-math-breadcrumb p {
    color: #D1D5DB;
}

[data-theme="dark"] .blog-hero {
    background: linear-gradient(135deg, rgba(255, 159, 103, 0.08) 0%, rgba(255, 181, 132, 0.12) 50%, rgba(255, 159, 103, 0.08) 100%);
}

[data-theme="dark"] .blog-hero h1 {
    color: #F9FAFB;
}

[data-theme="dark"] .blog-hero .lead {
    color: #E5E7EB;
}

/* Smart Compact Filters - Optimized Layout */
.smart-filters {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 159, 103, 0.1);
    padding: 0.875rem 0;
    position: sticky;
    top: 60px;
    z-index: 50;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filters-layout {
    max-width: 100%;
    overflow: visible;
    position: relative;
}

.primary-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.category-pills {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    min-width: 0;
    position: relative;
}

.time-pills {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    flex-shrink: 0;
}

.filter-icon {
    font-size: 1rem;
    opacity: 0.7;
    margin-right: 0.375rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.pill:hover {
    background: var(--gray-200);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(255, 159, 103, 0.2);
}

.pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(255, 159, 103, 0.3);
}

.pill-count {
    font-size: 0.6875rem;
    padding: 0.125rem 0.25rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
    font-weight: 600;
    margin-left: 0.25rem;
}

.pill.active .pill-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* More Categories Dropdown */
.more-categories {
    position: relative;
    display: inline-block;
}

.more-toggle {
    background: var(--gray-50);
    border: 1px dashed var(--gray-300);
    color: var(--gray-600);
}

.more-toggle:hover {
    background: var(--gray-100);
    border-style: solid;
    transform: translateY(-1px);
}

.more-categories.expanded .more-toggle {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.more-toggle .chevron {
    transition: transform var(--transition-fast);
    margin-left: 0.25rem;
}

.more-categories.expanded .more-toggle .chevron {
    transform: rotate(180deg);
}

.more-pills {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 200px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    flex-direction: column;
    gap: 0.25rem;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.more-pills .pill {
    justify-content: flex-start;
    width: 100%;
}

.more-categories.expanded .more-pills {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: flex !important;
}

/* Dark mode for breadcrumb and filters */
[data-theme="dark"] .breadcrumb-container {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    border-bottom-color: rgba(255, 159, 103, 0.2);
}

[data-theme="dark"] .breadcrumb-container .rank-math-breadcrumb p {
    color: #D1D5DB;
}

[data-theme="dark"] .smart-filters {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.98) 0%, rgba(55, 65, 81, 0.95) 100%);
    border-bottom-color: rgba(255, 159, 103, 0.2);
}

[data-theme="dark"] .pill {
    background: #4B5563;
    border-color: #6B7280;
    color: #E5E7EB;
}

[data-theme="dark"] .pill:hover {
    background: #6B7280;
    border-color: var(--primary);
    box-shadow: 0 1px 3px rgba(255, 159, 103, 0.3);
}

[data-theme="dark"] .pill.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(255, 159, 103, 0.4);
}

[data-theme="dark"] .pill.active .pill-count {
    background: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .more-toggle {
    background: #374151;
    border-color: #6B7280;
    color: #D1D5DB;
}

[data-theme="dark"] .more-pills {
    background: #374151;
    border-color: #4B5563;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Filter Section */
.blog-filter {
    padding: 2rem 0;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-wrapper {
    position: relative;
}

.filter-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Desktop: Show filters by default, hide toggle */
@media (min-width: 769px) {
    .filter-toggle {
        display: none;
    }
    
    .filter-content {
        display: flex;
    }
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-chip .count {
    padding: 0.125rem 0.375rem;
    background: rgba(0,0,0,0.1);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

/* Filter Groups */
.filter-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Reading Time Filter Enhancements */
.time-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

/* Reading Time Badge on Articles */
.article-meta .reading-time {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--primary-light);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.reading-time::before {
    content: "📖";
    margin-right: 0.25rem;
    font-size: 0.875rem;
}

/* Article Card Enhancements */
.article-card[data-time-category="quick"] .reading-time::before { content: "⚡"; }
.article-card[data-time-category="medium"] .reading-time::before { content: "📖"; }
.article-card[data-time-category="deep"] .reading-time::before { content: "🔍"; }

/* Filter Animation */
.article-card {
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.article-card.filtered-out {
    opacity: 0 !important;
    transform: scale(0.95) !important;
    pointer-events: none;
}

.article-card.filtered-in {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* Smart Suggestions */
.filter-suggestion {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

.filter-suggestion.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Blog Grid */
.blog-grid {
    padding: 3rem 0;
    background: var(--bg-primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Tablet responsive */
@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Desktop responsive */  
@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 2.5rem;
    }
}

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.article-card:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.article-card:active {
    transform: translateY(-2px);
}

.post-card-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.post-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.post-card-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

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

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.post-meta-item svg {
    width: 14px;
    height: 14px;
}

.post-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-excerpt {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.post-read-more:hover {
    gap: 0.75rem;
}

.post-read-more svg {
    width: 16px;
    height: 16px;
}

.article-author {
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

.author-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #6B7280;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.author-link:hover {
    color: var(--primary);
}

.author-link img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    transition: border-color var(--transition-fast);
}

.author-link:hover img {
    border-color: var(--primary-light);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.author-name {
    font-weight: 600;
    font-size: 0.8125rem;
}

.author-meta {
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Newsletter CTA */
.newsletter-cta {
    padding: 4rem 0;
    background: white;
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
}

.newsletter-box h2 {
    margin-bottom: 1rem;
}

.newsletter-box p {
    margin-bottom: 2rem;
    color: var(--gray-600);
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 159, 103, 0.1);
}

.newsletter-box small {
    color: var(--gray-500);
}

/* No posts */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
}

.no-posts h2 {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.no-posts p {
    margin-bottom: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 1rem 0 0.75rem;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .filter-section {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .filter-pills {
        justify-content: center;
        gap: 0.375rem;
    }
    
    .pill {
        padding: 0.25rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .filter-toggle {
        display: flex;
    }
    
    .filter-content {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin-top: 0.5rem;
        box-shadow: var(--shadow-medium);
        z-index: 1000;
    }
    
    .filter-wrapper.active .filter-content {
        display: flex;
        flex-direction: column;
    }
    
    .filter-chips {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .time-filter {
        min-width: auto;
        width: 100%;
        text-align: left;
    }
    
    .filter-group {
        margin-bottom: 1rem;
    }
    
    .filter-group:last-child {
        margin-bottom: 0;
    }
    
    .blog-grid {
        padding: 2rem 0;
    }
    
    .articles-grid {
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .article-card {
        min-height: auto;
    }
    
    .post-card-content {
        padding: 1.25rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

/* Dark Mode Card Improvements */
[data-theme="dark"] .article-card {
    background: #374151 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    color: inherit !important;
}

[data-theme="dark"] .article-card:focus {
    outline: 3px solid var(--primary-light) !important;
}

[data-theme="dark"] .post-title {
    color: #F9FAFB !important;
}

[data-theme="dark"] .post-title a {
    color: #F9FAFB !important;
}

[data-theme="dark"] .post-title a:hover {
    color: var(--primary-light) !important;
}

[data-theme="dark"] .post-excerpt {
    color: #D1D5DB !important;
}

[data-theme="dark"] .post-meta {
    color: #9CA3AF !important;
}

[data-theme="dark"] .post-card-image.placeholder {
    background: linear-gradient(135deg, #4B5563 0%, #374151 100%) !important;
    color: #9CA3AF !important;
}

[data-theme="dark"] .post-read-more {
    color: var(--primary-light) !important;
}

/* French Language Typography Overrides */
body.lang-fr .post-title {
    text-transform: none !important;
}

body.lang-fr .post-category-badge {
    text-transform: uppercase; /* Keep category badges uppercase */
}

[data-theme="dark"] .article-author {
    border-color: #4B5563;
}

[data-theme="dark"] .author-link {
    color: #D1D5DB;
}

[data-theme="dark"] .author-link:hover {
    color: var(--primary-light);
}

[data-theme="dark"] .author-link img {
    border-color: #4B5563;
}

[data-theme="dark"] .author-link:hover img {
    border-color: var(--primary);
}

[data-theme="dark"] .author-meta {
    color: #9CA3AF;
}

/* Read More Button (for category pages) */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    margin-top: 0.75rem;
    padding: 0.5rem 0;
}

.read-more-btn:hover {
    color: var(--primary-dark);
    gap: 0.75rem;
}

.read-more-btn svg {
    transition: transform var(--transition-fast);
}

.read-more-btn:hover svg {
    transform: translateX(2px);
}

[data-theme="dark"] .read-more-btn {
    color: var(--primary-light);
}

[data-theme="dark"] .read-more-btn:hover {
    color: var(--primary);
}
    
    .newsletter-box {
        padding: 2rem 1.5rem;
    }
}

/* Animations */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Print styles */
@media print {
    .blog-filter,
    .newsletter-cta,
    .pagination {
        display: none;
    }
    
    .article-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
