/* ============================================
   WHY US INTERACTIVE - Diseño Creativo e Interactivo
   ============================================ */

/* Sección Principal */
.why-us-interactive {
    padding: 100px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

/* Patrón de fondo animado */
.why-us-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: floatPattern 20s ease-in-out infinite;
}

@keyframes floatPattern {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(1deg); }
    66% { transform: translate(20px, -10px) rotate(-1deg); }
}

/* Header de la sección */
.why-us-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.why-us-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.title-line {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin-bottom: 10px;
}

.title-highlight {
    display: block;
    color: #fff;
    font-weight: 700;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.title-highlight::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #fff, #ffd700);
    border-radius: 2px;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.8; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 1; transform: translateX(-50%) scaleX(1.2); }
}

.why-us-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-top: 20px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Container de Cards */
.trust-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

@media (max-width: 1200px) {
    .trust-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Trust Cards */
.trust-card {
    perspective: 1000px;
    height: 320px;
    cursor: pointer;
    animation: fadeInUp 0.6s ease both;
}

.trust-card:nth-child(1) { animation-delay: 0.1s; }
.trust-card:nth-child(2) { animation-delay: 0.2s; }
.trust-card:nth-child(3) { animation-delay: 0.3s; }
.trust-card:nth-child(4) { animation-delay: 0.4s; }

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.trust-card.flipped .card-inner {
    transform: rotateY(180deg);
}

/* Card Faces */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.card-front {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.card-back {
    background: linear-gradient(145deg, #4a5568, #2d3748);
    color: white;
    transform: rotateY(180deg);
}

/* Card Number */
.card-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(102, 126, 234, 0.1);
    line-height: 1;
}

/* Card Icon */
.card-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.card-icon-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 8s ease-in-out infinite;
    opacity: 0.1;
}

@keyframes morphing {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    50% { border-radius: 30% 70% 70% 30% / 70% 30% 30% 70%; }
    75% { border-radius: 70% 30% 30% 70% / 30% 70% 70% 30%; }
}

.card-icon {
    position: relative;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 2;
    color: #667eea;
    font-weight: bold;
}

/* Card Content */
.card-title {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
    max-width: 200px;
}

.card-hint {
    font-size: 0.9rem;
    color: #667eea;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    position: absolute;
    bottom: 30px;
    font-weight: 600;
}

.trust-card:hover .card-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Card Back Content */
.card-back h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #ffd700;
    line-height: 1.2;
}

.card-back p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.95);
    max-width: 250px;
}

.card-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

/* Hover Effects */
.trust-card:hover .card-inner {
    transform: translateY(-10px);
}

.trust-card:hover .card-front {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

/* Progress Indicator */
.trust-progress {
    margin-top: 60px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.progress-bar {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0 auto 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #fff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.progress-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.cards-revealed {
    color: #ffd700;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Stats Section */
.stats-section {
    background: #f8f9fa;
    padding: 60px 0;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .trust-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-title {
        max-width: 100%;
    }
    
    .trust-card {
        height: 320px;
    }
    
    .why-us-title {
        font-size: 2rem;
    }
    
    .card-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    .progress-bar {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .why-us-interactive {
        padding: 60px 0;
    }
    
    .trust-card {
        height: 300px;
    }
    
    .card-front,
    .card-back {
        padding: 20px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .card-back h4 {
        font-size: 1.5rem;
    }
    
    .card-back p {
        font-size: 0.9rem;
    }
}