/* =============================================================
   Estilos del home (extraídos de Views/Home/Index.cshtml)
   Se carga desde la sección Styles, antes de components.css,
   para conservar exactamente el mismo orden de cascada.
   ============================================================= */

/* ============================================
   HERO SECTION MODERN - Gradient Animado
   ============================================ */
.hero-section-modern {
    min-height: 100vh;
    position: relative;
    padding: 100px 0 60px;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.animated-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 35, 48, 0.85) 0%, rgba(0, 188, 212, 0.4) 35%, rgba(41, 98, 255, 0.35) 70%, rgba(0, 230, 118, 0.3) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
    will-change: background-position;
}

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

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    25% { transform: translateY(-100px) translateX(50px) scale(1.1); }
    50% { transform: translateY(-50px) translateX(-50px) scale(0.9); }
    75% { transform: translateY(-150px) translateX(30px) scale(1.05); }
}

.badge-pill-modern {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title-modern {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #f7c725 50%, #00BCD4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.gradient-text-light {
    background: linear-gradient(135deg, #ffffff 0%, #f7c725 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.hero-subtitle-modern {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
}

.btn-modern-primary {
    background: var(--km-gradient-action);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.4);
}

.btn-modern-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 188, 212, 0.6);
    color: white;
}

.btn-modern-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-modern-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    color: white;
}

.hero-stats-modern {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card-modern {
    flex: 1;
    min-width: 150px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card-modern:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.stat-card-modern .stat-icon {
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
}

.stat-card-modern h3 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 5px;
}

.stat-card-modern p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
}

.glass-effect {
    background: rgba(18, 45, 60, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 188, 212, 0.3);
    color: var(--km-text-primary) !important;
}

.glass-effect * {
    color: var(--km-text-primary) !important;
}

.glass-effect p {
    color: var(--km-text-secondary) !important;
}

/* Hero Image Container con Cards Flotantes */
.hero-image-container {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: floatCard 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 40%;
    right: 10%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 15%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.hero-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.2) 0%, rgba(41, 98, 255, 0.2) 100%);
    backdrop-filter: blur(30px);
    animation: pulse 4s ease-in-out infinite;
}

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

.wave-separator {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 2;
}

.wave-separator svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================
   PROBLEM/SOLUTION SECTION
   ============================================ */
.problem-solution-modern {
    padding: 80px 0;
    background: linear-gradient(180deg, #0A2330 0%, #122D3C 100%);
}

.badge-section-modern {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: rgba(0, 188, 212, 0.15);
    color: var(--km-accent-cyan);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(0, 188, 212, 0.3);
}

.section-title-modern {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #FFFFFF;
}

.section-subtitle-modern {
    font-size: 1.2rem;
    color: #B0C4CE;
}

.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.problem-card-modern,
.solution-card-modern {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.problem-card-modern:hover,
.solution-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.card-header-modern {
    padding: 30px;
    text-align: center;
    color: white;
}

.card-header-modern p {
    margin: 0;
    font-size: 0.95rem;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bg-gradient-primary {
    background: var(--km-gradient-action);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.card-header-modern h3 {
    margin: 15px 0 0 0;
    font-weight: 700;
    font-size: 1.5rem;
}

.card-body-modern {
    padding: 30px;
    background: rgba(10, 35, 48, 0.6);
    backdrop-filter: blur(10px);
}

.challenge-item,
.solution-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.challenge-icon,
.solution-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(0, 188, 212, 0.1);
    border: 1px solid rgba(0, 188, 212, 0.2);
}

.challenge-content h5,
.solution-content h5 {
    margin-bottom: 8px;
    font-weight: 700;
    color: #FFFFFF;
}

.challenge-content p,
.solution-content p {
    color: #B0C4CE;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.challenge-stat,
.solution-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 188, 212, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    border: 1px solid rgba(0, 188, 212, 0.2);
}

.challenge-stat i {
    color: #ff6b6b;
    font-size: 0.9rem;
}

.solution-stat i {
    color: var(--km-accent-cyan);
    font-size: 0.9rem;
}

.challenge-stat span,
.solution-stat span {
    color: #B0C4CE;
}

/* Estadísticas Comparativas */
.comparison-stats-modern {
    margin-top: 50px;
}

.comparison-stat-card {
    padding: 30px 20px;
    border-radius: 20px;
    background: rgba(18, 45, 60, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 188, 212, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.comparison-stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 188, 212, 0.2);
    border-color: var(--km-accent-cyan);
}

.stat-icon-compare {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--km-gradient-action);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.comparison-stat-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--km-accent-cyan);
    margin: 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.comparison-stat-card p {
    color: #B0C4CE;
    font-size: 0.85rem;
    margin: 10px 0;
    font-weight: 500;
    line-height: 1.4;
}

.stat-vs {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 188, 212, 0.1);
    color: var(--km-accent-cyan);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 8px;
}

/* Responsive para móvil */
@media (max-width: 767px) {
    .comparison-stat-card {
        padding: 20px 15px;
    }
    
    .comparison-stat-card h3 {
        font-size: 1.2rem;
        margin: 8px 0;
    }
    
    .comparison-stat-card p {
        font-size: 0.8rem;
        margin: 8px 0;
    }
    
    .stat-icon-compare {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .stat-vs {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
}

/* Garantías */
.guarantees-section {
    margin-top: 50px;
}

.guarantee-card {
    padding: 30px;
    border-radius: 20px;
    background: rgba(18, 45, 60, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 188, 212, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.guarantee-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 188, 212, 0.2);
    border-color: var(--km-accent-cyan);
}

.guarantee-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.15) 0%, rgba(41, 98, 255, 0.15) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--km-accent-cyan);
}

