
:root {
    --primary-color: #9A73D8;
    --secondary-color: #E0B0FF;
    --accent-color: #F45DC1;
    --text-color: #333;
    --light-text: #f8f9fa;
    --background-color: #ffffff;
    --section-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
    font-size: 1.2rem;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Secciones */
section {
    padding: 3rem 0;
}

section:nth-child(even) {
    background-color: var(--section-bg);
}

h2 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

h3 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

h4 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
}
h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 3px;
    background-color: var(--primary-color);
}
p {
    margin-bottom: 1rem;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    
}
.enlaces {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.card a {
   width: 100%;
   text-align: center;
}
blockquote {
    text-align: justify;
}
.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

/* Tablas */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: .9rem;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--primary-color);
    color: var(--light-text);
    font-family: var(--font-primary);
    font-weight: 600;
}
tr :nth-child(2) {
    text-align: center;
}
tr :nth-child(3) {
    text-align: center;
}
tr :nth-child(4) {
    text-align: center;
}
tr :nth-child(5) {
    text-align: center;
}
/* tr:nth-child(even) {
    background-color: var(--section-bg);
} */

/* tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
} */

/* Botones */
.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    margin: 0.5rem 0.5rem 0.5rem 0;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Características */
.feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.feature i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.feature-content h4 {
    font-family: var(--font-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Pestañas */
.tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab:hover {
    color: var(--secondary-color);
}

.tab.active {
    color: var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

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

    .table-container {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        border-bottom: 1px solid var(--border-color);
        border-right: none;
    }

    .tab.active {
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid var(--secondary-color);
    }
}



#charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
#charts-container2 {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 30px;

}
/* Estilo para cada tarjeta de gráfico */
.chart-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
}
.chart-card h2 {
    margin-top: 0;
    color: #555;
    font-size: 1.2em;
}
/* Contenedor para cada canvas, para controlar su tamaño */
.chart-container {
    position: relative;
    height: 300px; /* Altura fija para todos los gráficos */
    width: 100%;
}

.chart-wrapper {
    width: 200px;
    height: fit-content;
    margin: 20px;
    display: inline-block; /* O como prefieras mostrarlos */
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    font-size: 1rem;
}
.chart-wrapper canvas {
    max-height: 300px;
}


.contTablaGrafico {
    display: flex;
    flex-direction: column;

    width: 100%;
    justify-content: space-between;
    
}
.contGrafico {
    display: flex;
    flex-wrap: wrap;
    column-count: 2;
    justify-content: space-evenly;
}
.contTabla {
    display: flex;
}

.vacio {
    margin: 50px;
}



.total {
    background: #cfcdcd90 !important;
    font-weight: bold;
}