/* css/artistas.css */

/* FONDO PRINCIPAL APPLE GLASS AMBIENT */
body { 
    background: radial-gradient(circle at top left, rgba(26, 11, 46, 1) 0%, #000000 50%, rgba(10, 17, 40, 1) 100%);
    background-attachment: fixed;
    color: #ffffff; 
    overflow-x: hidden; 
    font-family: 'SF Pro Display', 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.main-content {
    flex: 1; 
    padding: 20px 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

/* OPTIMIZACIÓN: ACELERACIÓN DE HARDWARE Y SIMPLIFICACIÓN DE SOMBRAS */
.particulas-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0.4;}
.particula { 
    position: absolute; bottom: -20px; opacity: 0; border-radius: 50%; 
    animation: subir-brillo linear infinite; 
    will-change: transform, opacity; /* GPU Acceleration */
    transform: translateZ(0); 
}

.p1, .p2, .p3, .p4, .p5, .p6, .p7, .p8, .p9 {
    background: var(--p-color);
    box-shadow: 0 0 10px var(--p-color);
}
.p1 { left: 15%; width: 8px; height: 8px; --p-color: #bf5af2; animation-duration: 4s; animation-delay: 0s; }
.p2 { left: 35%; width: 12px; height: 12px; --p-color: #FFD700; animation-duration: 5.5s; animation-delay: 1.2s; }
.p3 { left: 55%; width: 8px; height: 8px; --p-color: #0A84FF; animation-duration: 3.5s; animation-delay: 0.5s; }
.p4 { left: 75%; width: 10px; height: 10px; --p-color: #FF453A; animation-duration: 4.8s; animation-delay: 2s; }

@keyframes subir-brillo { 0% { transform: translateY(0) scale(0.5); opacity: 0; } 20% { opacity: 0.8; } 80% { opacity: 0.5; } 100% { transform: translateY(-100vh) scale(1.5); opacity: 0; } }

/* HEADER HERO ARTISTAS */
.hero-artistas {
    position: relative; width: 100%; height: 20vh; min-height: 140px; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: url('../img/fiestadelamusicacartel.jpg') center center/cover no-repeat;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 5;
}
.hero-artistas::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.95) 100%); z-index: 1;
}
.hero-artistas-content {
    position: relative; z-index: 2; text-align: center; width: 100%; padding: 0 20px;
}
.hero-artistas h1 {
    margin: 0; font-size: 2rem; font-weight: 800; color: white; 
    text-shadow: 0 5px 20px rgba(0,0,0,1), 0 0 10px rgba(191,90,242,0.8);
    letter-spacing: 2px; text-transform: uppercase;
}
.btn-volver-hero {
    position: absolute; top: 20px; left: 20px; z-index: 10;
    color: white; text-decoration: none; font-size: 1.2rem; padding: 10px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); transition: 0.3s;
    width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-volver-hero:hover { background: rgba(191,90,242,0.5); border-color: #bf5af2; transform: scale(1.1); }

/* BUSCADOR Y FILTROS */
.buscadores-zona { padding: 5px 0 25px 0; position: relative; z-index: 5; display: flex; flex-direction: column; gap: 10px; max-width: 800px; margin: 0 auto; width: 100%;}
.buscador-wrapper { position: relative; width: 100%; }
.buscador-feria { width: 100%; padding: 16px 20px 16px 50px; border-radius: 24px; border: 1px solid rgba(191,90,242,0.5); background: rgba(20, 20, 25, 0.6); backdrop-filter: blur(15px); color: white; font-size: 1rem; outline: none; transition: 0.3s; font-family: 'Poppins', sans-serif; box-shadow: 0 0 20px rgba(191,90,242,0.3); box-sizing: border-box;}
.buscador-feria:focus { background: rgba(0,0,0,0.8); border-color: #bf5af2; box-shadow: 0 0 30px rgba(191,90,242,0.5); }
.icon-search { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #bf5af2; font-size: 1.2rem; }

.filtros-wrapper { position: relative; margin-top: 5px; }

.scroll-hint-filtros {
    text-align: center; color: #a1a1a6; font-size: 0.85rem; padding: 5px 0 15px 0;
    display: block; width: 100%; letter-spacing: 0.5px; font-weight: 500;
    animation: desliza-lento 3s infinite alternate ease-in-out;
}
@keyframes desliza-lento {
    0% { transform: translateX(-5px); opacity: 0.6; }
    100% { transform: translateX(5px); opacity: 1; color: #FFD700; text-shadow: 0 0 10px rgba(255,215,0,0.5); }
}

.filtros-feria { display: flex; gap: 12px; overflow-x: auto; padding: 0 5px 15px 5px; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; justify-content: flex-start; }
.filtros-feria::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
    .filtros-feria { justify-content: center; scrollbar-width: thin; scrollbar-color: rgba(191,90,242,0.6) rgba(255,255,255,0.05); }
    .filtros-feria::-webkit-scrollbar { display: block; height: 8px; }
    .filtros-feria::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
    .filtros-feria::-webkit-scrollbar-thumb { background: rgba(191,90,242,0.6); border-radius: 4px; }
    .filtros-feria::-webkit-scrollbar-thumb:hover { background: rgba(191,90,242,0.9); }
}

.filtro-btn { background: rgba(255,255,255,0.05); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.1); color: #e5e5ea; padding: 10px 20px; border-radius: 30px; white-space: nowrap; font-size: 0.9rem; font-weight: 500; cursor: pointer; flex-shrink: 0; scroll-snap-align: start; transition: 0.3s; }
.filtro-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.filtro-btn.activo { background: #bf5af2; border-color: #bf5af2; box-shadow: 0 0 15px rgba(191,90,242,0.4); font-weight: 600; color: white; }

/* GRID DE ARTISTAS */
.grid-artistas { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 25px; 
    position: relative; 
    z-index: 2; 
}

.card-artista { 
    background: rgba(255,255,255,0.03); 
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 24px; 
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    will-change: transform, opacity;
    transform: translateZ(0);
}
.card-artista:hover { 
    transform: translateY(-5px) !important; 
    background: rgba(255,255,255,0.06); 
    border-color: rgba(255, 215, 0, 0.7) !important; 
}

.tarjeta-oculta {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

@keyframes aparicion-luces-artista {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes resplandor-dorado-continuo {
    0% { box-shadow: 0 5px 15px rgba(0,0,0,0.1), inset 0 0 5px rgba(255, 215, 0, 0.05); border-color: rgba(255, 215, 0, 0.2); }
    100% { box-shadow: 0 10px 25px rgba(255, 215, 0, 0.25), inset 0 0 10px rgba(255, 215, 0, 0.1); border-color: rgba(255, 215, 0, 0.6); }
}

.anim-aparicion-luces {
    animation: aparicion-luces-artista 0.5s ease-out forwards,
               resplandor-dorado-continuo 3s infinite alternate ease-in-out 0.5s;
}

@keyframes sol-iluminado {
    0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); border-color: rgba(255, 215, 0, 0.6); }
    100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), inset 0 0 10px rgba(255,215,0,0.4); border-color: #ffffff; }
}

@keyframes moneda-girando-intro {
    0% { transform: perspective(600px) rotateY(0deg) scale(1); }
    100% { transform: perspective(600px) rotateY(360deg) scale(1); }
}

@keyframes moneda-girando-hover {
    0% { transform: perspective(600px) rotateY(0deg) scale(1.05); }
    100% { transform: perspective(600px) rotateY(360deg) scale(1.05); }
}

.card-artista .foto-container {
    width: 130px; height: 130px; 
    border-radius: 50%; 
    margin-bottom: 15px;
    border: 3px solid rgba(255, 215, 0, 0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    animation: sol-iluminado 2.5s infinite alternate ease-in-out;
}

.anim-aparicion-luces .foto-container {
    animation: sol-iluminado 2.5s infinite alternate ease-in-out, moneda-girando-intro 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-artista:hover .foto-container {
    animation: sol-iluminado 0.8s infinite alternate ease-in-out, moneda-girando-hover 1.5s linear infinite;
}

.card-artista img { 
    width: 100%; height: 100%; object-fit: cover; 
    will-change: transform;
}
.card-artista .icon-placeholder {
    font-size: 4rem; color: rgba(255, 215, 0, 0.4);
}

.card-artista h3 { margin: 0 0 5px 0; font-size: 1.15rem; font-weight: 700; color: white; line-height: 1.3; }
.card-artista p { margin: 0; font-size: 0.85rem; color: #a1a1a6; font-weight: 500; }

.pantalla-vacia { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }

/* VISOR DE FOTOS UNIVERSAL */
.carrusel-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(15px); z-index: 5000; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; flex-direction: column; }
.carrusel-img-container { width: 100%; height: 100%; flex-grow: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; position: relative; }
.img-carrusel-activa { max-width: 95%; max-height: 85vh; object-fit: contain; border-radius: 16px; transition: transform 0.3s; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8); user-select: none; -webkit-user-drag: none; cursor: zoom-in; display: block; margin: auto;}
.btn-cerrar-carrusel { position: absolute; top: calc(env(safe-area-inset-top, 20px) + 20px); right: 30px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255,255,255,0.2); color: white; width: 50px; height: 50px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; z-index: 5010; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.btn-cerrar-carrusel:hover { background: rgba(231,76,60,0.8); transform: rotate(90deg); }

/* FOOTER */
.footer-sis-text { color: #86868b; font-size: 0.85rem; margin: 0; text-transform: uppercase; letter-spacing: 2px; font-weight: 500; }
.anim-letter { display: inline-block; color: #bf5af2; font-weight: 800; animation: resplandor-letra 2s infinite alternate; }
@keyframes resplandor-letra { 
    0% { text-shadow: 0 0 5px rgba(191,90,242,0.2); color: #bf5af2; transform: scale(1); } 
    100% { text-shadow: 0 0 15px rgba(191,90,242,0.8), 0 0 30px rgba(191,90,242,0.5); color: #e056fd; transform: scale(1.1); } 
}

/* ESTILOS PARA EL BOTÓN IR ARRIBA */
.btn-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(191,90,242,0.5);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
}

.btn-top:hover {
    background: #bf5af2;
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(191,90,242,0.6);
}

@media (min-width: 769px) {
    .btn-top {
        bottom: 40px;
        right: 30px;
    }
}