/* 
 * TodoReseña - Troubleshooting Template Styles (Solución de Problemas)
 */

:root {
    /* Base variables (duplicated from custom-home.css — loaded here so Soluciones works standalone) */
    --primary:        #4f46e5;
    --primary-dark:   #4338ca;
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --star-gold:  #fbbf24;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.025);
    --shadow-md:  0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    /* Trouble-specific */
    --tr-danger:  #ef4444;
    --tr-warning: #f59e0b;
    --tr-success: #10b981;
    --tr-info:    #3b82f6;
    --tr-text:    #334155;
}

.trouble-main-container {
    background: var(--gray-50);
    padding-bottom: 5rem;
    font-family: var(--font-body);
    color: var(--tr-text);
}

.trouble-main-container .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.trouble-no-sidebar { grid-template-columns: 1fr !important; }

.trouble-prod-btn {
    display: inline-block;
    background: #f59e0b;
    color: white !important;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.2s;
}
.trouble-prod-btn:hover {
    background: #d97706;
    transform: translateY(-2px);
}
.step-mt { margin-top: 1.5rem; }

.tested-badge {
    display: inline-block;
    background: #eff6ff;
    color: #1e3a8a;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.widget-upgrade .w-header-alt {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    padding: 1.2rem;
    font-weight: 800;
    text-align: center;
}

/* Header */
.trouble-header {
    padding: 3rem 0;
    max-width: 900px;
    margin: 0 auto;
}
.trouble-breadcrumbs {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}
.trouble-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    color: var(--tr-danger);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.trouble-h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}
.trouble-meta {
    font-size: 0.95rem;
    color: var(--gray-600);
}
.badge-success {
    color: var(--tr-success);
    font-weight: 700;
}

/* Diagnóstico Rápido Hero Box */
.quick-diag-box {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border: 1px solid #fecdd3;
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}
.diag-icon {
    width: 80px; height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tr-danger);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.diag-icon svg { width: 40px; }
.diag-content h2 {
    color: #9f1239;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.diag-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.stat-item {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    color: var(--gray-700);
}
.stat-item strong {
    color: var(--tr-danger);
    font-size: 1.1rem;
}

/* Layout Grid Principal */
.trouble-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 1024px) {
    .trouble-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Pasos (Step Cards) */
.trouble-steps-area .lead-text {
    font-size: 1.15rem;
    color: var(--gray-600);
}
.step-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}
.step-card.completed {
    border-color: var(--tr-success);
    background: #f0fdf4;
}
.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.step-number {
    width: 40px; height: 40px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.step-card.completed .step-number {
    background: var(--tr-success);
}
.step-header h3 {
    margin: 0;
    flex-grow: 1;
    font-size: 1.3rem;
}

/* Checkbox Interactivo */
.step-checkbox {
    display: block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 22px;
    user-select: none;
}
.step-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: -12px;
    left: 0;
    height: 28px;
    width: 28px;
    background-color: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    transition: 0.2s;
}
.step-checkbox:hover input ~ .checkmark { background-color: var(--gray-200); }
.step-checkbox input:checked ~ .checkmark {
    background-color: var(--tr-success);
    border-color: var(--tr-success);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.step-checkbox input:checked ~ .checkmark:after {
    display: block;
}
.step-checkbox .checkmark:after {
    left: 9px;
    top: 3px;
    width: 6px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.step-body {
    padding-left: calc(40px + 1rem); /* Alineado con el texto, no con el número */
}
@media (max-width: 768px) {
    .step-body { padding-left: 0; }
}
.step-list {
    padding-left: 1.2rem;
}
.step-list li {
    margin-bottom: 0.5rem;
}

/* Alertas */
.alert-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.alert-warning {
    background: #fffbeb;
    border-left: 4px solid var(--tr-warning);
    color: #92400e;
}
.alert-info {
    background: #eff6ff;
    border-left: 4px solid var(--tr-info);
    color: #1e40af;
}

/* Sidebar Monetización */
.trouble-sidebar {
    position: sticky;
    top: 100px;
}
.monetization-box {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.w-header {
    background: var(--gray-900);
    color: white;
    padding: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.w-header svg { width: 20px; }
.w-body {
    padding: 1.5rem;
}

.part-item {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}
.part-img {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}
.part-info {
    display: flex;
    flex-direction: column;
}
.part-info strong { font-size: 0.9rem; }
.part-info span { font-size: 0.85rem; color: var(--tr-danger); font-weight: 700; }

.btn-buy-part {
    display: inline-block;
    background: #f59e0b; /* Color amazon */
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    align-self: flex-start;
}
.btn-buy-part:hover { background: #d97706; color: white; }

.widget-upgrade .w-header-alt {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 1.2rem;
    font-weight: 800;
    text-align: center;
}
.btn-upgrade-guide {
    display: block;
    background: var(--gray-900);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
}
.btn-upgrade-guide:hover { background: black; color: white; transform: translateY(-2px); }

.trouble-img {
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}
