/* ══════════════════════════════════════════════════════════════
   INGELEX ELECTRIC — style.css
   Tema: Rojo profesional + Negro técnico
   Versión limpia sin duplicados
══════════════════════════════════════════════════════════════ */

/* ─── 1. VARIABLES ─────────────────────────────────────────── */
:root {
    --rojo:        #ff0000;
    --rojo-soft:   rgba(255, 0, 0, 0.15);
    --rojo-dark:   #cc0000;
    --cyan:        #00cfd5;
    --cyan-soft:   rgba(0, 207, 213, 0.12);
    --amarillo:    #f1c40f;
    --verde-wa:    #25d366;

    --bg-base:     #07090d;
    --bg-card:     rgba(14, 20, 28, 0.95);
    --bg-input:    #0e141b;
    --bg-reporte:  #0a0a0a;

    --border:      #1e2632;
    --border-soft: #2a3646;

    --text-white:  #e9eef5;
    --text-dim:    #7a8899;
    --text-muted:  #4a5568;

    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   14px;

    --shadow-rojo: 0 0 20px rgba(255, 0, 0, 0.2);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ─── 2. RESET Y BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-base);
    background-image:
        radial-gradient(circle at 10% 10%, rgba(255, 0, 0, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(0, 207, 213, 0.04) 0%, transparent 40%);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── 3. BANNER DE ANUNCIOS ────────────────────────────────── */
.ads-banner {
    background: #0a0a0a;
    border-bottom: 1px solid var(--rojo-dark);
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rojo);
}

.ads-track {
    display: inline-block;
    animation: scrollAds 30s linear infinite;
}

.ads-track span { margin: 0 40px; }

@keyframes scrollAds {
    from { transform: translateX(100vw); }
    to   { transform: translateX(-100%); }
}

/* ─── 4. NAVEGACIÓN ────────────────────────────────────────── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 40px;
    background: rgba(7, 9, 13, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-white);
}

.logo span { color: var(--rojo); }

.logo-img {
    height: 42px;
    object-fit: contain;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-badge {
    background: var(--rojo-soft);
    color: var(--rojo);
    border: 1px solid var(--rojo-dark);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.btn-recarga {
    background: var(--rojo);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-recarga:hover {
    background: var(--rojo-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-rojo);
}

/* ─── 5. LAYOUT PRINCIPAL ──────────────────────────────────── */
.container {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    padding: 50px 40px;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    background-image:
        linear-gradient(to right, rgba(7,9,13,0.97) 35%, rgba(7,9,13,0.75)),
        url("https://images.pexels.com/photos/257736/pexels-photo-257736.jpeg?auto=compress&cs=tinysrgb&w=1260");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ─── 6. COLUMNA IZQUIERDA ─────────────────────────────────── */
.info-side {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hero-text h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-white);
}

.hero-text .accent { color: var(--rojo); }

.hero-subtitle {
    margin-top: 12px;
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 420px;
    line-height: 1.7;
}

.section-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

/* ─── 7. TARJETAS DE MÓDULOS (2x2) ─────────────────────────── */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.price-card:hover {
    border-color: var(--rojo-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.price-card.active {
    border-color: var(--rojo);
    background: var(--rojo-soft);
    box-shadow: var(--shadow-rojo);
}

.card-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.price-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
}

.price-card p {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ─── 8. BADGES DE PLANES ──────────────────────────────────── */
.planes-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.plan-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    flex: 1;
    min-width: 80px;
}

.plan-precio {
    font-size: 1.1rem;
    font-weight: 800;
}

.plan-nombre {
    font-size: 0.7rem;
    margin-top: 2px;
    opacity: 0.85;
}

.plan-basico  { background: rgba(0,207,213,0.08); border-color: var(--cyan); color: var(--cyan); }
.plan-pro     { background: rgba(241,196,15,0.08); border-color: var(--amarillo); color: var(--amarillo); }
.plan-elite   { background: var(--rojo-soft); border-color: var(--rojo); color: var(--rojo); }

/* ─── 9. DIRECTORIO DE PROFESIONALES ───────────────────────── */
.expert-directory {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.directory-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.verified-badge {
    background: var(--cyan);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 20px;
}

.filter-bar select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text-white);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 14px;
    cursor: pointer;
}

.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.expert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    position: relative;
}

.expert-card:hover {
    border-color: var(--cyan);
    transform: translateY(-3px);
}

