/* ARREGLO DEL REFLEJO CORTE MITAD */
@keyframes globalMove {
    0% { transform: translateX(-150%) skewX(-25deg); }
    30% { transform: translateX(200%) skewX(-25deg); }
    100% { transform: translateX(200%) skewX(-25deg); }
}

.global-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    z-index: 2;
    pointer-events: none; /* No molesta al hacer clic */
    animation: globalMove 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* Brillo individual para botones */
@keyframes btnShine {
    0% { left: -100%; }
    20%, 100% { left: 120%; }
}

.btn-shine::after, .btn-main::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg); animation: btnShine 4s infinite;
}

/* Vibración Urgencias */
@keyframes shakePhone {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50% { transform: rotate(-15deg); }
    20%, 40%, 60% { transform: rotate(15deg); }
}
.btn-phone i { animation: shakePhone 3s infinite; }

/* Entrada de texto */
.reveal {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animación de aparición para las stats */
.stat-item.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-item.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Animación de entrada para los valores (Por qué Fonsacal) */
.feature-item.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Retraso en cascada para que no salgan todos a la vez */
.feature-item:nth-child(1) { transition-delay: 0.1s; }
.feature-item:nth-child(2) { transition-delay: 0.3s; }
.feature-item:nth-child(3) { transition-delay: 0.5s; }

/* Efecto de pulso en el icono al hacer hover */
@keyframes iconPulse {
    0% { box-shadow: 0 0 0 0 rgba(29, 63, 133, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(29, 63, 133, 0); }
    100% { box-shadow: 0 0 0 0 rgba(29, 63, 133, 0); }
}

.feature-item:hover .feature-icon {
    animation: iconPulse 1.5s infinite;
    background: var(--accent);
    color: white;
}

/* EFECTO HOVER NAVEGACIÓN */
.footer-links a:hover {
    color: var(--white);
    transform: translateX(8px);
}

/* EFECTO HOVER CONTACTO PROFESIONAL */
.footer-contact p {
    transition: all 0.3s ease;
}

.footer-contact p:hover {
    color: var(--white);
    transform: scale(1.02);
}

.footer-contact p:hover i {
    transform: scale(1.2);
    color: var(--white);
    text-shadow: 0 0 10px var(--accent);
}

/* REVELACIÓN POR SCROLL */
.main-footer .container {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.main-footer.visible .container {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RSW STUDIO - ANIMATION ENGINE
   ========================================================================== */

/* Estado inicial de los elementos con clase .reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

/* Estado cuando el elemento entra en pantalla */
.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Delays escalonados para que las tarjetas no salgan a la vez */
.specialties-grid .specialty-card:nth-child(1) { transition-delay: 0.1s; }
.specialties-grid .specialty-card:nth-child(2) { transition-delay: 0.3s; }
.specialties-grid .specialty-card:nth-child(3) { transition-delay: 0.5s; }
.specialties-grid .specialty-card:nth-child(4) { transition-delay: 0.7s; }

/* Efecto de Brillo de Ingeniería (Hover) */
.specialty-card {
    position: relative;
    overflow: hidden;
}

.specialty-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(227,30,36,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.specialty-card:hover::after {
    opacity: 1;
}

/* Animación para el Badge de Experiencia */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.experience-badge {
    animation: float 4s ease-in-out infinite;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}



/* Revelado escalonado para los pasos */
.process-step:nth-child(1) { transition-delay: 0.2s; }
.process-step:nth-child(2) { transition-delay: 0.4s; }
.process-step:nth-child(3) { transition-delay: 0.6s; }

.reveal-left.active, .reveal-right.active, .reveal-up.active {
    opacity: 1; transform: translate(0);
}

.reveal-left { opacity: 0; transform: translateX(-40px); transition: 1.2s ease; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: 1.2s ease; }
.reveal-up { opacity: 0; transform: translateY(40px); transition: 1.2s ease; }

.active { opacity: 1 !important; transform: translate(0) !important; }

.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s ease-out;
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* ANIMACIONES DE ENTRADA */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.reveal-top { animation: fadeInUp 0.8s ease forwards; }
.reveal-left { animation: fadeInLeft 0.8s ease 0.2s forwards; opacity: 0; }
.reveal-right { animation: fadeInUp 0.8s ease 0.4s forwards; opacity: 0; }

/* TRANSICIÓN ENTRE PASOS */
.step-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateX(20px);
}

.step-pane.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* EFECTOS DE TARJETAS (image_7de031.png style) */
.s-box {
    border: 2px solid #f1f5f9;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.s-option input { display: none; }

.s-option input:checked + .s-box {
    border-color: #e31e24; /* Color Accent [cite: 2026-01-22] */
    background: #fffafa;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(227, 30, 36, 0.1);
}

.s-box i { font-size: 2rem; color: #1d3f85; margin-bottom: 10px; display: block; }

/* BOTÓN PULSANTE */
.btn-rsw-prim:hover i {
    animation: bounceRight 0.6s infinite;
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Transición de Paneles */
.step-pane {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.step-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Feedback al hacer click en botón */
.btn-rsw-prim:active {
    transform: scale(0.98);
}

/* Efecto hover en opciones */
.s-box:hover {
    transform: translateY(-3px);
    border-color: #1d3f85;
}