<!DOCTYPE html>

<html lang="es">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>TRIB3 - Reporte de Crecimiento Q2 2025</title>

    <script src="https://cdn.tailwindcss.com"></script>

    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>

    <link rel="preconnect" href="https://fonts.googleapis.com">

    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;900&display=swap" rel="stylesheet">

    <style>

        /* --- Brand Colors --- */

        :root {

            --dark-grey: #1b1f21;

            --light-grey: #ecebe8;

            --copper: #bd7f36;

            --copper-light: #d8a562;

            --mid-grey: #374151;

        }


        body {

            font-family: 'Poppins', sans-serif;

            background-color: var(--dark-grey);

            color: var(--light-grey);

        }

        .main-title {

            font-weight: 900;

            letter-spacing: -0.05em;

        }

        .kpi-card {

            background-color: rgba(255, 255, 255, 0.05);

            border: 1px solid var(--mid-grey);

            transition: transform 0.3s ease, box-shadow 0.3s ease;

        }

        .kpi-card:hover {

            transform: translateY(-5px);

            box-shadow: 0 10px 20px rgba(189, 127, 54, 0.1);

        }

        .kpi-value {

            color: #FFFFFF;

            font-weight: 900;

            text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 20px rgba(189, 127, 54, 0.4);

        }

        .kpi-story {

            font-size: 0.8rem;

            color: #9CA3AF;

        }

        .tab-button {

            transition: all 0.3s ease;

            border-bottom: 3px solid transparent;

            padding-bottom: 8px;

        }

        .tab-button.active {

            color: var(--copper);

            border-bottom-color: var(--copper);

        }

        .tab-button:not(.active):hover {

            color: var(--light-grey);

        }

        .chart-container {

            background-color: rgba(255, 255, 255, 0.05);

            border: 1px solid var(--mid-grey);

            padding: 1.5rem;

            border-radius: 0.75rem;

        }

        .action-card {

            background-color: rgba(255, 255, 255, 0.05);

            border: 1px solid var(--mid-grey);

            border-left: 4px solid var(--copper);

            transition: all 0.3s ease;

        }

        .action-card:hover {

            border-color: var(--copper);

            transform: scale(1.02);

        }

        .story-card {

            background-color: rgba(255, 255, 255, 0.05);

            border: 1px solid var(--mid-grey);

            display: flex;

            flex-direction: column;

            justify-content: center;

        }

        .impact-card {

            background-color: var(--mid-grey);

        }

    </style>

</head>

