/* ================================================
   RENACEMOS.ORG — DESIGN SYSTEM STYLESHEET
   Light Mode | Brand: Violeta (#720CD4)
   ================================================ */

/* Variables de Diseño - Renacemos Design System */
:root {
    /* Brand Colors (Violeta) */
    --brand-500: #720CD4;
    --brand-600: #5C0AAB;
    --brand-400: #9D4EDD;
    --brand-100: #F1E5FC;
    --brand-50: #F8F2FD;
    --accent-500: #C621E5;

    /* Priority Colors */
    --priority-critical: #DC2626;
    --priority-high: #EA580C;
    --priority-medium: #EAB308;
    --priority-low: #6F9678;

    /* Case States */
    --state-reported: #64748B;
    --state-validating: #720CD4;
    --state-validated: #3F6F8F;
    --state-needs: #9D4EDD;
    --state-managing: #720CD4;
    --state-processing: #D97706;
    --state-recovered: #6F9678;
    --state-closed: #3F6949;

    /* Neutrals - Light Mode */
    --dark-900: #172A3A;
    --dark-800: #243447;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748B;
    --slate-400: #94A3B8;
    --slate-300: #CBD5E1;
    --slate-200: #E2E8F0;
    --sand: #E9E5DC;
    --surface-subtle: #F8F6F1;
    --surface: #FFFFFF;
    --canvas: #FAFAF8;

    /* Text Colors */
    --text-primary: #172A3A;
    --text-secondary: #3F6F8F;
    --text-muted: #64748B;
    --text-placeholder: #94A3B8;

    /* Borders */
    --border-color: #E2E8F0;
    --border-strong: #CBD5E1;

    /* Shadows */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
}

/* Light Mode (Default) */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--canvas);
    line-height: 1.6;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ================================================
   NAVBAR
   ================================================ */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand-500);
    letter-spacing: -0.3px;
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    padding: 120px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--accent-500) 100%);
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1.2px;
    line-height: 1.2;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero .subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 500;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero .description {
    display: none;
}

/* ================================================
   PROBLEMA SECTION
   ================================================ */
.problema {
    padding: 80px 0;
    background-color: var(--surface-subtle);
}

.problema h2 {
    font-size: 2rem;
    margin-bottom: 60px;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
}

.problema-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.problema-card {
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.problema-card:hover {
    border-color: var(--priority-high);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.problema-card .icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    display: block;
}

.problema-card h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.problema-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ================================================
   CONSECUENCIAS SECTION
   ================================================ */
.consecuencias {
    padding: 80px 0;
    background-color: var(--surface);
}

.consecuencias h2 {
    font-size: 2rem;
    margin-bottom: 60px;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.consecuencias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.consecuencia-card {
    background: var(--surface-subtle);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.consecuencia-card:hover {
    border-color: var(--priority-high);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.card-icon {
    font-size: 2.5rem;
    color: var(--dark-900);
    margin-bottom: var(--spacing-md);
}

.consecuencia-card h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.consecuencia-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ================================================
   SOLUCIÓN SECTION
   ================================================ */
.solucion {
    padding: 80px 0;
    background-color: var(--canvas);
}

.solucion h2 {
    font-size: 2rem;
    margin-bottom: 60px;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
}

/* Timeline - Responsive (Vertical Mobile, Horizontal Desktop) */
.actores-timeline {
    margin: 0 auto 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.actor-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.actor-step.final {
    margin-bottom: 0;
}

.actor-box-vertical {
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-lg);
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
}

.actor-box-vertical:hover {
    border-color: var(--brand-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.actor-box-vertical.success {
    background: linear-gradient(135deg, var(--state-recovered), #85b886);
    border-color: var(--state-recovered);
    color: white;
}

.actor-box-vertical.success h3,
.actor-box-vertical.success .actor-action {
    color: white;
}

.actor-icon {
    font-size: 2.5rem;
    color: var(--brand-500);
    margin-bottom: var(--spacing-md);
}

.actor-box-vertical.success .actor-icon {
    color: white;
}

.actor-box-vertical h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.actor-action {
    font-size: 0.95rem;
    color: var(--brand-500);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.actor-box-vertical.success .actor-action {
    color: rgba(255, 255, 255, 0.95);
}

.actor-context {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.actor-box-vertical.success .actor-context {
    display: none;
}

.timeline-arrow {
    font-size: 1.5rem;
    color: var(--brand-500);
    margin: var(--spacing-md) 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes bounce-horizontal {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* ================================================
   RESPONSIVE: DESKTOP - STEPPER CON LÍNEA CONTINUA
   ================================================ */
@media (min-width: 768px) {
    .actores-timeline {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: var(--spacing-sm);
        max-width: 1100px;
        position: relative;
        padding-top: var(--spacing-lg);
    }

    /* Línea continua que conecta todos los círculos */
    .actores-timeline::before {
        content: '';
        position: absolute;
        top: calc(var(--spacing-lg) + 40px);
        left: 10%;
        right: 10%;
        height: 3px;
        background: linear-gradient(90deg, var(--brand-500) 0%, var(--brand-500) 75%, var(--state-recovered) 100%);
        z-index: 0;
    }

    .actor-step {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1 1 20%;
        max-width: 20%;
        width: auto;
        position: relative;
        z-index: 1;
    }

    .actor-step.final {
        flex-basis: 20%;
        margin-top: 0;
    }

    /* La tarjeta pierde su fondo/borde: el círculo se convierte en protagonista */
    .actor-box-vertical {
        background: transparent;
        border: none;
        box-shadow: none;
        width: 100%;
        padding: 0;
        text-align: center;
    }

    .actor-box-vertical:hover {
        transform: none;
        box-shadow: none;
        border: none;
    }

    .actor-box-vertical.success {
        background: transparent;
        border: none;
    }

    .actor-box-vertical.success h3 {
        color: var(--text-primary);
    }

    .actor-box-vertical.success .actor-action {
        color: var(--state-recovered);
    }

    .actor-box-vertical.success .actor-context {
        display: block;
    }

    /* El ícono se convierte en un círculo sobre la línea */
    .actor-icon {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: var(--surface);
        border: 3px solid var(--brand-500);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.75rem;
        color: var(--brand-500);
        margin: 0 auto var(--spacing-md);
        box-shadow: var(--shadow);
        transition: all 0.3s ease;
    }

    .actor-box-vertical:hover .actor-icon {
        transform: scale(1.08);
        box-shadow: var(--shadow-lg);
    }

    .actor-box-vertical.success .actor-icon {
        background: linear-gradient(135deg, var(--state-recovered), #85b886);
        border-color: var(--state-recovered);
        color: white;
    }

    .actor-box-vertical h3 {
        font-size: 1rem;
        margin-bottom: var(--spacing-xs);
    }

    .actor-action {
        font-size: 0.85rem;
    }

    .actor-context {
        font-size: 0.75rem;
        max-width: 170px;
        margin: 0 auto;
    }

    /* Las flechas ya no aplican: la línea reemplaza su función */
    .timeline-arrow {
        display: none;
    }
}

.solucion-note {
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: 8px;
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.solucion-note strong {
    color: var(--brand-500);
}

/* ================================================
   FRAMEWORK SECTION
   ================================================ */
.framework {
    padding: 80px 0;
    background-color: var(--surface-subtle);
}

.framework h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
}

.framework-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.framework-diagram-link {
    text-decoration: none;
    display: block;
}

.framework-diagram {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.framework-diagram-link:hover .framework-diagram {
    border-color: var(--brand-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.framework-preview {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.framework-diagram-link:hover .framework-preview {
    transform: scale(1.02);
}

.framework-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(114, 12, 212, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.framework-diagram-link:hover .framework-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--spacing-md);
}

.overlay-content p {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

/* ================================================
   CTA + FOOTER UNIFIED SECTION
   ================================================ */
.cta-footer {
    padding: 80px 0 60px 0;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--accent-500) 100%);
    color: white;
    text-align: center;
}

.cta-footer h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.cta-subtitle {
    font-size: 1.125rem;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: white;
    color: var(--brand-500);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-primary i {
    font-size: 1.25rem;
}

/* Footer Divider */
.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 40px 0;
}

/* Footer Content */
.footer-content {
    padding-top: 20px;
}

.footer-copyright {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.footer-description {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.85;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .hero .description {
        font-size: 1rem;
    }

    .problema h2,
    .consecuencias h2,
    .solucion h2,
    .framework h2 {
        font-size: 1.75rem;
    }

    .problema-grid,
    .solucion-steps {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .actor-flow {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    .actor-box {
        width: 100%;
    }

    .arrow {
        display: none;
    }

    .hero {
        padding: 60px 0;
    }

    .problema,
    .consecuencias,
    .solucion,
    .framework,
    .cta {
        padding: 50px 0;
    }

    .cta h2 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 40px 0;
    }

    .problema-grid {
        grid-template-columns: 1fr;
    }

    .consecuencias-list li {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .actor-box {
        width: 100%;
    }
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.6s ease-out;
}

/* ================================================
   FONT AWESOME ICONS STYLING
   ================================================ */
.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.icon i {
    display: block;
}

.icon-problem {
    color: var(--priority-high);
}

.icon-alert {
    color: var(--priority-high);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.actor-icon {
    font-size: 2.5rem;
    color: var(--brand-500);
    margin-bottom: var(--spacing-md);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: 50px;
}

.section-header i {
    font-size: 2rem;
    color: var(--brand-500);
}

.section-header h2 {
    margin: 0;
}

/* ================================================
   UTILITIES
   ================================================ */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--spacing-xl);
}

.mb-lg {
    margin-bottom: var(--spacing-xl);
}