.guarantee-card h5 {
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 15px;
}

.guarantee-card p {
    color: #B0C4CE;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   TIMELINE SECTION (How It Works)
   ============================================ */
.how-it-works-modern {
    background: linear-gradient(180deg, #0A2330 0%, #122D3C 100%);
}

.bg-gradient-soft {
    background: linear-gradient(180deg, #0A2330 0%, #122D3C 100%);
}

/* ============================================
   TABS PARA CLIENTE/MAESTRO
   ============================================ */
.user-type-tabs {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

.user-type-tabs .tab-btn {
    flex: 0 1 280px;
    padding: 24px 30px;
    background: rgba(18, 45, 60, 0.6);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(0, 188, 212, 0.2);
    border-radius: 20px;
    color: #B0C4CE;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.user-type-tabs .tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--km-gradient-action);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-type-tabs .tab-btn span,
.user-type-tabs .tab-btn small,
.user-type-tabs .tab-btn i {
    position: relative;
    z-index: 1;
}

.user-type-tabs .tab-btn small {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
    font-weight: 500;
}

.user-type-tabs .tab-btn:hover {
    border-color: var(--km-accent-cyan);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.2);
}

.user-type-tabs .tab-btn.active {
    background: rgba(0, 188, 212, 0.15);
    border-color: var(--km-accent-cyan);
    color: #FFFFFF;
    box-shadow: 0 10px 40px rgba(0, 188, 212, 0.3);
}

.user-type-tabs .tab-btn.active::before {
    opacity: 0.1;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .user-type-tabs {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-type-tabs .tab-btn {
        flex: 1 1 auto;
        padding: 20px;
        font-size: 1rem;
    }
}

.timeline-modern {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline-modern::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--km-accent-cyan) 0%, var(--km-accent-blue) 100%);
}

.timeline-item {
    display: flex;
    gap: 30px;
    margin-bottom: 60px;
    position: relative;
}

.timeline-dot {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-dot-inner {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.3);
}

.timeline-content {
    flex: 1;
    padding: 30px;
    border-radius: 20px;
    background: rgba(18, 45, 60, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 188, 212, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 12px 40px rgba(0, 188, 212, 0.2);
    border-color: var(--km-accent-cyan);
}

.timeline-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--km-gradient-action);
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.timeline-content h4 {
    font-weight: 800;
    color: #FFFFFF;
}

.timeline-content p {
    color: #B0C4CE;
    line-height: 1.8;
}

.timeline-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0, 188, 212, 0.15);
    color: var(--km-accent-cyan);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 188, 212, 0.3);
}

/* ============================================
   TESTIMONIALS MODERN
   ============================================ */
.testimonials-modern {
    background: white;
}

.testimonial-card-modern {
    padding: 30px;
    border-radius: 20px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.testimonial-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.testimonial-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.testimonial-info h6 {
    font-weight: 700;
    color: #2d3748;
}

.testimonial-rating {
    display: flex;
    gap: 4px;
}

.testimonial-text {
    color: #718096;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.testimonial-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
}

.carousel-control-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
}

/* ============================================
   CTA FINAL MODERN
   ============================================ */
.cta-final-modern {
    position: relative;
    padding: 80px 0;
}

.cta-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 35, 48, 0.8) 0%, rgba(0, 188, 212, 0.4) 50%, rgba(0, 230, 118, 0.3) 100%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

.cta-content-modern h2 {
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cta-stats-modern {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-stat-item {
    text-align: center;
}

.cta-stat-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-stat-item h4 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 5px;
}

.cta-stat-item p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.counter {
    animation: countUp 0.5s ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .timeline-modern::before {
        left: 35px;
    }
    
    .timeline-dot-inner {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-stats-modern {
        flex-direction: column;
    }
    
    .stat-card-modern {
        min-width: 100%;
    }
    
    .hero-image-container {
        height: 300px;
        margin-top: 40px;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 20px;
    }
    
    .timeline-modern::before {
        display: none;
    }
}
