:root {
    /* Paleta más vibrante y armónica */
    --primary: #6366f1;
    --secondary: #a855f7;
    --accent: #22d3ee;
    --highlight: #f43f5e;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.contenido {
    font-family: 'Inter', system-ui, -apple-system, sans-serif; /* Tipografía más moderna */
    background: radial-gradient(circle at top left, var(--primary), transparent),
                radial-gradient(circle at bottom right, var(--secondary), transparent),
                #f8fafc;
    background-attachment: fixed;
    min-height: 100vh;
    padding: clamp(10px, 5vw, 40px);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- Header --- */
header {
    text-align: center;
    background: var(--glass);
    padding: 60px 20px;
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* --- Navegación Sticky --- */
nav {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px;
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 20px;
    z-index: 1000;
    max-width: fit-content;
    margin: 0 auto 40px;
    border: 1px solid var(--glass-border);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* --- Galería de Secciones --- */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
}

section {
    background: var(--glass);
    border-radius: 28px;
    padding: 35px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all 0.5s ease;
}

section:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.9);
}

section h2 {
    font-size: 1.75rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 15px;
}

section h2::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
}

/* --- Submenú / Listado --- */
.submenu {
    list-style: none;
    margin-top: 25px;
}

.submenu li {
    margin-bottom: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.submenu li:hover {
    background: white;
    border-color: var(--primary);
    padding-left: 30px; /* Efecto de desplazamiento */
}

.submenu a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.descripcion {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

/* --- Footer --- */
.pie {
    background: var(--text-main);
    color: white;
    padding: 60px 20px;
    border-radius: 40px 40px 0 0;
    margin-top: 60px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* --- Animación de entrada --- */
@keyframes reveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

section {
    animation: reveal 0.6s ease-out forwards;
}

/* Responsive */
@media (max-width: 600px) {
    nav {
        width: 90%;
        border-radius: 20px;
    }
    
    nav ul {
        flex-direction: row;
        overflow-x: auto; /* Scroll horizontal si hay muchos links */
        padding: 5px;
    }

    section {
        padding: 20px;
    }
}