/* SEPARATOR SECTION - VERSIÓN ANIMADA */

/* Contenedor Principal */
.gr-separator-section {
    width: 100%;
    position: relative;
    padding: 5rem 0;
    margin: 3rem 0;
    background: url('/public/images/separator/separator1.png') center/cover no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

.gr-separator-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.gr-separator-section.in-view .gr-separator-overlay {
    opacity: 1;
}

.gr-separator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
    transform: translateY(30px);
    opacity: 0;
    transition: all 1s cubic-bezier(0.215, 0.61, 0.355, 1) 0.3s;
}

.gr-separator-section.in-view .gr-separator-container {
    transform: translateY(0);
    opacity: 1;
}

/* Estadísticas */
.gr-separator-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.gr-separator-stat-item {
    text-align: center;
    padding: 2rem 1.5rem;
    transition: all 0.6s ease;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
}

.gr-separator-section.in-view .gr-separator-stat-item {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.gr-separator-stat-item:nth-child(1) {
    transition-delay: 0.4s;
}
.gr-separator-stat-item:nth-child(2) {
    transition-delay: 0.6s;
}
.gr-separator-stat-item:nth-child(3) {
    transition-delay: 0.8s;
}
.gr-separator-stat-item:nth-child(4) {
    transition-delay: 1s;
}

.gr-separator-stat-item:hover {
    transform: translateY(-5px) scale(1.05) !important;
    background-color: rgba(119, 81, 154, 0.3);
    border-color: rgba(119, 81, 154, 0.5);
}

.gr-separator-stat-number {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.gr-separator-stat-item:hover .gr-separator-stat-number {
    color: #b38fd6;
    text-shadow: 0 0 10px rgba(179, 143, 214, 0.5);
}

.gr-separator-stat-text {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
}

.gr-separator-stat-item:hover .gr-separator-stat-text {
    color: white;
    letter-spacing: 1px;
}

/* Efecto de iluminación mejorado */
.gr-separator-stat-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(119, 81, 154, 0.8), 
        rgba(255, 255, 255, 0.5), 
        rgba(119, 81, 154, 0.8));
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(0.95);
}

.gr-separator-stat-item:hover::before {
    opacity: 0.6;
    transform: scale(1);
    animation: gradientBorder 3s ease infinite;
}

@keyframes gradientBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Efecto de partículas flotantes */
.gr-separator-stat-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="30" cy="80" r="1" fill="white" opacity="0.1"/><circle cx="70" cy="90" r="1" fill="white" opacity="0.1"/></svg>');
    background-size: 50px 50px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.gr-separator-stat-item:hover::after {
    opacity: 0.3;
}

/* Efecto de conteo para los números */
@keyframes countUp {
    from {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gr-separator-section.in-view .gr-separator-stat-number {
    animation: countUp 1s ease-out forwards;
}

.gr-separator-section.in-view .gr-separator-stat-item:nth-child(1) .gr-separator-stat-number {
    animation-delay: 0.4s;
}
.gr-separator-section.in-view .gr-separator-stat-item:nth-child(2) .gr-separator-stat-number {
    animation-delay: 0.6s;
}
.gr-separator-section.in-view .gr-separator-stat-item:nth-child(3) .gr-separator-stat-number {
    animation-delay: 0.8s;
}
.gr-separator-section.in-view .gr-separator-stat-item:nth-child(4) .gr-separator-stat-number {
    animation-delay: 1s;
}

/* Responsive */
@media (max-width: 992px) {
    .gr-separator-section {
        padding: 4rem 0;
        background-attachment: scroll;
    }
    
    .gr-separator-stats {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .gr-separator-section {
        padding: 3.5rem 0;
    }
    
    .gr-separator-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gr-separator-stat-item {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .gr-separator-section {
        padding: 3rem 0;
    }
    
    .gr-separator-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gr-separator-stat-item {
        padding: 1.5rem;
    }
    
    .gr-separator-stat-item::before {
        display: none; /* Mejor rendimiento en móviles */
    }
}