/* --- INICIO: GRILLA AUTOMÁTICA DE NOTICIAS CORONADOS DE GLORIA --- */
if (!function_exists('cdg_noticias_automaticas_home_clean')) {
    function cdg_noticias_automaticas_home_clean() {
        $query = new WP_Query(array(
            'post_type'      => 'post',
            'posts_per_page' => 8,
            'orderby'        => 'date',
            'order'          => 'DESC',
        ));

        if (!$query->have_posts()) {
            return '<p style="color:#64748b; font-size: 14px;">No hay noticias publicadas en este momento.</p>';
        }

        $output = '
        <style>
            .cdg-grid-real {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 24px;
                width: 100%;
            }
            @media (max-width: 600px) {
                .cdg-grid-real { grid-template-columns: 1fr; }
            }
            .cdg-card-link {
                text-decoration: none !important;
                color: inherit !important;
                display: flex;
                height: 100%;
            }
            .cdg-card-real {
                background: #ffffff;
                border-radius: 12px;
                overflow: hidden;
                border: 1px solid #e2e8f0;
                box-shadow: 0 4px 6px rgba(0,0,0,0.04);
                display: flex;
                flex-direction: column;
                width: 100%;
                transition: transform 0.2s ease, box-shadow 0.2s ease;
            }
            .cdg-card-real:hover {
                transform: translateY(-4px);
                box-shadow: 0 10px 15px rgba(0,0,0,0.1);
            }
            .cdg-card-real img {
                width: 100%;
                height: 170px;
                object-fit: cover;
            }
            .cdg-card-content-real {
                padding: 18px;
                display: flex;
                flex-direction: column;
                flex-grow: 1;
            }
            .cdg-card-cat-real {
                color: #2b6188;
                font-size: 11px;
                font-weight: 900;
                text-transform: uppercase;
                letter-spacing: 1px;
            }
            .cdg-card-title-real {
                font-size: 15px;
                font-weight: 700;
                color: #0f172a;
                margin: 6px 0 8px 0;
                line-height: 1.3;
            }
            .cdg-card-excerpt-real {
                font-size: 13px;
                color: #475569;
                margin: 0 0 16px 0;
                line-height: 1.4;
            }
            .cdg-card-date-real {
                font-size: 11px;
                color: #94a3b8;
                font-weight: 500;
                margin-top: auto;
            }
        </style>
        <div class="cdg-grid-real">';

        while ($query->have_posts()) {
            $query->the_post();
            $img = get_the_post_thumbnail_url(get_the_ID(), 'medium_large') ?: 'https://coronadosdegloria.org/wp-content/uploads/2026/10/logo_coronados_ok.png';
            $cat = get_the_category();
            $cat_name = !empty($cat) ? $cat[0]->name : 'Deportes';

            $output .= '
            <a href="' . get_permalink() . '" class="cdg-card-link">
                <article class="cdg-card-real">
                    <img src="' . esc_url($img) . '" alt="' . esc_attr(get_the_title()) . '">
                    <div class="cdg-card-content-real">
                        <span class="cdg-card-cat-real">' . esc_html($cat_name) . '</span>
                        <h3 class="cdg-card-title-real">' . get_the_title() . '</h3>
                        <p class="cdg-card-excerpt-real">' . wp_trim_words(get_the_excerpt(), 14, '...') . '</p>
                        <span class="cdg-card-date-real">' . get_the_date('j \d\e F, Y') . '</span>
                    </div>
                </article>
            </a>';
        }
        wp_reset_postdata();
        $output .= '</div>';

        return $output;
    }
    add_shortcode('cdg_home_posts', 'cdg_noticias_automaticas_home_clean');
}
/* --- FIN: GRILLA AUTOMÁTICA DE NOTICIAS --- */<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//coronadosdegloria.org/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://coronadosdegloria.org/post-sitemap.xml</loc>
		<lastmod>2026-10-23T18:27:26+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://coronadosdegloria.org/page-sitemap.xml</loc>
		<lastmod>2026-10-23T03:56:25+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://coronadosdegloria.org/category-sitemap.xml</loc>
		<lastmod>2026-10-23T18:27:26+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://coronadosdegloria.org/post_tag-sitemap.xml</loc>
		<lastmod>2025-09-03T21:14:48+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://coronadosdegloria.org/author-sitemap.xml</loc>
		<lastmod>2026-10-23T00:58:56+00:00</lastmod>
	</sitemap>
<sitemap>
<loc>https://coronadosdegloria.org/news-sitemap.xml</loc>
<lastmod>2026-10-23T18:27:24+00:00</lastmod>
</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->