.expert-card.expert-elite {
    border-color: var(--rojo-dark);
}

.expert-card.expert-elite:hover {
    border-color: var(--rojo);
    box-shadow: var(--shadow-rojo);
}

.expert-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--rojo);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.expert-card h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.expert-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.btn-contact {
    display: block;
    margin-top: 10px;
    background: var(--verde-wa);
    color: white;
    text-align: center;
    text-decoration: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.78rem;
    transition: all 0.2s ease;
}

.btn-contact:hover {
    background: #128C7E;
    transform: translateY(-1px);
}

/* ─── 10. PANEL DE CONTROL (FORMULARIO) ─────────────────────── */
.engine-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    align-self: start;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 80px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-white);
}

.panel-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34,197,94,0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text-white);
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rojo);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 40px;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
}

.contador-text {
    font-size: 0.75rem;
    color: var(--cyan);
    text-align: right;
    margin-top: 5px;
    font-weight: 600;
}

/* ─── 11. BOTONES DE ACCIÓN ─────────────────────────────────── */
.btn-run {
    width: 100%;
    background: var(--rojo);
    color: white;
    border: none;
    padding: 16px;
    font-weight: 800;
    font-size: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.25s ease;
}

.btn-run:hover:not(:disabled) {
    background: var(--rojo-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-rojo);
}

.btn-run:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-bloqueo {
    width: 100%;
    padding: 15px;
    background: #ff4d4d;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.status-msg {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--cyan-soft);
    border: 1px solid rgba(0, 207, 213, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    min-height: 20px;
    display: none;
}

.status-msg:not(:empty) { display: block; }

/* ─── 12. SECCIÓN DE RESULTADO ──────────────────────────────── */
#seccion-resultado {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.resultado-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
}

.resultado-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cyan);
}

.resultado-acciones-top {
    display: flex;
    gap: 8px;
}

.btn-secundario {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-dim);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s ease;
}

.btn-secundario:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-nuevo:hover      { border-color: var(--rojo); color: var(--rojo); }

.reporte-contenido {
    background: var(--bg-reporte);
    border: 1px solid #1a1a1a;
    border-radius: var(--radius-md);
    padding: 20px;
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 14px;
    scroll-behavior: smooth;
}

/* Scrollbar del reporte */
.reporte-contenido::-webkit-scrollbar { width: 6px; }
.reporte-contenido::-webkit-scrollbar-track { background: #111; }
.reporte-contenido::-webkit-scrollbar-thumb { background: var(--rojo-dark); border-radius: 3px; }

.resultado-footer-btns { margin-top: 10px; }

.btn-descargar {
    width: 100%;
    padding: 13px;
    background: var(--amarillo);
    color: #000;
    border: none;
    font-weight: 800;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-descargar:hover {
    background: #d4a90e;
    transform: translateY(-1px);
}

/* ─── 13. ESTILOS DEL REPORTE TÉCNICO ───────────────────────── */
.reporte-contenido h2, #cuerpo-reporte h2 {
    color: var(--rojo);
    font-size: 1.4rem;
    font-weight: 800;
    border-bottom: 2px solid var(--rojo-dark);
    padding-bottom: 8px;
    margin: 16px 0 12px 0;
}

.reporte-contenido h3, #cuerpo-reporte h3 {
    color: var(--cyan);
    font-size: 1.1rem;
    font-weight: 700;
    border-left: 3px solid var(--cyan);
    padding-left: 10px;
    margin: 14px 0 10px 0;
}

.reporte-contenido h4, #cuerpo-reporte h4 {
    color: var(--amarillo);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 12px 0 8px 0;
}

.report-main-title { color: var(--rojo); font-size: 1.4rem; font-weight: 800; border-bottom: 2px solid var(--rojo-dark); padding-bottom: 8px; margin: 16px 0 12px 0; }
.report-title      { color: var(--cyan); font-size: 1.1rem; font-weight: 700; border-left: 3px solid var(--cyan); padding-left: 10px; margin: 14px 0 10px 0; }
.report-subtitle   { color: var(--amarillo); font-size: 0.95rem; font-weight: 600; margin: 12px 0 8px 0; }
.report-paragraph  { margin: 10px 0; line-height: 1.7; }

