/* ==========================================================================
   Estilos exclusivos para páginas de producto
   Carga: rifaya, zapflow, extractormaps, disparadorpro
   NO cargar en index.html
   ========================================================================== */

/* ==========================================================================
   Sección "Cómo Funciona"
   ========================================================================== */

.componentization-section {
    padding: 100px 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.componentization-text h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.componentization-text p {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 15px;
}

.componentization-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 25px 0 15px;
}

.componentization-text ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.componentization-text ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #c0c0c0;
}

.componentization-text ul li i {
    color: var(--primary);
    font-size: 0.85rem;
}

.summary-box {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 10px;
    padding: 20px 25px;
    margin-top: 20px;
}

.summary-box p {
    color: #c0c0c0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.summary-box strong {
    color: #ffffff;
}

/* Diagrama de flujo */
.componentization-diagram,
.anatomy-diagram {
    border-radius: 16px;
    overflow: hidden;
}

.diagram-header {
    background: var(--surface-hover);
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.diagram-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background: rgba(var(--primary-rgb), 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #a78bfa;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.diagram-header h3,
.diagram-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.diagram-header p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0;
}

.diagram-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.diagram-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.diagram-block {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.diagram-component {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.diagram-component.purple {
    background: rgba(var(--primary-rgb), 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    color: #a78bfa;
}

.diagram-component.orange {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.diagram-list-item {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.diagram-list-item.green {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.diagram-row.small-components {
    flex-wrap: wrap;
    gap: 8px;
}

.diagram-small-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #808080;
}

.diagram-small-item span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #808080;
    display: inline-block;
    flex-shrink: 0;
}

.diagram-footer {
    padding: 12px 25px;
    background: var(--surface);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.diagram-footer span {
    font-size: 0.8rem;
    color: #606060;
}

/* ==========================================================================
   Sección "Características Avanzadas"
   ========================================================================== */

.software-anatomy-section {
    padding: 100px 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.anatomy-text h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 15px 0 20px;
    line-height: 1.2;
}

.anatomy-text p {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 15px;
}

.anatomy-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 20px 0 12px;
}

.anatomy-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anatomy-text ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #c0c0c0;
}

.anatomy-text ul li i {
    color: var(--primary);
    font-size: 0.85rem;
}

.diagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-dim);
    text-align: center;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.file-item i {
    font-size: 1.4rem;
    color: var(--primary);
}

/* ==========================================================================
   ZapFlow — Video embebido en Hero
   ========================================================================== */

.hero-cta {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.video-demo-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: #0a0a0a;
}

.video-demo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--surface-hover);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-demo-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
}

/* ==========================================================================
   ExtractorMaps — Secciones exclusivas
   ========================================================================== */

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(var(--success-rgb), 0.1);
    border: 1px solid rgba(var(--success-rgb), 0.3);
    border-radius: 9999px;
    font-size: 0.85rem;
    color: #86efac;
    margin-top: 1.5rem;
}

.trust-badge i {
    font-size: 0.8rem;
    color: var(--success);
}

.process-section {
    padding: 100px 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-top: 10px;
}

.process-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.process-step {
    border-radius: 16px;
    padding: 40px 30px;
    position: relative;
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(var(--primary-rgb), 0.25);
    line-height: 1;
    margin-bottom: 12px;
}

.step-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.process-step h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.process-step p {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.pricing-comparison {
    max-width: 600px;
    margin: 0 auto 50px;
    padding: 0 2rem;
}

.comparison-table {
    border-radius: 12px;
    overflow: hidden;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.comparison-item {
    font-size: 0.95rem;
    color: var(--text-dim);
}

.comparison-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ef4444;
}

.comparison-total {
    padding: 14px 24px;
    text-align: center;
    font-size: 0.85rem;
    color: #606060;
}

.comparison-total strong {
    color: #808080;
}

/* ==========================================================================
   Responsive — Páginas de producto
   ========================================================================== */

@media (max-width: 992px) {
    .two-col-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .componentization-section,
    .software-anatomy-section {
        padding: 80px 30px;
    }

    .componentization-text h2 {
        font-size: 1.9rem;
    }

    .anatomy-text h3 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .anatomy-text h3 {
        font-size: 1.8rem;
    }

    .anatomy-text p {
        font-size: 1rem;
    }

    .diagram-grid {
        gap: 1rem;
    }

    .componentization-section,
    .software-anatomy-section {
        padding: 60px 20px;
    }

    .componentization-text h2 {
        font-size: 1.7rem;
    }

    .diagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-demo-container {
        max-width: 100%;
        margin: 1.5rem auto 0;
    }

    .process-section {
        padding: 60px 20px;
    }

    .process-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .pricing-comparison {
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    .componentization-section,
    .software-anatomy-section {
        padding: 50px 15px;
    }

    .componentization-text h2 {
        font-size: 1.5rem;
    }

    .anatomy-text h3 {
        font-size: 1.3rem;
    }

    .diagram-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 15px;
        gap: 8px;
    }

    .file-item {
        padding: 12px 8px;
        font-size: 0.75rem;
    }

    .file-item i {
        font-size: 1.2rem;
    }

    .diagram-content {
        padding: 15px;
    }

    .summary-box {
        padding: 15px 18px;
    }

    .hero-cta {
        padding: 0 10px;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .process-section {
        padding: 50px 15px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .process-step {
        padding: 30px 20px;
    }

    .step-number {
        font-size: 2.5rem;
    }

    .comparison-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ==========================================================================
   OpenClaw — El Mundo Cambió
   ========================================================================== */

.world-changed-section {
    padding: 100px 40px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.world-changed-container h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin: 12px 0 40px;
}

.world-changed-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
    border-left: 3px solid rgba(var(--primary-rgb), 0.4);
    padding-left: 28px;
    margin-top: 20px;
}

.world-changed-body p {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin: 0;
}

.world-changed-emphasis {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #ffffff !important;
}

.world-changed-closing {
    font-style: italic;
    color: #a0a0a0 !important;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 18px;
    margin-top: 6px;
}

/* ==========================================================================
   OpenClaw — El Problema / Personas
   ========================================================================== */

.problem-section {
    padding: 100px 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.problem-container h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin: 12px 0 50px;
}

.persona-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.persona-card {
    border-radius: var(--radius-card);
    padding: 32px 28px;
    text-align: left;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.persona-card:hover {
    transform: translateY(-5px);
}

.persona-card.persona-operational {
    border-top: 3px solid #ef4444;
}

.persona-card.persona-tactical {
    border-top: 3px solid var(--warning);
}

.persona-card.persona-strategic {
    border-top: 3px solid var(--success);
    background: rgba(var(--success-rgb), 0.04);
    border-color: rgba(var(--success-rgb), 0.25);
}

.persona-number {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.persona-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.persona-card.persona-operational .persona-icon { color: #ef4444; }
.persona-card.persona-tactical .persona-icon { color: var(--warning); }
.persona-card.persona-strategic .persona-icon { color: var(--success); }

.persona-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.persona-label {
    font-size: 0.88rem;
    color: var(--text-faint);
    margin-bottom: 16px;
}

.persona-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.persona-card ul li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    color: #b0b0b0;
    line-height: 1.5;
}

.persona-card.persona-operational ul li i,
.persona-card.persona-tactical ul li i { color: var(--text-faint); font-size: 0.75rem; margin-top: 3px; }
.persona-card.persona-strategic ul li i { color: var(--success); font-size: 0.75rem; margin-top: 3px; }

.persona-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.persona-tag.openclaw-does {
    background: rgba(var(--primary-rgb), 0.12);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: #a78bfa;
}

.persona-tag.openclaw-does i { color: #a78bfa; }

.persona-tag.this-is-you {
    background: rgba(var(--success-rgb), 0.12);
    border: 1px solid rgba(var(--success-rgb), 0.3);
    color: #4ade80;
}

.persona-tag.this-is-you i { color: #4ade80; }

.problem-closing {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.problem-closing p {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.problem-closing strong {
    color: #ffffff;
}

/* ==========================================================================
   OpenClaw — La Historia / Stats
   ========================================================================== */

.story-section {
    padding: 100px 40px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.story-container h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin: 12px 0 40px;
}

.story-card {
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 48px;
    text-align: left;
}

.story-context h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
}

.story-context p {
    font-size: 0.97rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 14px;
}

.story-context ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-context ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.93rem;
    color: #c0c0c0;
}

.story-context ul li i {
    color: var(--primary);
    font-size: 0.85rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.story-access {
    font-weight: 600;
    color: #ffffff !important;
}

.story-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 36px 0;
    padding: 28px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-item.stat-highlight .stat-number {
    color: var(--success);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-faint);
    line-height: 1.4;
}

.story-quote {
    border-left: 3px solid var(--primary);
    padding: 16px 24px;
    margin: 0;
    font-size: 1rem;
    font-style: italic;
    color: #d0d0d0;
    line-height: 1.7;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 0 10px 10px 0;
}

/* ==========================================================================
   OpenClaw — Módulos
   ========================================================================== */

.modules-section {
    padding: 100px 40px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.modules-container h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin: 12px 0 10px;
}

.modules-subtitle {
    font-size: 0.95rem;
    color: var(--text-faint);
    margin-bottom: 48px;
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-align: left;
    position: relative;
}

.modules-list::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(var(--primary-rgb), 0.5), rgba(var(--primary-rgb), 0.05));
}

.module-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 20px 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    transition: background 0.2s ease;
}

.module-item:last-child {
    border-bottom: none;
}

.module-item:hover {
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
}

.module-item.module-key {
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 10px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    padding: 20px 20px 20px 0;
    margin: 8px 0;
}

.module-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.15);
    border: 2px solid rgba(var(--primary-rgb), 0.4);
    color: #a78bfa;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.module-item.module-key .module-num {
    background: rgba(var(--primary-rgb), 0.25);
    border-color: var(--primary);
}

.module-info {
    flex: 1;
    padding-top: 2px;
}

.module-key-badge {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(var(--primary-rgb), 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #a78bfa;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.module-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.module-info p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   OpenClaw — Garantía en sección de precios
   ========================================================================== */

.pricing-guarantee {
    max-width: 600px;
    margin: 40px auto 0;
}

.guarantee-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px;
    background: rgba(var(--success-rgb), 0.06);
    border: 1px solid rgba(var(--success-rgb), 0.2);
    border-radius: 12px;
    text-align: left;
}

.guarantee-box i {
    font-size: 1.8rem;
    color: var(--success);
    flex-shrink: 0;
    margin-top: 2px;
}

.guarantee-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
}

.guarantee-box p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   Responsive — OpenClaw (nuevas secciones)
   ========================================================================== */

@media (max-width: 992px) {
    .persona-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto 50px;
    }

    .story-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .world-changed-section,
    .problem-section,
    .story-section,
    .modules-section {
        padding: 80px 30px;
    }
}

@media (max-width: 768px) {
    .world-changed-container h2,
    .problem-container h2,
    .story-container h2,
    .modules-container h2 {
        font-size: 1.8rem;
    }

    .world-changed-emphasis {
        font-size: 1.3rem !important;
    }

    .story-card {
        padding: 32px 24px;
    }

    .story-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
    }

    .modules-list::before {
        display: none;
    }

    .world-changed-section,
    .problem-section,
    .story-section,
    .modules-section {
        padding: 60px 20px;
    }
}

@media (max-width: 576px) {
    .world-changed-container h2,
    .problem-container h2,
    .story-container h2,
    .modules-container h2 {
        font-size: 1.5rem;
    }

    .story-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .world-changed-body {
        padding-left: 18px;
    }

    .module-item {
        gap: 14px;
    }

    .module-num {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .guarantee-box {
        flex-direction: column;
        gap: 12px;
    }
}
