@import url('../base/variables.css');

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    transition: background 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    color: var(--color-primary);
    margin-top: 0;
}

/* Estilos para el header */
header {
    background: var(--color-bg-dark);
    color: var(--color-text);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid rgba(78, 35, 252, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-section img {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.logo-section:hover img {
    transform: scale(1.05);
}

header img {
    max-width: 100px;
    display: block;
}

header h1 {
    font-size: 2.7rem;
    margin: 0 30px;
    letter-spacing: 2px;
    font-weight: 700;
    position: relative;
    animation: glitchEffect 8s infinite;
}

/* Efecto Glitch Sutil */
@keyframes glitchEffect {
    0%, 95%, 100% {
        transform: translateX(0);
        text-shadow: 
            0 0 5px rgba(78, 35, 252, 0.3),
            0 0 10px rgba(78, 35, 252, 0.2);
    }
    96% {
        transform: translateX(-1px);
        text-shadow: 
            2px 0 0 rgba(255, 0, 0, 0.3),
            -2px 0 0 rgba(0, 255, 255, 0.3),
            0 0 5px rgba(78, 35, 252, 0.5);
    }
    97% {
        transform: translateX(1px);
        text-shadow: 
            -2px 0 0 rgba(255, 0, 0, 0.3),
            2px 0 0 rgba(0, 255, 255, 0.3),
            0 0 5px rgba(78, 35, 252, 0.5);
    }
    98% {
        transform: translateX(0);
        text-shadow: 
            0 0 5px rgba(78, 35, 252, 0.3),
            0 0 10px rgba(78, 35, 252, 0.2);
    }
}

/* Partículas Sutiles */
header h1::before,
header h1::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #4e23fc 30%, rgba(78, 35, 252, 0.6) 70%);
    border-radius: 50%;
    animation: particleFloat 4s ease-in-out infinite;
    opacity: 0.7;
}

header h1::before {
    top: -10px;
    left: -15px;
    animation-delay: 0s;
}

header h1::after {
    top: 50%;
    right: -20px;
    animation-delay: 2s;
}

/* Partículas adicionales con pseudo-elementos */
header h1 {
    position: relative;
}

header h1::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(78, 35, 252, 0.4) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 90% 90%, rgba(78, 35, 252, 0.5) 1px, transparent 1px);
    background-size: 100px 100px, 80px 80px, 120px 120px, 60px 60px;
    background-position: 0 0, 20px 20px, 40px 40px, 60px 60px;
    animation: particleBackground 6s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-8px) scale(1.2);
        opacity: 1;
    }
}

@keyframes particleBackground {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(0);
    }
    50% {
        opacity: 0.8;
        transform: translateX(2px);
    }
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 2em;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
nav a[aria-current="page"]::after {
    background: var(--color-primary);
}
nav a:hover, nav a:focus {
    color: var(--color-primary);
}

/* Contenedor principal */
.contenedor {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: auto;
}

/* Estilos de cada sección */
.hero {
    padding: 3em 1em 2em 1em;
    text-align: center;
    background: linear-gradient(120deg, #6c3cff 60%, #3a1aff 100%);
    color: var(--color-text-light);
    border-radius: 0 0 2em 2em;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    margin-bottom: 2em;
    animation: fadeInDown 1s;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero h2, .hero h3 {
    color: var(--color-text-light);
    font-size: 2.2rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--space-4);
}

.hero p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 1em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

/* Estilos específicos de .nueva */
.nueva {
    text-align: justify;
    color: var(--color-text-secondary);
}

.nueva h2 {
    color: var(--color-text-dark);
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-6);
    text-align: center;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animación */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SECCIÓN DE EQUIPO MEJORADA ===== */
.team-section {
    padding: var(--space-16) var(--space-6);
    background: var(--color-bg);
    position: relative;
}

.team-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(78, 35, 252, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(255, 87, 34, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.team-section > * {
    position: relative;
    z-index: 2;
}

.team-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.team-section h2 {
    text-align: center;
    color: var(--color-text-dark);
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-12);
    letter-spacing: -0.02em;
}

/* ===== GRID DE INTEGRANTES MEJORADO ===== */
.integrantes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-8);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== CARDS DE INTEGRANTES MEJORADAS ===== */
.integrante {
    background: var(--color-bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--color-border-light);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 320px;
    justify-content: space-between;
}

.integrante::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.integrante:hover::before {
    transform: scaleX(1);
}

.integrante:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-border-primary);
}

