/* estilos.css */

/* Paleta de Colores Corporativa (Rojo como acento) */
:root {
    --color-primary: #DC2626; /* red-600 */
    --color-primary-hover: #B91C1C; /* red-700 */
    --color-background: #f9fafb; /* gray-50 */
    --color-card-background: #ffffff;
    --color-text-header: #111827; /* gray-900 */
    --color-text-body: #374151; /* gray-700 */
    --color-text-muted: #6b7280; /* gray-500 */
    --color-border: #e5e7eb; /* gray-200 */
}

/* Estilos Base y Tipografía */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-header);
    font-weight: 700;
}

h1 { font-size: 3rem; line-height: 1; font-weight: 800; }
h2 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 800; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; }

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Barra de Navegación Superior */
.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-link {
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
    border-bottom: 4px solid transparent;
    padding: 1.5rem 0;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.nav-link:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Contenedor Principal y Secciones */
main {
    padding: 4rem 0;
}

/* Componentes Unificados (Tarjetas, Botones, Tablas, Gráficos) */
.card {
    background-color: var(--color-card-background);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

.stat-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    text-align: center;
}

.filter-btn, .sub-nav-link {
    transition: all 0.2s ease-in-out;
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    background-color: #fff;
}

.filter-btn.active, .sub-nav-link.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.filter-select, .filter-input {
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

thead tr {
    background-color: var(--color-text-header);
    color: #ffffff;
}

tbody tr:nth-of-type(even) {
    background-color: #f9fafb;
}

tbody tr:hover {
    background-color: #fef2f2; /* red-50 */
}

.chart-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    height: 400px;
}
/* Añadir al final de estilos.css */

/* Estilo para los botones "Saber Más" */
.saber-mas-btn {
    display: inline-block;
    margin-top: 1.5rem; /* 24px */
    padding: 0.75rem 1.5rem; /* 12px 24px */
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.saber-mas-btn:hover {
    background-color: var(--color-primary-hover);
}

/* Estilos para las pestañas de Tecnología */
.tech-tab {
    border-color: transparent;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}
.tech-tab.active {
    color: var(--color-primary);
    border-color: var(--color-primary) !important; /* Asegura que se sobreescriba */
    font-weight: 700;
}
[data-tech-content] {
    display: none;
}
[data-tech-content].active {
    display: block;
}

/* Añadir al final de estilos.css */

/* Estilos para el contenedor del menú desplegable */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Estilos para el menú que se despliega */
.dropdown-content {
    display: none; /* Oculto por defecto */
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    margin-top: 0.5rem;
}

/* Estilos para los enlaces dentro del menú */
.dropdown-content a {
    color: var(--color-text-body);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

/* Cambio de color al pasar el ratón por encima */
.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Mostrar el menú cuando la clase 'show' está presente */
.dropdown-content.show {
    display: block;
}
/* --- AÑADIR AL FINAL DE ESTILOS.CSS --- */

/* Estilos para el Menú Móvil */
.mobile-menu {
    display: none; /* Oculto por defecto, se mostrará con JS */
    position: absolute;
    top: 100%; /* Justo debajo del header */
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    border-top: 1px solid var(--color-border);
}

.mobile-menu a, .mobile-menu button {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-text-header);
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu a:hover, .mobile-menu button:hover {
    background-color: #f9fafb; /* gray-50 */
}

/* Estilos para el sub-menú desplegable dentro del menú móvil */
.mobile-submenu {
    display: none; /* Oculto por defecto */
    padding-left: 1.5rem; /* Indentación */
    background-color: #f9fafb;
}

.mobile-submenu a {
    padding-left: 2.5rem;
    font-weight: 500;
    color: var(--color-text-body);
}

/* Mostrar el submenú cuando esté activo */
.mobile-submenu.show {
    display: block;
}