<?php
/**
 * Fe Adulta — Homepage template
 * Cargado via template_include filter desde fea-homepage.php
 */
if (!defined('ABSPATH')) exit;
get_header();
?>

<style>
/* ── Reset dentro de la homepage ── */
.fea-homepage {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    font-family: inherit;
}

/* ── Hero: Carta de la semana ── */
.fea-hero {
    border-bottom: 2px solid #111;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
}
.fea-hero-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.fea-hero-link:hover .fea-hero-title {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.fea-section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.75rem;
}
.fea-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: #111;
}
.fea-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: #666;
}
.fea-hero-meta .fea-avatar {
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Secciones ── */
.fea-section {
    margin-bottom: 3rem;
}
.fea-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5e5;
}

/* ── Grid de artículos ── */
.fea-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.fea-grid--4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ── Tarjeta ── */
.fea-card {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 1.25rem;
}
.fea-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.fea-avatar {
    border-radius: 50%;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}
.fea-card-author {
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fea-card-title {
    font-size: 0.975rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}
.fea-card-title a {
    text-decoration: none;
    color: #111;
}
.fea-card-title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .fea-grid,
    .fea-grid--4 {
        grid-template-columns: 1fr;
    }
}
</style>

<main id="wp--skip-link--target">
    <div class="fea-homepage">
        <?php echo fea_homepage_content(); ?>
    </div>
</main>

<?php get_footer(); ?>
