﻿/* ===================
   DEMO PAGE STYLES
=================== */

/* Variables específicas para demo */
:root {
    --demo-primary: #667eea;
    --demo-secondary: #764ba2;
    --demo-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --demo-success: #10b981;
    --demo-warning: #f59e0b;
    --demo-info: #3b82f6;
    --demo-border-radius: 20px;
    --demo-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    --demo-glass: rgba(255, 255, 255, 0.1);
}

/* ===================
   DEMO HERO SECTION
=================== */

.demo-hero-section {
    min-height: 80vh;
    background: var(--dark-bg);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 2rem;
}

.demo-hero-content {
    z-index: 10;
    position: relative;
}

.demo-hero-section .hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 800;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.demo-hero-section .badge {
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(10px);
}

.demo-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-medium);
    display: inline-block;
}

.demo-scroll-btn {
    animation: bounceArrow 2s infinite;
    transition: all 0.3s ease;
}

    .demo-scroll-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    }

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

/* ===================
   INSTRUCCIONES DE USO
=================== */

.demo-instructions {
    position: relative;
    z-index: 5;
}

.instruction-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

    .instruction-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--demo-gradient);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .instruction-card:hover {
        transform: translateY(-10px);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: var(--demo-shadow);
    }

        .instruction-card:hover::before {
            transform: scaleX(1);
        }

.instruction-icon {
    position: relative;
    width: 80px;
    height: 80px;
    background: var(--demo-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    transition: all 0.3s ease;
    overflow: hidden;
}

    .instruction-icon i {
        font-size: 1.5rem;
        color: white;
        z-index: 2;
        position: relative;
    }

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--demo-warning);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.instruction-card:hover .instruction-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.instruction-card h5 {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 1rem;
}

.instruction-card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.6;
}

/* ===================
   CONSEJOS DE DEMO
=================== */

.demo-tips {
    margin-top: 3rem;
}

.tips-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

    .tips-container h4 {
        color: #ffffff;
        font-weight: 600;
        margin-bottom: 2rem;
    }

.tip-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

    .tip-item:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
        transform: translateX(5px);
    }

    .tip-item i {
        font-size: 1.1rem;
        width: 20px;
        flex-shrink: 0;
    }

    .tip-item span {
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
        margin-left: 0.5rem;
    }

/* ===================
   DEMO INTERACTIVA - IFRAME
=================== */

.demo-interactive {
    position: relative;
    z-index: 10;
}

.demo-iframe-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.iframe-container {
    position: relative;
    width: 100%;
    background: var(--demo-gradient);
    padding: 25px;
    border-radius: var(--demo-border-radius);
    box-shadow: var(--demo-shadow);
    overflow: hidden;
}

/* Loader del iframe */
.iframe-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--demo-border-radius);
    z-index: 100;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid var(--demo-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-title {
    color: #333;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.loader-subtitle {
    color: #666;
    font-size: 14px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Header del iframe */
.iframe-header {
    background: var(--demo-glass);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    text-align: center;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .iframe-header h3 {
        margin: 0 0 10px 0;
        font-weight: 700;
        font-size: 1.5rem;
    }

    .iframe-header p {
        margin: 0;
        opacity: 0.9;
        font-size: 1rem;
    }

/* El iframe en sí */
.demo-iframe {
    width: 100%;
    height: 700px;
    border: none;
    border-radius: 0 0 15px 15px;
    background: white;
    display: block;
}

/* ===================
   INFORMACIÓN ADICIONAL
=================== */

.demo-info {
    margin-top: 3rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

    .info-card:hover {
        transform: translateY(-5px);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: var(--shadow-medium);
    }

    .info-card i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        display: block;
    }

    .info-card h5 {
        color: #ffffff;
        font-weight: 600;
        margin-bottom: 1rem;
    }

    .info-card p {
        color: rgba(255, 255, 255, 0.8);
        margin: 0;
        line-height: 1.6;
    }

/* ===================
   CASOS DE USO
=================== */

.demo-use-cases {
    position: relative;
    overflow: hidden;
}

.use-case-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

    .use-case-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--demo-gradient);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .use-case-card:hover {
        transform: translateY(-10px) scale(1.02);
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    }

        .use-case-card:hover::before {
            transform: scaleX(1);
        }

.case-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    transition: all 0.3s ease;
}

    .case-icon i {
        font-size: 2rem;
        color: #ffffff;
    }

.use-case-card:hover .case-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

.use-case-card h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.case-details {
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .detail-item:last-child {
        border-bottom: none;
    }

    .detail-item .label {
        color: rgba(255, 255, 255, 0.8);
        font-weight: 500;
    }

    .detail-item .value {
        color: #ffffff;
        font-weight: 600;
    }

.case-try-btn {
    transition: all 0.3s ease;
    border-width: 2px;
}

    .case-try-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: #ffffff;
        transform: translateY(-2px);
    }

/* ===================
   ESTADÍSTICAS DE DEMO
=================== */

.demo-stats-section {
    margin-top: 3rem;
}

.stats-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
}

    .stats-container h4 {
        color: #ffffff;
        font-weight: 600;
        margin-bottom: 2rem;
    }

