/*
 * Styles specifically for the Blog Index Page (home.php)
 */

.blog-hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}

.blog-hero-quote {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--color-secondary-accent);
    margin: 0;
}

/* Common Section Title */
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-primary-accent);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Spacing below hero section and before main content */
#primary {
    padding-top: 4rem;
    /* Adds space above the main content area, including categories */
}

/* Category Navigation */
.page-header {
    margin-bottom: 2rem;
    /* Keep existing margin-bottom for spacing below category nav */
}

.category-navigation .category-pills {
    gap: 1rem;
    /* Increased spacing between pills */
}

/* Main content area spacing before footer */
main.site-main {
    margin-bottom: 4rem;
    /* Adds space before the footer */
}

/* Featured Post */
.featured-post-section {
    margin-bottom: 4rem;
}

.featured-post-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 2rem;
    border: 1px solid #eee;
}

.featured-post-card .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.featured-post-card .card-content {
    display: flex;
    flex-direction: column;
}

.featured-post-card .post-category {
    background-color: var(--color-primary-accent);
    color: var(--color-text-light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.featured-post-card .post-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.featured-post-card .entry-title {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.featured-post-card .entry-title a {
    text-decoration: none;
    color: var(--color-headings);
}

.featured-post-card .entry-excerpt {
    margin-bottom: 1.5rem;
}

.featured-post-card .read-more-container .btn {
    align-self: flex-start;
}

/* All Posts Section */
.all-posts-section {
    margin-top: 4rem;
}

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

/* Pagination */
.pagination {
    margin-top: 3rem;
    text-align: center;
}

.pagination .page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    margin: 0 0.2rem;
    text-decoration: none;
    color: var(--color-primary);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--color-primary-accent);
    color: var(--color-text-light);
    border-color: var(--color-primary-accent);
}

/* =========================================
   Responsive pour la page Blog (Mobile)
   ========================================= */
@media (max-width: 768px) {

    /* 1. L'article à la Une passe sur 1 colonne (Image en haut, texte en bas) */
    .featured-post-card {
        grid-template-columns: 1fr;
        /* Une seule colonne au lieu de 1fr 1fr */
        gap: 1.5rem;
        /* On réduit un peu l'espace entre l'image et le texte */
        padding: 1.5rem;
        /* On réduit le padding interne pour gagner de la place */
    }

    /* 2. On réduit la taille des gros titres pour mobile */
    .blog-hero-title {
        font-size: 2.5rem;
    }

    .blog-hero-quote {
        font-size: 1.4rem;
    }

    /* 3. On réduit la grille des autres articles si besoin (sécurité) */
    .posts-grid {
        grid-template-columns: 1fr;
        /* Force 1 article par ligne sur mobile */
    }

    /* 4. On empêche les "pilules" de catégories de casser la mise en page */
    .category-navigation .category-pills {
        flex-wrap: wrap;
        /* Permet aux pilules de passer à la ligne */
        justify-content: center;
        /* Centre les pilules */
    }
}