/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --color-primario: #2c3e50;
    --color-secundario: #3498db;
    --color-accent: #e74c3c; /* Corregido: era --color-acent */
    --color-fondo: #f4f7f6;
    --color-texto: #333;
    --color-texto-claro: #ecf0f1;
    --fuente-titulos: 'Montserrat', sans-serif;
    --fuente-cuerpo: 'Lato', sans-serif;
    --sombra-caja: 0 4px 8px rgba(0,0,0,0.1);
    --borde-redondeado: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-cuerpo);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    font-family: var(--fuente-titulos);
    color: var(--color-primario);
    margin-bottom: 20px;
}

h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-secundario);
    border-radius: 2px;
}

section {
    padding: 60px 0;
}

/* --- ESTILOS COMUNES DE TARJETAS --- */
.card {
    background-color: white;
    border-radius: var(--borde-redondeado);
    box-shadow: var(--sombra-caja);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.card p {
    flex-grow: 1;
    margin-bottom: 15px; /* Agregado margen consistente */
}

.card a {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-secundario);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease; /* Agregada transición */
}

.card a:hover {
    color: var(--color-accent);
}

/* --- ESTILOS DE BOTONES DE FILTRO --- */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--color-secundario);
    background-color: transparent;
    color: var(--color-secundario);
    border-radius: 25px;
    cursor: pointer;
    font-family: var(--fuente-cuerpo);
    font-weight: bold;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--color-secundario);
    color: white;
}

.filter-btn:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* --- MENU TOGGLE --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-texto-claro);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* --- MEJORAS DE ACCESIBILIDAD --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- MEDIA QUERIES PARA RESPONSIVIDAD --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .container {
        padding: 15px;
    }
    
    section {
        padding: 40px 0;
    }
    
    .filter-buttons {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .card-content {
        padding: 15px;
    }
}