/*
 * Ruta de Inercia - Horizontal Process Flow (Light Theme)
 * Based on Figma specifications
 */

/* ===== SECTION CONTAINER ===== */
.ruta-inercia-horizontal-figma {
    background: #FFFFFF;
    padding: 80px 0;
    position: relative;
}

.ruta-inercia-horizontal-figma-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== SECTION HEADER ===== */
.ruta-inercia-horizontal-figma-header {
    text-align: center;
    margin-bottom: 60px;
}

.ruta-inercia-horizontal-figma-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    color: #1A1A1A;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.ruta-inercia-horizontal-figma-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PROCESS FLOW CONTAINER ===== */
.process-flow-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    margin-top: 40px;
}

/* ===== PROCESS STEP CARD ===== */
.process-step-card {
    flex: 1;
    max-width: 240px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    border-color: #2B69C7;
}

/* Active/Current step styling */
.process-step-card.active {
    border: 2px solid #2B69C7;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FBFF 100%);
}

/* Completed step styling */
.process-step-card.completed .step-number {
    background: #22C55E;
}

.process-step-card.completed .step-number::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
    color: white;
}

.process-step-card.completed .step-number-text {
    opacity: 0;
}

/* ===== STEP NUMBER ===== */
.step-number {
    width: 48px;
    height: 48px;
    background: #2B69C7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    flex-shrink: 0;
}

.step-number-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
}

/* ===== STEP CONTENT ===== */
.step-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #1A1A1A;
    margin-bottom: 12px;
    text-align: center;
}

.step-description {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #6B7280;
    text-align: center;
    flex-grow: 1;
}

/* ===== STEP CONNECTORS ===== */
.step-connector {
    position: absolute;
    top: 56px; /* Align with step number center */
    right: -22px;
    width: 24px;
    height: 2px;
    background: #E5E7EB;
    z-index: 1;
}

.step-connector::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 8px solid #E5E7EB;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* Active connector styling */
.process-step-card.active .step-connector,
.process-step-card.completed .step-connector {
    background: #22D3EE;
}

.process-step-card.active .step-connector::after,
.process-step-card.completed .step-connector::after {
    border-left-color: #22D3EE;
}

/* Hide connector on last step */
.process-step-card:last-child .step-connector {
    display: none;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop */
@media (min-width: 1200px) {
    .ruta-inercia-horizontal-figma-container {
        padding: 0 40px;
    }
    
    .process-step-card {
        max-width: 260px;
        padding: 36px 28px;
    }
    
    .process-flow-container {
        gap: 30px;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .ruta-inercia-horizontal-figma-title {
        font-size: 32px;
    }
    
    .ruta-inercia-horizontal-figma-subtitle {
        font-size: 17px;
    }
    
    .process-step-card {
        max-width: 220px;
        padding: 28px 20px;
    }
}

/* Tablet */
@media (max-width: 1023px) {
    .ruta-inercia-horizontal-figma {
        padding: 60px 0;
    }
    
    .ruta-inercia-horizontal-figma-container {
        padding: 0 30px;
    }
    
    .ruta-inercia-horizontal-figma-title {
        font-size: 30px;
    }
    
    .ruta-inercia-horizontal-figma-subtitle {
        font-size: 16px;
    }
    
    .process-step-card {
        max-width: 180px;
        padding: 24px 16px;
        min-height: 240px;
    }
    
    .process-flow-container {
        gap: 16px;
    }
    
    .step-title {
        font-size: 16px;
    }
    
    .step-description {
        font-size: 13px;
    }
    
    .step-connector {
        right: -18px;
        width: 20px;
    }
}

/* Mobile - Transform to Vertical Layout */
@media (max-width: 767px) {
    .ruta-inercia-horizontal-figma {
        padding: 50px 0;
    }
    
    .ruta-inercia-horizontal-figma-container {
        padding: 0 20px;
    }
    
    .ruta-inercia-horizontal-figma-header {
        margin-bottom: 40px;
    }
    
    .ruta-inercia-horizontal-figma-title {
        font-size: 28px;
    }
    
    .ruta-inercia-horizontal-figma-subtitle {
        font-size: 16px;
    }
    
    /* Transform to vertical layout */
    .process-flow-container {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .process-step-card {
        max-width: 100%;
        width: 100%;
        max-width: 400px;
        padding: 24px;
        min-height: auto;
    }
    
    /* Vertical connectors */
    .step-connector {
        position: absolute;
        top: auto;
        bottom: -36px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 24px;
        background: #E5E7EB;
    }
    
    .step-connector::after {
        content: '';
        position: absolute;
        top: 24px;
        left: -3px;
        right: auto;
        width: 0;
        height: 0;
        border-top: 8px solid #E5E7EB;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-bottom: none;
    }
    
    .process-step-card.active .step-connector::after,
    .process-step-card.completed .step-connector::after {
        border-top-color: #22D3EE;
    }
    
    .step-title {
        font-size: 18px;
    }
    
    .step-description {
        font-size: 15px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .ruta-inercia-horizontal-figma-title {
        font-size: 24px;
    }
    
    .process-step-card {
        padding: 20px;
    }
    
    .step-title {
        font-size: 16px;
    }
    
    .step-description {
        font-size: 14px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .process-step-card {
        transition: none;
    }
    
    .process-step-card:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .process-step-card {
        border: 2px solid #1A1A1A;
    }
    
    .process-step-card:hover,
    .process-step-card.active {
        border-color: #2B69C7;
        background: #F8FAFC;
    }
    
    .step-title {
        color: #000000;
    }
    
    .step-description {
        color: #333333;
    }
}

/* Focus states for accessibility */
.process-step-card:focus {
    outline: 2px solid #22D3EE;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .ruta-inercia-horizontal-figma {
        background: #FFFFFF;
        padding: 40px 0;
    }
    
    .process-flow-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .process-step-card {
        border: 1px solid #CCCCCC;
        box-shadow: none;
        max-width: 100%;
        break-inside: avoid;
    }
    
    .step-connector {
        display: none;
    }
}