/* Animaciones globales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 15px 40px rgba(255, 165, 0, 0.4);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estilos base mejorados */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    animation: fadeIn 0.8s ease-out;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: clamp(1.8em, 4vw, 2.5em);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #1a1a1a;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    display: inline-block;
    width: 100%;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, #ff9500, #4a90e2);
    border-radius: 3px;
    animation: scaleIn 0.8s ease-out 0.3s both;
}

.intro-text {
    text-align: center;
    max-width: 900px;
    margin: 40px auto 60px;
    font-size: clamp(0.95em, 2vw, 1.05em);
    line-height: 1.9;
    color: #444;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    background: rgba(255, 255, 255, 0.7);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.intro-text .highlight-orange {
    color: #ff9500;
    font-weight: bold;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.intro-text .highlight-orange::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff9500;
    transition: width 0.3s ease;
}

.intro-text .highlight-orange:hover::after {
    width: 100%;
}

.intro-text .highlight-orange:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 10px rgba(255, 149, 0, 0.3);
}

.intro-text .highlight-blue {
    color: #4a90e2;
    font-weight: bold;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.intro-text .highlight-blue::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4a90e2;
    transition: width 0.3s ease;
}

.intro-text .highlight-blue:hover::after {
    width: 100%;
}

.intro-text .highlight-blue:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

/* Sección de videos mejorada */
.videos-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    margin-bottom: 100px;
}

/* Testimonios destacados mejorados */
.featured-testimonial {
    display: flex;
    width: 100%;
    max-width: 900px;
    height: 650px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    background-color: #1a1a1a;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out both;
    position: relative;
}

.featured-testimonial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 149, 0, 0.1), rgba(74, 144, 226, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.featured-testimonial:hover::before {
    opacity: 1;
}

.featured-testimonial:hover {
    transform: translateY(-15px) scale(1.01);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.featured-testimonial.reverse {
    flex-direction: row-reverse;
    animation-delay: 0.3s;
}

.featured-testimonial.orange-info .info-wrapper {
    background: linear-gradient(135deg, #ffb84d 0%, #ffa726 100%);
}

.featured-testimonial.orange-info .info-wrapper .video-header h2,
.featured-testimonial.orange-info .info-wrapper .video-header h3,
.featured-testimonial.orange-info .info-wrapper .company-logo {
    color: #1a1a1a;
}

.video-wrapper {
    flex: 0 0 60%;
    position: relative;
    min-width: 0;
    overflow: hidden;
    z-index: 1;
}

.featured-testimonial .video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.95);
}

.featured-testimonial:hover .video-player {
    transform: scale(1.1);
    filter: brightness(1);
}

.info-wrapper {
    flex: 0 0 40%;
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #1a1a1a;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.info-wrapper::before {
    content: '';
    position: absolute;
    top: -100%;
    right: -100%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.7s ease;
}

.featured-testimonial:hover .info-wrapper::before {
    opacity: 1;
    top: -50%;
    right: -50%;
}

.info-wrapper::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.6s ease;
}

.featured-testimonial:hover .info-wrapper::after {
    transform: scale(2);
}

.info-wrapper .video-header {
    position: relative;
    z-index: 1;
}

.info-wrapper .video-header h2 {
    font-size: clamp(2.5em, 6vw, 4em);
    margin: 0;
    line-height: 1;
    transition: all 0.4s ease;
    font-weight: 900;
    letter-spacing: -1px;
}

.featured-testimonial:hover .info-wrapper .video-header h2 {
    transform: translateX(10px);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
}

.info-wrapper .video-header h3 {
    font-size: clamp(1.5em, 4vw, 2.5em);
    margin: 5px 0 0 0;
    font-weight: 400;
    transition: all 0.4s ease 0.1s;
    letter-spacing: 1px;
}

.featured-testimonial:hover .info-wrapper .video-header h3 {
    transform: translateX(10px);
    opacity: 0.9;
}

.info-wrapper .company-logo {
    position: relative;
    margin-top: 40px;
    font-size: clamp(1.2em, 2.5vw, 1.5em);
    font-weight: bold;
    color: #1a1a1a;
    transition: all 0.4s ease 0.2s;
    z-index: 1;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.featured-testimonial:hover .info-wrapper .company-logo {
    transform: scale(1.1) translateY(-5px);
    background: rgba(255, 255, 255, 0.5);
}

.company-logo.transunion {
    color: #00a0df;
}

.company-logo.cifin {
    color: #0066cc;
}

/* Controles superpuestos mejorados */
.video-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-wrapper:hover .video-controls-overlay {
    opacity: 1;
    transform: translateY(0);
}

.video-controls-overlay .progress-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: height 0.2s ease;
}