.report-list, .report-list-ordered { margin: 10px 0; padding-left: 22px; }
.report-list-item, .report-list-numbered { margin: 6px 0; line-height: 1.6; color: #ddd; }
.report-list-item::marker { color: var(--rojo); }

/* Tablas del reporte */
.table-responsive {
    overflow-x: auto;
    margin: 14px 0;
    border-radius: var(--radius-sm);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    background: #0d0d0d;
}

.report-table-header {
    background: var(--rojo-dark);
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-table-cell {
    padding: 9px 12px;
    border-bottom: 1px solid #222;
    color: #ccc;
    font-size: 0.88rem;
}

.report-table tr:hover .report-table-cell { background: rgba(255,0,0,0.04); }

/* Footer del reporte */
.report-footer    { margin-top: 20px; padding-top: 16px; }
.report-divider   { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--rojo), var(--cyan), transparent); margin: 16px 0; }
.report-meta      { background: var(--cyan-soft); border: 1px solid rgba(0,207,213,0.15); padding: 12px; border-radius: var(--radius-sm); font-size: 0.78rem; font-family: monospace; }
.report-signature { margin-top: 14px; text-align: center; font-size: 0.8rem; color: var(--text-muted); }
.report-signature p { font-weight: 600; color: var(--rojo); margin-bottom: 2px; }

/* Fórmulas MathJax */
mjx-container {
    color: var(--cyan) !important;
    margin: 12px 0 !important;
    padding: 8px 12px !important;
    background: var(--cyan-soft);
    border-radius: var(--radius-sm);
    display: block !important;
    overflow-x: auto;
}

/* ─── 14. MODALES ───────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-box {
    background: #111;
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Disclaimer */
.disclaimer-box   { border: 2px solid var(--rojo); }
.disclaimer-icon  { font-size: 2.5rem; margin-bottom: 12px; }
.disclaimer-title { color: var(--rojo); font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; }
.disclaimer-text  { color: #ccc; line-height: 1.7; margin-bottom: 14px; font-size: 0.92rem; }
.disclaimer-warning { color: #ffaa00; font-size: 0.88rem; margin-bottom: 20px; }

.btn-disclaimer {
    background: var(--rojo);
    color: white;
    padding: 13px 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-disclaimer:hover {
    background: var(--rojo-dark);
    box-shadow: var(--shadow-rojo);
}

/* Modal QR */
.qr-box    { border: 1px solid var(--border); max-width: 320px; }
.qr-box h3 { color: var(--text-white); margin-bottom: 16px; font-size: 1.1rem; }
.qr-img    { width: 200px; height: 200px; margin: 0 auto 16px; display: block; border-radius: var(--radius-sm); }
.qr-box p  { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 14px; }

.qr-planes {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.qr-plan {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.btn-cerrar-modal {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-dim);
    padding: 9px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cerrar-modal:hover { border-color: var(--cyan); color: var(--cyan); }

/* ─── 15. LOADER ────────────────────────────────────────────── */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-box {
    background: #0a0a0a;
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px solid var(--rojo);
    box-shadow: var(--shadow-rojo);
    max-width: 300px;
}

.loader-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255,0,0,0.2);
    border-top-color: var(--rojo);
    border-right-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-titulo   { color: var(--cyan); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.loader-mensaje  { color: #aaa; font-size: 0.82rem; margin-bottom: 4px; }
.loader-subtexto { color: #555; font-size: 0.72rem; }

/* ─── 16. FOOTER ────────────────────────────────────────────── */
.site-footer {
    margin-top: 60px;
    padding: 48px 40px 24px;
    background: #050709;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto 32px;
}

.footer-col h4 {
    color: var(--text-white);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.footer-disclaimer {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
    margin-top: 8px !important;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
}

.footer-logo strong { color: var(--rojo); }
.footer-logo-img { height: 32px; }

/* ─── 17. PRINT / PDF ───────────────────────────────────────── */
@media print {
    .reporte-contenido { overflow: visible !important; max-height: none !important; }
    .table-responsive  { overflow: visible !important; }
}

/* ─── 18. RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .container { grid-template-columns: 1fr; padding: 30px 24px; }
    .engine-form { position: static; }
    .hero-text h1 { font-size: 2.2rem; }
}

@media (max-width: 640px) {
    nav { padding: 12px 16px; }
    .container { padding: 20px 16px; gap: 28px; }
    .hero-text h1 { font-size: 1.8rem; }
    .pricing-cards { grid-template-columns: repeat(2, 1fr); }
    .engine-form { padding: 20px; }
    .site-footer { padding: 32px 16px 20px; }
    .nav-badge { display: none; }
}