.demo-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

    .demo-stat:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
    }

    .demo-stat .stat-number {
        font-size: 2.5rem;
        font-weight: 800;
        color: #ffffff;
        display: block;
        line-height: 1;
        margin-bottom: 0.5rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .demo-stat .stat-label {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.9rem;
        font-weight: 500;
    }

/* ===================
   FEEDBACK Y SIGUIENTES PASOS
=================== */

.demo-feedback {
    position: relative;
}

.feedback-highlights {
    margin-top: 2rem;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

    .highlight-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(10px);
        box-shadow: var(--shadow-medium);
    }

    .highlight-item i {
        font-size: 1.5rem;
        width: 50px;
        flex-shrink: 0;
    }

    .highlight-item strong {
        color: #ffffff;
        font-weight: 600;
        display: block;
        margin-bottom: 0.5rem;
    }

    .highlight-item p {
        margin: 0;
        line-height: 1.5;
    }

.next-steps-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    height: fit-content;
}

    .next-steps-card h4 {
        color: #ffffff;
        font-weight: 600;
        margin-bottom: 2rem;
    }

.step-option {
    margin-bottom: 1.5rem;
}

    .step-option h6 {
        color: #ffffff;
        font-weight: 600;
        margin-bottom: 0.75rem;
        font-size: 1rem;
    }

    .step-option p {
        color: rgba(255, 255, 255, 0.8);
        margin-bottom: 1rem;
        line-height: 1.5;
    }

    .step-option .btn {
        transition: all 0.3s ease;
    }

        .step-option .btn:hover {
            transform: translateY(-2px);
        }

.next-steps-card hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 1.5rem 0;
}

/* ===================
   RESPONSIVE DESIGN
=================== */

/* Tablets */
@media (max-width: 992px) {
    .demo-hero-section .hero-title {
        font-size: 3rem;
    }

    .iframe-container {
        padding: 20px;
    }

    .demo-iframe {
        height: 600px;
    }

    .instruction-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .demo-hero-section {
        min-height: 70vh;
        padding-top: 120px;
    }

        .demo-hero-section .hero-title {
            font-size: 2.5rem;
            line-height: 1.2;
        }

    .demo-stats {
        padding: 1rem;
        margin-bottom: 2rem;
    }

        .demo-stats .row {
            flex-direction: row;
            justify-content: center;
        }

        .demo-stats .col-auto {
            margin: 0 0.5rem;
        }

    .instruction-card {
        padding: 1.25rem;
        text-align: center;
    }

    .instruction-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

        .instruction-icon i {
            font-size: 1.25rem;
        }

    .tips-container {
        padding: 1.5rem;
    }

    .tip-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

        .tip-item i {
            margin-bottom: 0.5rem;
            font-size: 1.25rem;
        }

        .tip-item span {
            margin-left: 0;
        }

    /* Iframe en móvil */
    .iframe-container {
        padding: 15px;
        margin: 0 -0.5rem;
    }

    .demo-iframe {
        height: 500px;
    }

    .iframe-header {
        padding: 15px;
    }

        .iframe-header h3 {
            font-size: 1.25rem;
        }

        .iframe-header p {
            font-size: 0.9rem;
        }

    /* Casos de uso en móvil */
    .use-case-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .case-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

        .case-icon i {
            font-size: 1.5rem;
        }

    /* Estadísticas en móvil */
    .demo-stat .stat-number {
        font-size: 2rem;
    }

    .stats-container {
        padding: 1.5rem;
    }

    /* Feedback en móvil */
    .highlight-item {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

        .highlight-item i {
            margin-bottom: 1rem;
            width: auto;
        }

    .next-steps-card {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .step-option .btn {
        width: 100%;
    }
}

/* Móviles pequeños */
@media (max-width: 576px) {
    .demo-hero-section .hero-title {
        font-size: 2rem;
    }

    .demo-stats .col-auto {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .demo-stats .stat-number {
        font-size: 1.5rem;
    }

    .iframe-container {
        padding: 10px;
        margin: 0 -0.75rem;
    }

    .demo-iframe {
        height: 450px;
    }

    .instruction-card {
        padding: 1rem;
    }

    .instruction-icon {
        width: 50px;
        height: 50px;
    }

    .use-case-card {
        padding: 1.25rem;
    }

    .demo-stat .stat-number {
        font-size: 1.75rem;
    }

    .tips-container {
        padding: 1.25rem;
    }

    .next-steps-card {
        padding: 1.25rem;
    }
}

/* ===================
   OPTIMIZACIONES DE RENDIMIENTO
=================== */

.demo-iframe-wrapper,
.instruction-card,
.use-case-card,
.info-card {
    will-change: transform;
}

.loader-spinner {
    will-change: transform;
}

/* ===================
   EFECTOS ADICIONALES
=================== */

/* Efecto de brillo para el iframe container */
.iframe-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--demo-gradient);
    border-radius: var(--demo-border-radius);
    z-index: -1;
    opacity: 0.8;
    filter: blur(8px);
}

/* Animación de entrada para las estadísticas */
.demo-stat {
    opacity: 0;
    animation: statFadeIn 0.6s ease-out forwards;
}

    .demo-stat:nth-child(1) {
        animation-delay: 0.1s;
    }

    .demo-stat:nth-child(2) {
        animation-delay: 0.2s;
    }

    .demo-stat:nth-child(3) {
        animation-delay: 0.3s;
    }

    .demo-stat:nth-child(4) {
        animation-delay: 0.4s;
    }

@keyframes statFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de partículas de fondo sutil */
.demo-use-cases::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.demo-use-cases .container {
    position: relative;
    z-index: 1;
}

/* Indicador de scroll suave */
.demo-scroll-btn i {
    animation: arrowBounce 1.5s infinite;
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(5px);
    }

    60% {
        transform: translateY(3px);
    }
}