.video-controls-overlay .progress-bar:hover {
    height: 7px;
}

.video-controls-overlay .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 3px;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.video-controls-overlay .progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #FFD700;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.video-controls-overlay .progress-bar:hover .progress-fill::after {
    opacity: 1;
}

.video-controls-overlay .time-stamps {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-controls-overlay .video-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 0;
}

.video-controls-overlay .control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

.video-controls-overlay .control-btn:hover::before {
    width: 100%;
    height: 100%;
}

.video-controls-overlay .control-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
    transform: scale(1.2);
}

.video-controls-overlay .control-btn:active {
    transform: scale(0.95);
}

.video-controls-overlay .control-btn.play-pause-btn {
    width: 55px;
    height: 55px;
    border-width: 3px;
}

.video-controls-overlay .control-btn svg {
    fill: white;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.video-controls-overlay .control-btn:hover svg {
    transform: scale(1.1);
}

/* Sección de testimonios mejorada */
.testimonials-section {
    margin-top: 100px;
    animation: fadeIn 1s ease-out;
    position: relative;
}

.testimonials-title {
    font-size: clamp(1.5em, 3vw, 2em);
    text-align: center;
    margin-bottom: 50px;
    color: #1a1a1a;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
}

.testimonials-title span {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px 30px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.chat-icon {
    font-size: 1.5em;
    animation: pulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
}

.testimonials-title:hover .chat-icon {
    animation: none;
    transform: rotate(360deg) scale(1.3);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    max-width: 1100px;
    margin: 0 auto;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff9500, #4a90e2);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover::before {
    left: 0;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.testimonial-card:hover::after {
    opacity: 1;
}

.testimonial-card:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.avatar {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.3em;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.avatar::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid #667eea;
    transform: scale(1);
    opacity: 0;
    transition: all 0.5s ease;
}

.testimonial-card:hover .avatar {
    transform: rotate(360deg) scale(1.15);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.testimonial-card:hover .avatar::after {
    transform: scale(1.3);
    opacity: 1;
}

.testimonial-header strong {
    color: #1a1a1a;
    font-size: 1.05em;
    transition: color 0.3s ease;
}

.testimonial-card:hover .testimonial-header strong {
    color: #667eea;
}

.testimonial-text {
    font-size: 0.95em;
    line-height: 1.7;
    color: #555;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.testimonial-card:hover .testimonial-text {
    color: #1a1a1a;
}

.testimonial-time {
    text-align: right;
    font-size: 0.85em;
    color: #999;
    margin-top: 15px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.testimonial-card:hover .testimonial-time {
    color: #667eea;
    font-weight: 500;
}

/* Responsive mejorado */
@media (max-width: 920px) {
    .featured-testimonial {
        flex-direction: column;
        height: auto;
        max-width: 500px;
    }

    .featured-testimonial.reverse {
        flex-direction: column;
    }

    .video-wrapper, .info-wrapper {
        flex: 1 1 100%;
        width: 100%;
    }

    .video-wrapper {
        height: 400px;
    }

    .info-wrapper {
        text-align: center;
        align-items: center;
        padding: 40px 30px;
    }

    .info-wrapper .video-header h2 {
        font-size: 3em;
    }

    .info-wrapper .video-header h3 {
        font-size: 2em;
    }

    .info-wrapper .company-logo {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 40px 15px;
    }

    h1 {
        font-size: 1.6em;
        margin-bottom: 30px;
    }

    .intro-text {
        padding: 20px;
        margin: 30px auto 50px;
    }

    .videos-section {
        gap: 40px;
        margin-bottom: 60px;
    }

    .featured-testimonial {
        height: auto;
    }

    .video-wrapper {
        height: 350px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .info-wrapper .video-header h2 {
        font-size: 2.5em;
    }

    .info-wrapper .video-header h3 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .video-wrapper {
        height: 300px;
    }

    .video-controls-overlay .control-btn {
        width: 40px;
        height: 40px;
    }

    .video-controls-overlay .control-btn.play-pause-btn {
        width: 50px;
        height: 50px;
    }

    .avatar {
        width: 50px;
        height: 50px;
        font-size: 1.1em;
    }
}

/* Efectos adicionales de interacción */
@media (hover: hover) {
    .featured-testimonial:nth-child(odd) {
        animation: float 8s ease-in-out infinite;
    }

    .featured-testimonial:nth-child(even) {
        animation: float 8s ease-in-out 4s infinite;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Mejora de accesibilidad */
.control-btn:focus,
.progress-bar:focus {
    outline: 3px solid #4a90e2;
    outline-offset: 3px;
}

button {
    outline: none;
}

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