/* Variables de tema */
:root {
    --primary: #2a5a80;
    --secondary: #e9b44c;
    --accent: #f39c12;
    --text-dark: #333;
    --text-light: #f8f9fa;
    --card-bg-light: #ffffff;
    --card-bg-dark: #2d2d2d;
    --dark-bg: #121212;
    --accent-green: #3cb043;
}

/* Estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
    background-color: #121212;
    color: var(--text-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    padding-top: 20px;
    color: var(--primary);
    position: relative;
}

body.dark .section-title {
    color: #6ba8e9;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary);
    margin: 15px auto 30px;
    border-radius: 2px;
}

/* Sección ¿Cómo funciona? - Mejorada */
.how-it-works {

    padding: 2.5rem 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 10px;
}

body.dark .how-it-works {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.step {
    background: var(--card-bg-light);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: var(--text-dark);
    /* Línea amarilla debajo del título en versión móvil */
    border-bottom: 3px solid var(--primary);
}

body.dark .step {
    background: #2e2e2e !important;
    border-color: #3a3a3a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    color: var(--text-light);
    border-bottom-color: #4a8bc9;
}

.step:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

body.dark .step:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.step.highlight {
    background: linear-gradient(135deg, #1a4a72, #2c6aa0);
    color: white;
    border-bottom-color: #3cb043;
}

body.dark .step.highlight {
    background: linear-gradient(135deg, #0f2d47, #1a4a72);
    border-bottom-color: #2e9a31;
}

.step.highlight .step-number {
    margin-top: 6px;
    margin-right: 2px;
    background: white;
    color: var(--primary);
}

body.dark .step.highlight .step-number {
    background: var(--accent-green);
    color: white;
}

.step-number {
    position: absolute;
    top: -12px;
    right: -14px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

body.dark .step-number {
    background: #4a8bc9;
}

.step-content h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
    color: var(--primary);
    padding-bottom: 10px;
    position: relative;
    /* Línea decorativa debajo del título */
    display: inline-block;
}

/* Línea amarilla debajo del título en desktop */
.step-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

body.dark .step-content {
    background: #2e2e2e;
}

body.dark .step-content h3 {
    color: #6ba8e9;
}

.step-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 10px;
}

/* Animaciones */
.step {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botón de modo oscuro */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

body.dark .theme-toggle {
    background-color: #2d2d2d;
    color: #f0f0f0;
    border-color: #444;
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Responsive - Versión desktop */
@media (min-width: 769px) {
    .step {
        border-bottom: none;
        border-left: 3px solid var(--primary);
    }
    
    body.dark .step {
        border-left-color: #4a8bc9;
        border-bottom: none;
    }
    
    .step.highlight {
        border-left-color: #3cb043;
    }
    
    body.dark .step.highlight {
        border-left-color: #2e9a31;
    }
    
    .step-content h3::after {
        display: none;
    }
}

/* Mejoras de responsive para móviles */
@media (max-width: 768px) {
    .how-it-works {
        padding: 1.5rem 0.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }
    
    .step {
        padding: 18px 15px;
        margin-bottom: 5px;
    }
    
    .step-number {
        width: 42px;
        height: 42px;
        top: -11px;
        right: -14px;
        font-size: 1.3rem;
    }
    
    .step-content h3 {
        font-size: 1.15rem;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }
    
    .step-content p {
        font-size: 0.9rem;
        line-height: 1.45;
    }
    
    .step:hover {
        transform: none; /* Desactiva hover en móviles */
    }
}

@media (max-width: 480px) {
    .how-it-works {
        padding: 1.2rem 0.5rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .step {
        padding: 15px 12px;
    }

    .step-content h3 {
        margin-bottom: 12px;
        font-size: 1.05rem;
        color: var(--primary);
    }
}



/* Añadir al final del archivo */
body.dark .step {
    background: #2e2e2e !important;
    border-color: #3a3a3a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    color: #e0e0e0;
    border-bottom: 3px solid #3a3a3a;
}

body.dark .step.highlight {
    background: linear-gradient(135deg, #0f2d47, #1a4a72) !important;
    border-bottom-color: #2e9a31;
}

body.dark .step-content h3 {
    color: #6ba8e9;
}

body.dark .step-number {
    background: #4a8bc9;
}


























body.dark-mode .step {
    background: #2e2e2e !important;
    border-color: #3a3a3a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    color: #e0e0e0;
    border-bottom: 3px solid #3a3a3a;
}

body.dark-mode .step.highlight {
    background: linear-gradient(135deg, #0f2d47, #1a4a72) !important;
    border-bottom-color: #2e9a31;
}

body.dark-mode .step-content h3 {
    color: #6ba8e9;
}

body.dark-mode .step-number {
    background: #4a8bc9;
}