/* LeonWatt — Flexibilidad de Demanda Page Styles */

/* ===== FLOW DIAGRAM ===== */
.flow-diagram {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 40px 0;
    position: relative;
}
.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 200px;
    position: relative;
}
.flow-node-box {
    width: 180px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    transition: border-color .3s, box-shadow .3s;
}
.flow-node:hover .flow-node-box {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(13,148,136,.12);
}
.flow-node-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}
.flow-node-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.flow-node-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 80px;
    padding-top: 36px;
}
.flow-arrow-line {
    display: flex;
    align-items: center;
    gap: 0;
    color: var(--primary);
}
.flow-arrow-line svg {
    width: 60px;
    height: 24px;
}
.flow-arrow-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
}

/* Money flow (reverse arrow) */
.flow-money {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}
.flow-money svg { width: 200px; height: 32px; }

/* Compensation branch */
.flow-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 24px;
}
.flow-branch-arrow {
    color: var(--primary);
    margin-bottom: 8px;
}
.flow-branch-node {
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    width: 180px;
}
.flow-branch-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ===== COMPARISON TABLE (enhanced) ===== */
.comparison-table-wrapper { overflow-x: auto; margin: 32px 0; }
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 700px;
}
.comparison-table th {
    padding: 18px 16px;
    font-weight: 700;
    text-align: center;
    font-size: 15px;
    border-bottom: 2px solid var(--border);
}
.comparison-table th:first-child {
    text-align: left;
    background: transparent;
    width: 180px;
}
.comparison-table th:nth-child(2) {
    background: #f8fafc;
    color: var(--text);
}
.comparison-table th:nth-child(3) {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.comparison-table th:nth-child(4) {
    background: #f0f9ff;
    color: #0369a1;
}
.comparison-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.5;
}
.comparison-table td:first-child {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}
.comparison-table td:nth-child(2) { background: rgba(248,250,252,.5); }
.comparison-table td:nth-child(3) { background: rgba(204,251,241,.2); }
.comparison-table td:nth-child(4) { background: rgba(240,249,255,.5); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .table-highlight {
    color: var(--primary);
    font-weight: 700;
}

/* ===== REGULATORY TIMELINE ===== */
.timeline {
    position: relative;
    padding: 20px 0;
    max-width: 700px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: 2px;
}
.timeline-item {
    position: relative;
    padding-left: 64px;
    margin-bottom: 36px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: 14px;
    top: 4px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    border: 4px solid var(--bg);
    box-shadow: 0 0 0 2px var(--primary);
}
.timeline-dot-future {
    background: var(--bg);
    border-color: var(--bg);
    box-shadow: 0 0 0 2px var(--border);
}
.timeline-date {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.timeline-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.timeline-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.timeline-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}
.timeline-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 10px;
}
.timeline-tag-law { background: #fef3c7; color: #92400e; }
.timeline-tag-market { background: #dbeafe; color: #1e40af; }
.timeline-tag-future { background: #f3e8ff; color: #6b21a8; }

/* ===== SRAD SECTION ===== */
.srad-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.srad-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
}
.srad-text p { margin-bottom: 16px; }
.srad-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.srad-stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.srad-stat-value {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 6px;
}
.srad-stat-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
}
.srad-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.srad-stat-full {
    grid-column: 1 / -1;
}

/* ===== BENEFITS GRID ===== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.benefit-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: box-shadow .3s;
}
.benefit-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.benefit-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}
.benefit-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.benefit-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== REGULATION CARDS ===== */
.regulation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.regulation-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    border-top: 4px solid var(--primary);
}
.regulation-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary-dark);
    margin-bottom: 12px;
}
.regulation-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.regulation-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.regulation-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}
.regulation-card ul {
    list-style: none;
    padding: 0;
    margin-top: 12px;
}
.regulation-card li {
    padding: 4px 0 4px 20px;
    font-size: 14px;
    color: var(--text);
    position: relative;
}
.regulation-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* ===== PROGRAMS GRID ===== */
.programs-section {
    background: var(--bg-alt);
}
.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}
.program-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    position: relative;
    transition: box-shadow .3s, transform .3s;
    display: flex;
    flex-direction: column;
}
.program-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.08);
    transform: translateY(-4px);
}
.program-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.program-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    background: #dcfce7;
    color: #166534;
}
.program-badge-new { background: #dbeafe; color: #1e40af; }
.program-badge-future { background: #f3e8ff; color: #6b21a8; }
.program-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--text);
}
.program-full-name {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 16px;
    display: block;
}
.program-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}
.program-card-details {
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 16px;
    margin-top: auto;
}
.program-card-details li {
    padding: 5px 0 5px 22px;
    font-size: 13px;
    color: var(--text);
    position: relative;
    list-style: none;
}
.program-card-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}
.programs-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding-top: 8px;
}
.programs-cta .btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: transform .2s, box-shadow .2s;
}
.programs-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(13,148,136,.3);
}
.programs-cta .btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: background .2s, color .2s;
}
.programs-cta .btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== NUTSHELL INFOGRAPHIC ===== */
.nutshell-infographic {
    margin: 40px auto 0;
    padding: 32px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 800px;
}
.nutshell-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 32px;
}
.nutshell-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}
.nutshell-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 160px;
    padding: 24px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .3s, box-shadow .3s;
}
.nutshell-step:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(13,148,136,.1);
}
.nutshell-step-highlight {
    border-color: var(--primary);
    background: var(--primary-light);
}
.nutshell-step-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}
.nutshell-step-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    display: block;
}
.nutshell-step-label {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
    display: block;
}
.nutshell-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 70px;
    padding-top: 32px;
    color: var(--primary);
}
.nutshell-arrow-line {
    display: flex;
    align-items: center;
}
.nutshell-arrow-line svg {
    width: 50px;
    height: 24px;
}
.nutshell-arrow-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    font-weight: 500;
}

/* ===== NUTSHELL RETURN ARROWS (inline) ===== */
.nutshell-arrow-return {
    display: flex;
    align-items: center;
    margin-top: 6px;
}
.nutshell-arrow-return svg {
    width: 50px;
    height: 24px;
}
.nutshell-arrow-return-label {
    font-size: 10px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .flow-diagram {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    .flow-node { flex: none; width: 100%; max-width: 220px; }
    .flow-arrow {
        flex: none;
        padding: 12px 0;
        transform: rotate(90deg);
    }
    .flow-money { display: none; }
    .flow-branch { margin-top: 16px; }

    .srad-layout { grid-template-columns: 1fr; gap: 32px; }
    .srad-stats-grid { grid-template-columns: 1fr 1fr; }

    .benefits-grid { grid-template-columns: 1fr; }
    .regulation-grid { grid-template-columns: 1fr; }
    .programs-grid { grid-template-columns: 1fr; }
    .programs-cta { flex-direction: column; align-items: center; }

    .nutshell-infographic { padding: 24px 16px; }
    .nutshell-flow { flex-direction: column; align-items: center; }
    .nutshell-step { flex: none; width: 100%; max-width: 200px; }
    .nutshell-arrow { flex: none; padding: 8px 0; transform: rotate(90deg); }
    .nutshell-arrow-return { display: none; }
    .nutshell-arrow-return-label { display: none; }

    .timeline::before { left: 16px; }
    .timeline-item { padding-left: 48px; }
    .timeline-dot { left: 6px; }
}
