/* Styles spécifiques aux pages de catégories */

.category-page {
    padding-top: 0;
}

.category-header {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    color: #2c3e50;
    margin-bottom: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f3f4;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #f39c12, #e74c3c, #9b59b6);
    border-radius: 20px 20px 0 0;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.category-header .category-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.category-header:hover .category-icon {
    transform: scale(1.05);
}

.category-header h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.category-description {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    color: #5a6c7d;
    line-height: 1.7;
    font-weight: 400;
}

/* Navigation active state */
.nav-menu .active {
    color: #3498db;
    font-weight: 600;
    position: relative;
}

.nav-menu .active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3498db;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0;
}

.article-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.article-card.featured .article-image {
    height: auto;
    min-height: 300px;
}

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

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

.article-content {
    padding: 1.5rem;
}

.article-card.featured .article-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.article-card.featured .article-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

.article-content h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-content h3 a:hover {
    color: #3498db;
}

.article-content p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #95a5a6;
    font-size: 0.9rem;
}

.date {
    font-weight: 500;
}

.read-time {
    background: #ecf0f1;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Sous-catégories */
.subcategories {
    margin: 4rem 0;
}

.subcategories h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #2c3e50;
    font-size: 2rem;
}

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

.subcategory-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #3498db;
}

.subcategory-card h3 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.subcategory-card p {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.subcategory-card ul {
    list-style: none;
}

.subcategory-card ul li {
    margin-bottom: 0.4rem;
}

.subcategory-card ul li a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.subcategory-card ul li a:hover {
    color: #2980b9;
}

.subcategory-card ul li a::before {
    content: "→ ";
    margin-right: 0.5rem;
}

/* Sidebar widgets */
.widget {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.widget h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.6rem;
}

.widget ul li a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: #3498db;
}

.historical-figures li a::before {
    content: "👑 ";
    margin-right: 0.5rem;
}

.related-categories {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.related-categories h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.related-categories ul {
    list-style: none;
}

.related-categories ul li {
    margin-bottom: 0.5rem;
}

.related-categories ul li a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .category-header {
        padding: 3rem 1.5rem;
        border-radius: 15px;
        margin-bottom: 2rem;
    }

    .category-header h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .category-header .category-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
    }

    .category-description {
        font-size: 1.1rem;
        line-height: 1.6;
    }

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

    .article-card.featured {
        grid-template-columns: 1fr;
    }

    .article-card.featured .article-image {
        min-height: 200px;
    }

    .subcategories-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.6s ease forwards;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }