/* ============================================
   EFECTOS AVANZADOS Y FUNCIONES PROFESIONALES
   ============================================ */

/* Cursor personalizado desactivado para mejor usabilidad */

/* Efectos de partículas reducidos - menos partículas */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    opacity: 0.3;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--main);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 20s infinite ease-in-out;
    box-shadow: 0 0 5px rgba(94, 23, 235, 0.4);
}

.particle:nth-child(odd) {
    background: var(--second);
    animation-duration: 25s;
    box-shadow: 0 0 5px rgba(46, 249, 160, 0.4);
}

.particle:nth-child(3n) {
    background: var(--pink);
    animation-duration: 30s;
    box-shadow: 0 0 5px rgba(254, 45, 117, 0.4);
}

@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }
    25% {
        transform: translate(100px, -100px) scale(1.2);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50px, -200px) scale(0.8);
        opacity: 0.3;
    }
    75% {
        transform: translate(-150px, -50px) scale(1.1);
        opacity: 0.35;
    }
}

/* Efectos de luz dinámica reducidos */
.light-effect {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(94, 23, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    filter: blur(80px);
    animation: light-move 20s ease-in-out infinite;
    mix-blend-mode: screen;
    opacity: 0.5;
}

.light-effect-2 {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(46, 249, 160, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    filter: blur(70px);
    animation: light-move-2 25s ease-in-out infinite;
    mix-blend-mode: screen;
    opacity: 0.5;
}

@keyframes light-move {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(300px, 200px) scale(1.2);
    }
    66% {
        transform: translate(-200px, 300px) scale(0.8);
    }
}

@keyframes light-move-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-300px, -200px) scale(1.3);
    }
}

/* Efectos de mouse tracking reducidos */
.mouse-tracker {
    position: fixed;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(94, 23, 235, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    filter: blur(50px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: screen;
    opacity: 0.4;
}

/* Efectos de parallax avanzado */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Efectos de glassmorphism avanzado */
.glass-advanced {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.glass-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Efectos de blur dinámico desactivados para mejor usabilidad */

/* Efectos de scroll reveal avanzados - contenido visible por defecto */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.scroll-reveal-left {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
}

.scroll-reveal-right {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
}

/* Efectos 3D avanzados */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(5deg) translateZ(20px);
}

/* Efectos de gradiente animado */
.gradient-animated {
    background: linear-gradient(-45deg, var(--main), var(--second), var(--pink), var(--main));
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Efectos de shimmer avanzado */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer-move 3s infinite;
}

@keyframes shimmer-move {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Efectos de ondas */
.wave-effect {
    position: relative;
    overflow: hidden;
}

.wave-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(94, 23, 235, 0.3);
    transform: translate(-50%, -50%);
    animation: wave-expand 2s ease-out infinite;
}

@keyframes wave-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

/* Efectos de neón reducidos para mejor legibilidad */
.neon-text {
    color: var(--second);
    text-shadow: 
        0 0 5px var(--second),
        0 0 10px var(--second);
    animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow: 
            0 0 5px var(--second),
            0 0 10px var(--second);
    }
    50% {
        text-shadow: 
            0 0 3px var(--second),
            0 0 6px var(--second);
    }
}

/* Efectos de magnetismo */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efectos de tilt 3D */
.tilt-3d {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* Efectos de loading avanzado */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--main-gradient);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 1s ease-out 2s forwards;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--second);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Efectos de scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--second-gradient);
    z-index: 9999;
    box-shadow: 0 0 10px rgba(46, 249, 160, 0.8);
    transition: width 0.1s ease-out;
}

/* Efectos de texto animado */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: text-reveal-up 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes text-reveal-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos de hover avanzados */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: 
        0 30px 60px rgba(94, 23, 235, 0.4),
        0 0 0 1px rgba(94, 23, 235, 0.1);
}

.hover-glow {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(94, 23, 235, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.hover-glow:hover::before {
    width: 300px;
    height: 300px;
}

/* Efectos de blur en scroll */
.scroll-blur {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.scroll-blur.blurred {
    filter: blur(8px);
    opacity: 0.5;
}

/* Efectos de parallax mouse reducidos */
.parallax-mouse {
    transition: transform 0.2s ease-out;
}

/* Efectos de imagen con overlay */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--main-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    mix-blend-mode: overlay;
}

.image-overlay:hover::after {
    opacity: 0.3;
}

/* Efectos de botón avanzado */
.btn-advanced {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-advanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-advanced:hover::before {
    width: 300px;
    height: 300px;
}

.btn-advanced:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(94, 23, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-advanced:active {
    transform: translateY(-2px) scale(1.02);
}

/* Efectos de texto con gradiente animado */
.text-gradient-animated {
    background: linear-gradient(-45deg, var(--main), var(--second), var(--pink), var(--main));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
}

/* Efectos de sombra dinámica */
.dynamic-shadow {
    transition: box-shadow 0.3s ease;
}

.dynamic-shadow:hover {
    box-shadow: 
        0 20px 60px rgba(94, 23, 235, 0.4),
        0 0 0 1px rgba(94, 23, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Efectos de rotación 3D */
.rotate-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rotate-3d:hover {
    transform: rotateY(15deg) rotateX(5deg);
}

/* Efectos de zoom avanzado */
.zoom-advanced {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.zoom-advanced:hover {
    transform: scale(1.1);
}

.zoom-advanced img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.zoom-advanced:hover img {
    transform: scale(1.2);
}

/* Efectos de blur avanzado */
.blur-advanced {
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Efectos de scroll snap */
.scroll-snap {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

.scroll-snap > * {
    scroll-snap-align: start;
}

/* Efectos de máscara */
.mask-reveal {
    mask-image: linear-gradient(to bottom, transparent, black);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black);
}

/* Efectos de clip-path */
.clip-reveal {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.clip-reveal.revealed {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Efectos de transformación avanzada */
.transform-advanced {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.transform-advanced:hover {
    transform: 
        perspective(1000px) 
        rotateX(10deg) 
        rotateY(10deg) 
        translateZ(50px) 
        scale(1.05);
}

/* Efectos de brillo */
.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--main-gradient);
    border-radius: inherit;
    z-index: -1;
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.glow-effect:hover::before {
    opacity: 0.8;
}

/* Efectos de partículas en hover */
.particle-hover {
    position: relative;
    overflow: hidden;
}

.particle-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(94, 23, 235, 0.6) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.particle-hover:hover::after {
    width: 400px;
    height: 400px;
}

/* Efectos de texto con efecto máquina de escribir */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--second);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--second);
    }
}

/* Efectos de scroll suave mejorado */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Efectos de imagen con parallax */
.image-parallax {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Efectos de contenedor con perspectiva */
.perspective-container {
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Efectos de hover con rotación */
.hover-rotate {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

/* Efectos de sombra animada */
.shadow-animated {
    animation: shadow-pulse 3s ease-in-out infinite;
}

@keyframes shadow-pulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(94, 23, 235, 0.3);
    }
    50% {
        box-shadow: 0 20px 50px rgba(94, 23, 235, 0.5);
    }
}

/* Efectos de texto con sombra animada reducidos */
.text-shadow-animated {
    animation: text-shadow-pulse 2s ease-in-out infinite;
}

@keyframes text-shadow-pulse {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(94, 23, 235, 0.2);
    }
    50% {
        text-shadow: 0 2px 6px rgba(94, 23, 235, 0.3);
    }
}

/* Media queries para efectos avanzados */
@media (max-width: 768px) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }
    
    * {
        cursor: auto !important;
    }
    
    .particles-container {
        display: none;
    }
    
    .light-effect,
    .light-effect-2 {
        display: none;
    }
}

/* Estilos avanzados para formularios */
.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating input,
.form-floating select,
.form-floating textarea {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(94, 23, 235, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-floating input:focus,
.form-floating select:focus,
.form-floating textarea:focus {
    border-color: var(--main);
    box-shadow: 
        0 8px 24px rgba(94, 23, 235, 0.2),
        0 0 0 3px rgba(94, 23, 235, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}

.form-floating label {
    color: var(--main);
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-floating input:focus ~ label,
.form-floating select:focus ~ label,
.form-floating textarea:focus ~ label {
    color: var(--main-hover);
    transform: scale(0.95);
}

/* Efectos avanzados para secciones */
section {
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(94, 23, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(46, 249, 160, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 20s ease infinite;
}

section > * {
    position: relative;
    z-index: 1;
}

/* Efectos de hover avanzados para todos los elementos */
a, button, .btn, .card, img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efectos de brillo en hover */
.hover-brightness {
    transition: filter 0.4s ease;
}

.hover-brightness:hover {
    filter: brightness(1.2) contrast(1.1);
}

/* Efectos de escala avanzada */
.scale-on-hover {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-on-hover:hover {
    transform: scale(1.1);
}

/* Efectos de rotación avanzada */
.rotate-on-hover {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rotate-on-hover:hover {
    transform: rotate(5deg) scale(1.05);
}

/* Efectos de sombra animada avanzada */
.shadow-animated-advanced {
    animation: shadow-pulse-advanced 3s ease-in-out infinite;
}

@keyframes shadow-pulse-advanced {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(94, 23, 235, 0.3),
            0 0 0 1px rgba(94, 23, 235, 0.1);
    }
    50% {
        box-shadow: 
            0 20px 50px rgba(94, 23, 235, 0.5),
            0 0 0 2px rgba(94, 23, 235, 0.2);
    }
}

/* Efectos de gradiente animado en texto - mejorado para legibilidad */
.text-gradient-animated-advanced {
    background: linear-gradient(-45deg, var(--main), var(--second), var(--pink), var(--main), var(--second));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift-advanced 10s ease infinite;
    font-weight: 800;
    /* Asegurar contraste y legibilidad */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes gradient-shift-advanced {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Efectos de blur avanzado en scroll desactivados */

/* Efectos de parallax mouse avanzado reducidos */
.parallax-mouse-advanced {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* Efectos de tilt 3D avanzado */
.tilt-3d-advanced {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    perspective: 1000px;
}

/* Efectos de glassmorphism avanzado */
.glass-advanced-2 {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Efectos de neón avanzado reducidos para mejor legibilidad */
.neon-advanced {
    color: var(--second);
    text-shadow: 
        0 0 3px var(--second),
        0 0 6px var(--second);
    animation: neon-pulse-advanced 2s ease-in-out infinite;
}

@keyframes neon-pulse-advanced {
    0%, 100% {
        text-shadow: 
            0 0 3px var(--second),
            0 0 6px var(--second);
        filter: brightness(1);
    }
    50% {
        text-shadow: 
            0 0 2px var(--second),
            0 0 4px var(--second);
        filter: brightness(1.1);
    }
}

/* Efectos de ondas avanzadas */
.wave-effect-advanced {
    position: relative;
    overflow: hidden;
}

.wave-effect-advanced::before,
.wave-effect-advanced::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(94, 23, 235, 0.3);
    transform: translate(-50%, -50%);
    animation: wave-expand-advanced 2s ease-out infinite;
}

.wave-effect-advanced::after {
    animation-delay: 0.5s;
    background: rgba(46, 249, 160, 0.3);
}

@keyframes wave-expand-advanced {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
    }
}

/* Efectos de máscara avanzada - desactivado para mostrar todo el contenido */
.mask-reveal-advanced {
    /* mask-image desactivado para mostrar todo el contenido */
}

/* Efectos de clip-path avanzado - contenido visible por defecto */
.clip-reveal-advanced {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transition: clip-path 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.clip-reveal-advanced.revealed {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Efectos de transformación 3D avanzada */
.transform-3d-advanced {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    perspective: 1000px;
}

.transform-3d-advanced:hover {
    transform: 
        perspective(1000px) 
        rotateX(15deg) 
        rotateY(15deg) 
        translateZ(100px) 
        scale(1.1);
}

/* Efectos de brillo avanzado */
.glow-effect-advanced {
    position: relative;
}

.glow-effect-advanced::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: var(--main-gradient);
    border-radius: inherit;
    z-index: -1;
    filter: blur(30px);
    opacity: 0;
    transition: opacity 0.6s ease;
    animation: glow-pulse 3s ease-in-out infinite;
}

.glow-effect-advanced:hover::before {
    opacity: 1;
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Efectos de partículas en hover avanzado */
.particle-hover-advanced {
    position: relative;
    overflow: hidden;
}

.particle-hover-advanced::before,
.particle-hover-advanced::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.8s ease, height 0.8s ease;
    pointer-events: none;
}

.particle-hover-advanced::before {
    background: radial-gradient(circle, rgba(94, 23, 235, 0.6) 0%, transparent 70%);
}

.particle-hover-advanced::after {
    background: radial-gradient(circle, rgba(46, 249, 160, 0.6) 0%, transparent 70%);
    transition-delay: 0.2s;
}

.particle-hover-advanced:hover::before,
.particle-hover-advanced:hover::after {
    width: 500px;
    height: 500px;
}

/* Efectos de texto con máquina de escribir avanzado */
.typewriter-advanced {
    overflow: hidden;
    border-right: 3px solid var(--second);
    white-space: nowrap;
    animation: typing-advanced 4s steps(50, end), blink-caret-advanced 0.75s step-end infinite;
}

@keyframes typing-advanced {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret-advanced {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--second);
    }
}

/* Estilos avanzados para libroteca */
#carouselExample {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(94, 23, 235, 0.1);
    animation: fadeInUp 1s ease-out;
}

#carouselExample .carousel-item img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.95) contrast(1.05);
}

#carouselExample:hover .carousel-item img {
    transform: scale(1.05);
    filter: brightness(1.05) contrast(1.1);
}

/* Estilos avanzados para botones de libroteca */
main .btn-green {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(46, 249, 160, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

main .btn-green::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

main .btn-green:hover::before {
    left: 100%;
}

main .btn-green:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(46, 249, 160, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

main .btn-green:active {
    transform: translateY(-2px) scale(1.02);
}

/* Estilos avanzados para título de libroteca */
main h2.txt-green {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    background: var(--second-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 4px 20px rgba(46, 249, 160, 0.3);
    letter-spacing: -1px;
    position: relative;
}

main h2.txt-green::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: var(--second-gradient);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(46, 249, 160, 0.4);
    animation: expandWidth 1s ease-out 0.5s both;
}

/* Preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

