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

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f7f7;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

.contenedor {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

.cabecera-principal {
    background: linear-gradient(135deg, #0b3d91 0%, #1a5cff 100%);
    color: #fff;
    padding: 0.8rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
    text-align: center;
}

.cabecera-principal .contenedor {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cabecera-principal h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.navegacion {
    list-style: none;
    display: flex;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.navegacion a {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.navegacion a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.navegacion a.activo {
    background: #fff;
    color: #0b3d91;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contenedor-tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tarjeta {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.tarjeta:hover {
    transform: translateY(-3px);
}

.tarjeta h3 {
    color: #0b3d91;
    margin-bottom: 0.5rem;
}

button {
    background-color: #0b3d91;
    color: white;
    padding: 0.9rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #092a66;
}

.pie-pagina {
    background: #222;
    color: #ddd;
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .cabecera-principal h1 {
        font-size: 1.2rem;
    }
    .navegacion {
        gap: 0.5rem;
    }
}