<body class="p-4 md:p-8">


    <div class="max-w-7xl mx-auto">

        <!-- Encabezado -->

        <header class="text-center mb-12">

            <img src="https://assets-global.website-files.com/622261803756b41724578631/6227233634953c2418a39a99_TRIB3_Logo_White.svg" alt="Logo de TRIB3" class="h-12 mx-auto mb-4">

            <h1 class="text-2xl md:text-3xl font-light text-gray-300">Reporte de Crecimiento y Estrategia</h1>

            <p class="text-lg md:text-xl font-semibold text-[var(--copper)]">Q2 2025: La Transformación</p>

        </header>


        <!-- Pestañas de Navegación -->

        <div class="mb-8 flex justify-center border-b border-[var(--mid-grey)] flex-wrap">

            <button id="tab-resumen" class="tab-button active text-lg font-semibold py-3 px-4 md:px-6" onclick="showTab('resumen')">Dashboard de Logros</button>

            <button id="tab-impacto" class="tab-button text-lg font-semibold py-3 px-4 md:px-6" onclick="showTab('impacto')">Análisis de Impacto</button>

            <button id="tab-competencia" class="tab-button text-lg font-semibold py-3 px-4 md:px-6" onclick="showTab('competencia')">Análisis Competitivo</button>

            <button id="tab-plan" class="tab-button text-lg font-semibold py-3 px-4 md:px-6" onclick="showTab('plan')">Plan de Acción</button>

        </div>


        <!-- Contenido de las Pestañas -->

        <main>

            <!-- Pestaña de Resumen -->

            <div id="content-resumen">

                

                <!-- Historia del Trimestre -->

                <section class="mb-12">

                     <h3 class="text-2xl font-bold mb-6 text-center text-[var(--light-grey)]">La Historia de Nuestro Trimestre</h3>

                     <div class="grid grid-cols-1 md:grid-cols-3 gap-4 text-center">

                        <!-- Abril -->

                        <div class="story-card p-6 rounded-lg flex flex-col items-center">

                            <div class="bg-[var(--mid-grey)] p-3 rounded-full mb-4">

                                <svg class="w-8 h-8 text-[var(--copper-light)]" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>

                            </div>

                            <h4 class="font-bold text-lg text-white">Abril: El Análisis</h4>

                            <p class="text-gray-400 text-sm">Establecimos la base, analizamos la oportunidad y diseñamos la nueva estrategia de contenido.</p>

                        </div>

                        <!-- Mayo -->

                        <div class="story-card p-6 rounded-lg flex flex-col items-center border-2 border-[var(--copper)] shadow-lg shadow-[var(--copper)]/10">

                             <div class="bg-[var(--mid-grey)] p-3 rounded-full mb-4">

                                <svg class="w-8 h-8 text-[var(--copper-light)]" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>

                            </div>

                            <h4 class="font-bold text-lg text-white">Mayo: La Explosión</h4>

                            <p class="text-gray-400 text-sm">Ejecutamos la estrategia, y la tribu respondió con un crecimiento masivo en la participación.</p>

                        </div>

                        <!-- Junio -->

                        <div class="story-card p-6 rounded-lg flex flex-col items-center">

                             <div class="bg-[var(--mid-grey)] p-3 rounded-full mb-4">

                                <svg class="w-8 h-8 text-[var(--copper-light)]" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>

                            </div>

                            <h4 class="font-bold text-lg text-white">Junio: La Consolidación</h4>

                            <p class="text-gray-400 text-sm">Rompimos récords de alcance, duplicando la visibilidad y consolidando una alta interacción.</p>

                        </div>

                     </div>

                </section>


                <!-- KPIs Destacados -->

                <section class="mb-12">

                    <h3 class="text-2xl font-bold mb-6 text-center text-[var(--light-grey)]">Nuestros Logros en Números</h3>

                    <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">

                        <div class="kpi-card p-6 rounded-xl text-center">

                            <p class="text-gray-400 text-sm uppercase tracking-wider">Crecimiento de la Tribu</p>

                            <p class="kpi-value text-5xl my-2">+189</p>

                            <p class="kpi-story">Nuevos seguidores en el trimestre</p>

                        </div>

                        <div class="kpi-card p-6 rounded-xl text-center">

                            <p class="text-gray-400 text-sm uppercase tracking-wider">Visibilidad Disparada</p>

                            <p class="kpi-value text-5xl my-2">+109%</p>

                            <p class="kpi-story">De 41k a 86k impresiones/mes</p>

                        </div>

                        <div class="kpi-card p-6 rounded-xl text-center">

                            <p class="text-gray-400 text-sm uppercase tracking-wider">Interacción Revitalizada</p>

                            <p class="kpi-value text-5xl my-2">+211%</p>

                            <p class="kpi-story">De 156 a 485 interacciones/mes</p>

                        </div>

                        <div class="kpi-card p-6 rounded-xl text-center">

                            <p class="text-gray-400 text-sm uppercase tracking-wider">Reels Imparables</p>

                            <p class="kpi-value text-5xl my-2">+269%</p>

                            <p class="kpi-story">Interacciones en nuestro formato estrella</p>

                        </div>

                    </div>

                </section>


                <!-- Gráficos -->

                <section class="mb-12">

                     <h3 class="text-2xl font-bold mb-6 text-center text-[var(--light-grey)]">Evolución Gráfica del Trimestre</h3>

                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">

                        <div class="chart-container">

                            <canvas id="performanceChart"></canvas>

                        </div>

                        <div class="chart-container">

                             <canvas id="reachChart"></canvas>

                        </div>

                    </div>

                </section>


                <!-- Top Posts -->

                <section>

                    <h3 class="text-2xl font-bold mb-6 text-center text-[var(--light-grey)]">Publicaciones Estrella del Trimestre</h3>

                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">

                        <!-- Post 1 -->

                        <div class="kpi-card rounded-xl flex flex-col overflow-hidden">

                            <img src="https://placehold.co/600x400/1b1f21/d8a562?text=Comunidad+TRIB3" alt="Imagen de la comunidad TRIB3" class="w-full h-48 object-cover" onerror="this.onerror=null;this.src='https://placehold.co/600x400/1b1f21/d8a562?text=Error+de+imagen';">

                            <div class="p-6 flex flex-col flex-grow">

                                <p class="text-sm text-[var(--copper-light)] font-semibold">Reel • Junio</p>

                                <p class="text-white font-semibold mt-1">"Respirar juntas. Movernos con intención..."</p>

                                <div class="flex items-center justify-around text-center my-4">

                                    <div>

                                        <p class="text-3xl font-bold text-white">120</p>

                                        <p class="text-xs text-gray-400">Interacciones</p>

                                    </div>

                                    <div>

                                        <p class="text-3xl font-bold text-white">2.8k</p>

                                        <p class="text-xs text-gray-400">Impresiones</p>

                                    </div>

                                </div>

                                <div class="mt-auto pt-4 border-t border-[var(--mid-grey)]">

                                    <p class="text-sm font-bold text-[var(--copper-light)] mb-1">¿Por qué funcionó?</p>

                                    <p class="text-xs text-gray-300">Conectó con la emoción y el valor central de la "tribu". El formato Reel y el enfoque en la comunidad generaron una autenticidad que disparó la interacción.</p>

                                </div>

                            </div>

                        </div>

                        <!-- Post 2 -->

                        <div class="kpi-card rounded-xl flex flex-col overflow-hidden">

                             <img src="https://placehold.co/600x400/1b1f21/d8a562?text=Lleva+tus+Ganas" alt="Imagen motivacional de TRIB3" class="w-full h-48 object-cover" onerror="this.onerror=null;this.src='https://placehold.co/600x400/1b1f21/d8a562?text=Error+de+imagen';">

                            <div class="p-6 flex flex-col flex-grow">

                                <p class="text-sm text-[var(--copper-light)] font-semibold">Post • Mayo</p>

                                <p class="text-white font-semibold mt-1">"Spoiler alert: más que cosas, lleva tus ganas..."</p>

                                <div class="flex items-center justify-around text-center my-4">

                                    <div>

                                        <p class="text-3xl font-bold text-white">48</p>

                                        <p class="text-xs text-gray-400">Interacciones</p>

                                    </div>

                                    <div>

                                        <p class="text-3xl font-bold text-white">2.1k</p>

                                        <p class="text-xs text-gray-400">Impresiones</p>

                                    </div>

                                </div>

                                <div class="mt-auto pt-4 border-t border-[var(--mid-grey)]">

                                    <p class="text-sm font-bold text-[var(--copper-light)] mb-1">¿Por qué funcionó?</p>

                                    <p class="text-xs text-gray-300">Rompió barreras de entrada con un mensaje inclusivo y motivacional. Habló directamente a la mentalidad del cliente potencial, no solo al cuerpo.</p>

                                </div>

                            </div>

                        </div>

                        <!-- Post 3 -->

                        <div class="kpi-card rounded-xl flex flex-col overflow-hidden">

                             <img src="https://placehold.co/600x400/1b1f21/d8a562?text=A+tu+Manera" alt="Imagen de entrenamiento en TRIB3" class="w-full h-48 object-cover" onerror="this.onerror=null;this.src='https://placehold.co/600x400/1b1f21/d8a562?text=Error+de+imagen';">

                            <div class="p-6 flex flex-col flex-grow">

                                <p class="text-sm text-[var(--copper-light)] font-semibold">Reel • Mayo</p>

                                <p class="text-white font-semibold mt-1">"Dale con calma o dale con todo..."</p>

                                <div class="flex items-center justify-around text-center my-4">

                                    <div>

                                        <p class="text-3xl font-bold text-white">34</p>

                                        <p class="text-xs text-gray-400">Interacciones</p>

                                    </div>

                                    <div>

                                        <p class="text-3xl font-bold text-white">1.2k</p>

                                        <p class="text-xs text-gray-400">Impresiones</p>

                                    </div>

                                </div>

                                <div class="mt-auto pt-4 border-t border-[var(--mid-grey)]">

                                    <p class="text-sm font-bold text-[var(--copper-light)] mb-1">¿Por qué funcionó?</p>

                                    <p class="text-xs text-gray-300">Validó todos los niveles de esfuerzo, haciendo que la audiencia se sintiera aceptada sin importar su condición. El mensaje "a tu manera" fue clave.</p>

                                </div>

                            </div>

                        </div>

                    </div>

                </section>

            </div>


            <!-- Pestaña de Impacto -->

            <div id="content-impacto" class="hidden">

                 <h3 class="text-2xl font-bold mb-2 text-center text-[var(--light-grey)]">Análisis de Impacto: El Antes y Después</h3>

                 <p class="text-center text-gray-400 mb-8 max-w-3xl mx-auto">Para medir el impacto de nuestra gestión (iniciada el 21 de Abril), comparamos el rendimiento de los meses anteriores con nuestro primer trimestre. Los datos muestran una clara inflexión y una trayectoria de crecimiento acelerado.</p>

                 

                 <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-10">

                    <div class="chart-container">

                        <canvas id="impactReachFollowersChart"></canvas>

                    </div>

                    <div class="chart-container">

                        <canvas id="impactReachInteractionsChart"></canvas>

                    </div>

                 </div>


                 <div class="kpi-card p-6 rounded-xl">

                    <h4 class="font-bold text-lg text-white mb-2 text-center">Análisis Cualitativo: Cambio de Estrategia</h4>

                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mt-4">

                        <div>

                            <p class="font-semibold text-[var(--copper-light)]">Estrategia Anterior (Feb-Mar)</p>

                            <p class="text-sm text-gray-300 mt-2">El contenido se apoyaba fuertemente en memes y temas de humor (#girlmath, chismes). Esto generaba picos de interacción altos pero volátiles y de baja calidad, desconectados del valor de la marca TRIB3.</p>

                        </div>

                        <div class="md:border-l border-t md:border-t-0 border-[var(--mid-grey)] md:pl-6 pt-4 md:pt-0">

                            <p class="font-semibold text-[var(--copper-light)]">Nuestra Estrategia (Abr-Jun)</p>

                            <p class="text-sm text-gray-300 mt-2">Viramos hacia un contenido centrado en la comunidad, la experiencia en el estudio y los valores de la marca. Aunque las interacciones iniciales se ajustaron, ahora son más estables y provienen de una audiencia más comprometida y alineada con TRIB3.</p>

                        </div>

                    </div>

                 </div>

            </div>


             <!-- Pestaña de Competencia -->

            <div id="content-competencia" class="hidden">

                 <h3 class="text-2xl font-bold mb-6 text-center text-[var(--light-grey)]">Análisis Competitivo: ¿Qué podemos aprender?</h3>

                 <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-10">

                    <!-- CostaFit -->

                    <div class="kpi-card p-6 rounded-xl">

                        <h4 class="text-xl font-bold text-white mb-2">CostaFit (@costafitpa)</h4>

                        <p class="text-sm text-gray-400 mb-4">Estrategia: <span class="font-semibold text-white">Calidad sobre Cantidad.</span></p>

                        <div class="flex justify-around bg-[var(--dark-grey)] p-3 rounded-lg mb-4">

                            <div>

                                <p class="text-2xl font-bold text-[var(--copper-light)]">30</p>

                                <p class="text-xs uppercase">Interacciones / Post</p>

                            </div>

                             <div>

                                <p class="text-2xl font-bold text-[var(--copper-light)]">3</p>

                                <p class="text-xs uppercase">Comentarios / Post</p>

                            </div>

                        </div>

                        <p class="text-sm font-bold text-[var(--copper-light)] mb-1">Clave de su éxito:</p>

                        <p class="text-sm text-gray-300">Con muy poco contenido (3 publicaciones en Junio), logran una interacción altísima. Esto sugiere que sus posts son eventos de alto impacto que generan mucha conversación.</p>

                    </div>

                    <!-- BE STUDIO -->

                    <div class="kpi-card p-6 rounded-xl">

                        <h4 class="text-xl font-bold text-white mb-2">BE STUDIO (@belagree)</h4>

                        <p class="text-sm text-gray-400 mb-4">Estrategia: <span class="font-semibold text-white">Dominio del formato Reel.</span></p>

                         <div class="flex justify-around bg-[var(--dark-grey)] p-3 rounded-lg mb-4">

                            <div>

                                <p class="text-2xl font-bold text-[var(--copper-light)]">~147</p>

                                <p class="text-xs uppercase">"Me Gusta" / Post</p>

                            </div>

                             <div>

                                <p class="text-2xl font-bold text-[var(--copper-light)]">~10</p>

                                <p class="text-xs uppercase">Comentarios / Post</p>

                            </div>

                        </div>

                        <p class="text-sm font-bold text-[var(--copper-light)] mb-1">Clave de su éxito:</p>

                        <p class="text-sm text-gray-300">Apuestan fuerte por los Reels (5 de 6 publicaciones). Su alto promedio de "me gusta" y comentarios indica que han perfeccionado un estilo de video que resuena con su audiencia.</p>

                    </div>

                 </div>


                 <h3 class="text-2xl font-bold mb-6 text-center text-[var(--light-grey)]">Aprendizajes para TRIB3</h3>

                 <div class="grid grid-cols-1 md:grid-cols-3 gap-6 text-center">

                    <div class="action-card p-4 rounded-lg">

                        <h4 class="font-semibold text-white mb-2">Crear Posts "Evento"</h4>

                        <p class="text-sm text-gray-400">Planificar un post mensual de alto impacto (un reto, un testimonio especial) para generar picos de conversación como CostaFit.</p>

                    </div>

                    <div class="action-card p-4 rounded-lg">

                        <h4 class="font-semibold text-white mb-2">Duplicar la Apuesta en Reels</h4>

                        <p class="text-sm text-gray-400">Aumentar la frecuencia y experimentar con formatos de Reels que muestren técnica y el "detrás de cámaras" de las clases, como BE STUDIO.</p>

                    </div>

                     <div class="action-card p-4 rounded-lg">

                        <h4 class="font-semibold text-white mb-2">Fomentar la Conversación</h4>

                        <p class="text-sm text-gray-400">Terminar cada publicación con una pregunta abierta para invitar a la tribu a comentar, no solo a dar "me gusta".</p>

                    </div>

                 </div>

            </div>


            <!-- Pestaña de Plan de Acción -->

            <div id="content-plan" class="hidden">

                 <div class="grid grid-cols-1 md:grid-cols-3 gap-8 max-w-6xl mx-auto">

                    <!-- Columna 1 -->

                    <div class="flex flex-col items-center text-center">

                        <div class="bg-[var(--mid-grey)] p-4 rounded-full mb-4 border-2 border-[var(--copper)]">

                            <svg class="w-10 h-10 text-[var(--copper-light)]" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"></path></svg>

                        </div>

                        <h4 class="font-black text-xl text-white mb-4">Potenciar Contenido y Comunidad</h4>

                        <div class="space-y-4 w-full">

                            <div class="action-card p-4 rounded-lg">

                                <p class="font-semibold text-white">Más Reels, Más Energía</p>

                                <p class="text-sm text-gray-400">Aumentar a 3-4 Reels semanales enfocados en testimonios, energía y comunidad.</p>

                            </div>

                            <div class="action-card p-4 rounded-lg">

                                <p class="font-semibold text-white">Celebrar a la Tribu</p>

                                <p class="text-sm text-gray-400">Crear un post semanal "Miembro/Coach de la Semana" para fomentar pertenencia.</p>

                            </div>

                        </div>

                    </div>

                    <!-- Columna 2 -->

                     <div class="flex flex-col items-center text-center">

                        <div class="bg-[var(--mid-grey)] p-4 rounded-full mb-4 border-2 border-[var(--copper)]">

                            <svg class="w-10 h-10 text-[var(--copper-light)]" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"></path></svg>

                        </div>

                        <h4 class="font-black text-xl text-white mb-4">Optimizar para la Conversión</h4>

                        <div class="space-y-4 w-full">

                            <div class="action-card p-4 rounded-lg">

                                <p class="font-semibold text-white">Llamados a la Acción (CTAs)</p>

                                <p class="text-sm text-gray-400">Incluir CTAs directos en los posts para guiar a los usuarios a reservar o comprar.</p>

                            </div>

                            <div class="action-card p-4 rounded-lg">

                                <p class="font-semibold text-white">Promoción Activa de Packs</p>

                                <p class="text-sm text-gray-400">Usar el sticker de "Enlace" en Historias para promocionar los packs de clases de forma constante.</p>

                            </div>

                        </div>

                    </div>

                    <!-- Columna 3 -->

                     <div class="flex flex-col items-center text-center">

                        <div class="bg-[var(--mid-grey)] p-4 rounded-full mb-4 border-2 border-[var(--copper)]">

                            <svg class="w-10 h-10 text-[var(--copper-light)]" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"></path></svg>

                        </div>

                        <h4 class="font-black text-xl text-white mb-4">Acelerar el Crecimiento Futuro</h4>

                        <div class="space-y-4 w-full">

                            <div class="action-card p-4 rounded-lg">

                                <p class="font-semibold text-white">Introducir Publicidad Pagada</p>

                                <p class="text-sm text-gray-400">Asignar un presupuesto inicial para promocionar posts exitosos y acelerar el crecimiento.</p>

                            </div>

                             <div class="action-card p-4 rounded-lg">

                                <p class="font-semibold text-white">Optimizar Canales</p>

                                <p class="text-sm text-gray-400">Activar el cross-posting a Facebook para mantener presencia con mínimo esfuerzo.</p>

                            </div>

                        </div>

                    </div>

                 </div>

            </div>

        </main>


    </div>


    <script>

        // Lógica para cambiar de pestaña

        function showTab(tabName) {

            document.querySelectorAll('[id^="content-"]').forEach(el => el.classList.add('hidden'));

            document.querySelectorAll('[id^="tab-"]').forEach(el => el.classList.remove('active'));

            document.getElementById(`content-${tabName}`).classList.remove('hidden');

            document.getElementById(`tab-${tabName}`).classList.add('active');

        }


        // --- Configuración de Gráficos ---

        const chartFontColor = '#9CA3AF';

        const gridColor = '#374151';

        const copperColor = '#bd7f36';

        const copperColorTransparent = 'rgba(189, 127, 54, 0.2)';

        const lightGreyColor = '#ecebe8';

        const lightGreyColorTransparent = 'rgba(236, 235, 232, 0.6)';



        // Datos del trimestre

        const months = ['Abril', 'Mayo', 'Junio'];

        const impressionsData = [41430, 57400, 86620];

        const interactionsData = [156, 507, 485];

        const reachData = [41430, 57400, 86620]; 

        

        // Datos para el gráfico de impacto

        const impactMonths = ['Feb', 'Mar', 'Abr', 'May', 'Jun'];

        const impactImpressions = [64190, 64700, 41430, 57400, 86620];

        const impactInteractions = [510, 834, 156, 507, 485];

        const newFollowers = [141, 87, 64, 107, 82];



        // Gráfico 1: Alcance (Trimestral)

        const reachCtx = document.getElementById('reachChart').getContext('2d');

        new Chart(reachCtx, {

            type: 'bar',

            data: {

                labels: months,

                datasets: [{

                    label: 'Alcance Mensual',

                    data: reachData,

                    backgroundColor: [

                        'rgba(236, 235, 232, 0.4)',

                        'rgba(236, 235, 232, 0.6)',

                        'rgba(236, 235, 232, 0.8)',

                    ],

                    borderColor: lightGreyColor,

                    borderWidth: 1,

                }, {

                    label: 'Tendencia de Alcance',

                    data: reachData,

                    type: 'line',

                    borderColor: copperColor,

                    tension: 0.4,

                    pointRadius: 2,

                    pointHoverRadius: 7,

                    pointBackgroundColor: copperColor

                }]

            },

            options: {

                responsive: true,

                plugins: {

                    title: {

                        display: true,

                        text: 'Evolución del Alcance (Impresiones)',

                        color: lightGreyColor,

                        font: { size: 18, weight: '600' }

                    },

                    legend: { 

                        display: true,

                        labels: { color: chartFontColor }

                    }

                },

                scales: {

                    y: {

                        grid: { color: gridColor },

                        ticks: { color: chartFontColor, font: { weight: '600' } }

                    },

                    x: {

                        grid: { display: false },

                        ticks: { color: chartFontColor, font: { weight: '600' } }

                    }

                }

            }

        });


        // Gráfico 2: Interacciones (Trimestral)

        const performanceCtx = document.getElementById('performanceChart').getContext('2d');

        new Chart(performanceCtx, {

            type: 'bar',

            data: {

                labels: months,

                datasets: [

                    {

                        label: 'Interacciones',

                        data: interactionsData,

                        backgroundColor: copperColor,

                        borderColor: copperColor,

                        borderWidth: 1,

                        order: 1

                    },

                    {

                        label: 'Tendencia de Interacción',

                        data: interactionsData,

                        type: 'line',

                        borderColor: lightGreyColor,

                        borderDash: [5, 5],

                        tension: 0.4,

                        pointRadius: 2,

                        pointHoverRadius: 7,

                        pointBackgroundColor: lightGreyColor,

                        order: 0

                    }

                ]

            },

            options: {

                responsive: true,

                plugins: {

                    title: {

                        display: true,

                        text: 'El Salto Trimestral en Interacción',

                        color: lightGreyColor,

                        font: { size: 18, weight: '600' }

                    },

                    legend: {

                       display: true,

                       labels: { color: chartFontColor }

                    }

                },

                scales: {

                    y: {

                        type: 'linear',

                        display: true,

                        position: 'left',

                        title: { display: true, text: 'Interacciones', color: chartFontColor },

                        grid: { color: gridColor },

                        ticks: { color: chartFontColor }

                    },

                    x: {

                        grid: { display: false },

                        ticks: { color: chartFontColor, font: { weight: '600' } }

                    }

                }

            }

        });


        // Gráfico 3: Impacto - Alcance y Nuevos Seguidores

        const impactReachFollowersCtx = document.getElementById('impactReachFollowersChart').getContext('2d');

        new Chart(impactReachFollowersCtx, {

            type: 'bar',

            data: {

                labels: impactMonths,

                datasets: [

                    {

                        label: 'Alcance (Impresiones)',

                        data: impactImpressions,

                        backgroundColor: (context) => {

                            const index = context.dataIndex;

                            return index < 2 ? 'rgba(156, 163, 175, 0.5)' : lightGreyColorTransparent;

                        },

                        borderColor: lightGreyColor,

                        borderWidth: 1,

                        yAxisID: 'y'

                    },

                    {

                        label: 'Nuevos Seguidores',

                        data: newFollowers,

                        type: 'line',

                        borderColor: copperColor,

                        tension: 0.4,

                        yAxisID: 'y1',

                        pointRadius: 3,

                        pointHoverRadius: 8,

                        pointBackgroundColor: copperColor

                    }

                ]

            },

            options: {

                responsive: true,

                plugins: {

                    title: {

                        display: true,

                        text: 'Impacto: Alcance vs. Crecimiento',

                        color: lightGreyColor,

                        font: { size: 18, weight: '600' }

                    },

                    legend: {

                       display: true,

                       labels: { color: chartFontColor }

                    },

                    tooltip: {

                        mode: 'index',

                        intersect: false

                    }

                },

                scales: {

                    y: {

                        type: 'linear',

                        display: true,

                        position: 'left',

                        title: { display: true, text: 'Impresiones', color: chartFontColor },

                        grid: { color: gridColor },

                        ticks: { color: chartFontColor }

                    },

                    y1: {

                        type: 'linear',

                        display: true,

                        position: 'right',

                        title: { display: true, text: 'Nuevos Seguidores', color: chartFontColor },

                        grid: { drawOnChartArea: false },

                        ticks: { color: chartFontColor }

                    },

                    x: {

                        grid: { display: false },

                        ticks: { color: chartFontColor, font: { weight: '600' } }

                    }

                }

            }

        });


        // Gráfico 4: Impacto - Alcance e Interacciones

        const impactReachInteractionsCtx = document.getElementById('impactReachInteractionsChart').getContext('2d');

        new Chart(impactReachInteractionsCtx, {

            type: 'bar',

            data: {

                labels: impactMonths,

                datasets: [

                    {

                        label: 'Alcance (Impresiones)',

                        data: impactImpressions,

                        backgroundColor: (context) => {

                            const index = context.dataIndex;

                            return index < 2 ? 'rgba(156, 163, 175, 0.5)' : lightGreyColorTransparent;

                        },

                        borderColor: lightGreyColor,

                        borderWidth: 1,

                        yAxisID: 'y'

                    },

                    {

                        label: 'Interacciones',

                        data: impactInteractions,

                        type: 'line',

                        borderColor: copperColor,

                        tension: 0.4,

                        yAxisID: 'y1',

                        pointRadius: 3,

                        pointHoverRadius: 8,

                        pointBackgroundColor: copperColor

                    }

                ]

            },

            options: {

                responsive: true,

                plugins: {

                    title: {

                        display: true,

                        text: 'Impacto: Alcance vs. Interacción',

                        color: lightGreyColor,

                        font: { size: 18, weight: '600' }

                    },

                    legend: {

                       display: true,

                       labels: { color: chartFontColor }

                    },

                    tooltip: {

                        mode: 'index',

                        intersect: false

                    }

                },

                scales: {

                    y: {

                        type: 'linear',

                        display: true,

                        position: 'left',

                        title: { display: true, text: 'Impresiones', color: chartFontColor },

                        grid: { color: gridColor },

                        ticks: { color: chartFontColor }

                    },

                    y1: {

                        type: 'linear',

                        display: true,

                        position: 'right',

                        title: { display: true, text: 'Interacciones', color: chartFontColor },

                        grid: { drawOnChartArea: false },

                        ticks: { color: chartFontColor }

                    },

                    x: {

                        grid: { display: false },

                        ticks: { color: chartFontColor, font: { weight: '600' } }

                    }

                }

            }

        });

    </script>

</body>

</html>