/* ===== AVATAR MEJORADO ===== */
.integrante-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto var(--space-3);
    box-shadow: var(--shadow-primary);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.integrante-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.integrante:hover .integrante-avatar::before {
    left: 100%;
}

.integrante:hover .integrante-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.integrante-avatar svg {
    width: 50px;
    height: 50px;
    transition: transform var(--transition-normal);
}

.integrante:hover .integrante-avatar svg {
    transform: scale(1.1);
}

/* ===== ESTILOS PARA IMÁGENES EN AVATARES ===== */
.integrante-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transition: all var(--transition-bounce);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.integrante:hover .integrante-avatar img {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== CONTENIDO DEL INTEGRANTE ===== */
.integrante h3 {
    color: var(--color-text-dark);
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-1);
    letter-spacing: -0.01em;
}

.cargo {
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rol-tecnico {
    font-size: var(--text-xs);
    margin-bottom: var(--space-2);
    color: var(--color-secondary);
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.5px;
}

.especialidades {
    font-size: var(--text-xs);
    margin-bottom: var(--space-3);
    color: var(--color-text-secondary);
    line-height: 1.4;
    opacity: 0.9;
}

/* ===== REDES SOCIALES MEJORADAS ===== */
.redes {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 2px solid var(--color-border-light);
    width: 100%;
    background: var(--color-bg-secondary);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    margin-top: var(--space-4);
}

.redes a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    border: 2px solid var(--color-border-light);
}

.redes a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(78, 35, 252, 0.1), transparent);
    transition: left var(--transition-slow);
}

.redes a:hover::before {
    left: 100%;
}

.redes a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.redes svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-normal);
}

.redes a:hover svg {
    transform: scale(1.1);
}

/* Pie de página */
footer {
    text-align: center;
    padding: 18px 0;
    background: var(--color-bg-dark);
    color: var(--color-text);
    font-size: 1rem;
    letter-spacing: 1px;
    border-top: 2px solid var(--color-primary);
    margin-top: 40px;
}

footer a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--color-accent);
}

/* Estilos adicionales para asegurar consistencia */
main {
    background: var(--color-bg-dark);
    min-height: calc(100vh - 200px);
}

.equipo {
    display: none; /* Ocultamos la clase antigua */
}

@media (max-width: 900px) {
    .integrantes {
        flex-direction: column;
        align-items: center;
    }
}

/* 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;
}

/* Focus styles for accessibility */
button:focus, a:focus {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Microinteracciones */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== RESPONSIVE DESIGN MEJORADO ===== */
@media (max-width: 768px) {
    .header-container {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    header h1 {
        font-size: 2.3rem;
        margin: 0;
    }
    
    .logo-section img {
        max-width: 80px;
        height: auto;
    }

    .team-section {
        padding: var(--space-12) var(--space-4);
    }
    
    .team-section h2 {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-8);
    }
    
    .integrantes {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .integrante {
        padding: var(--space-6);
        min-height: 180px;
    }
    
    .integrante-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: var(--space-3);
    }
    
    .integrante-avatar svg {
        width: 40px;
        height: 40px;
    }
    
    .integrante h3 {
        font-size: var(--text-lg);
    }
    
    .redes {
        gap: var(--space-2);
    }
    
    .redes a {
        width: 40px;
        height: 40px;
    }
    
    .redes svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .integrante {
        padding: var(--space-4);
    }
    
    .integrante-avatar {
        width: 70px;
        height: 70px;
    }
    
    .integrante-avatar svg {
        width: 35px;
        height: 35px;
    }
    
    .integrante h3 {
        font-size: var(--text-base);
    }
    
    .cargo {
        font-size: var(--text-sm);
    }
    
    .especialidades {
        font-size: var(--text-xs);
    }
    
    .redes a {
        width: 36px;
        height: 36px;
    }
    
    .redes svg {
        width: 16px;
        height: 16px;
    }
}
@media (prefers-color-scheme: dark) {
    body {
        background: var(--color-bg-dark);
        color: var(--color-text-light);
    }
    .contenedor, .nueva {
        background: #23272f;
        color: var(--color-text-light);
    }
    .hero {
        background: linear-gradient(120deg, var(--color-primary-dark) 60%, var(--color-secondary) 100%);
        color: var(--color-text-light);
    }
    header, footer {
        background: #181a1b;
        color: var(--color-text-light);
    }
    nav a {
        color: var(--color-text-light);
    }
    nav a:hover, nav a:focus {
        color: var(--color-accent);
    }
}
