﻿:root {
    --primary-color: #FFDE00;
    --dark-color: #000000;
    --neutral-dark: #1a1a14;
    --neutral-medium: #8a8a80;
    --bg-light: #f8f8f6;
    --wa-color: #25d366;
}
@font-face {
    font-family: 'InterCustom', sans-serif;
    src: url('./fonts/Inter-18pt-Regular.ttf') format('truetype');
}

body {
    font-family: 'InterCustom', sans-serif;
    color: var(--dark-color);
    background-color: white;
}


.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 1800px;
    background-color: var(--wa-color);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1100; /* Por encima de la navbar y todo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .whatsapp-float:hover {
        transform: scale(1.1);
        color: #FFF;
        background-color: #128c7e;
    }

/* Tooltip opcional que aparece al pasar el mouse */
.tooltip-wa {
    position: absolute;
    right: 75px;
    background-color: #333;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.whatsapp-float:hover .tooltip-wa {
    opacity: 1;
}

/* Efecto de pulso para el MVP */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--wa-color);
    opacity: 0.7;
    z-index: -1;
    animation: pulse-wa 2s infinite;
}

@keyframes pulse-wa {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.text-primary-custom {
    color: var(--primary-color) !important;
}
.navbar-custom {
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    border-bottom: none;
    display: flex;
    align-items: center; /* Esto obligará al logo y a los botones a alinearse en el centro vertical */
    /* Mantenemos un padding bajito y forzamos a sobreescribir Bootstrap */
    padding: 0.5rem 1rem !important;
}

/* El logo EGN tiene texto negro → fondo blanco detrás para que se vea sobre el navbar negro
   (replica la franja blanca de la referencia) */
.navbar-custom .navbar-brand {
    background: #fff;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    margin-right: 1rem;
}

/* Links blancos sobre el negro; hover/activo en amarillo de marca. Scoped al navbar público. */
.navbar-custom .nav-link {
    color: #fff !important;
}

    .navbar-custom .nav-link:hover {
        color: var(--primary-color) !important;
        background: transparent;
    }

    .navbar-custom .nav-link.active {
        color: var(--primary-color) !important;
        background: transparent;
        font-weight: 700;
    }

/* Hamburguesa (mobile) visible sobre el negro */
.navbar-custom .navbar-toggler {
    color: #fff;
}
.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.bg-dark-custom {
    background-color: var(--dark-color) !important;
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Color del interruptor cuando está apagado */
.form-check-input {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(234, 240, 61, 0.2);
    cursor: pointer;
}

    .form-check-input:focus {
        box-shadow: 0 0 0 0.25rem rgba(234, 240, 61, 0.25);
        border-color: var(--accent-color);
    }

.bg-neutral-dark {
    background-color: var(--neutral-dark) !important;
}



.nav-link {
    color: black !important;
    font-size: 1.25rem; /* Aumentado de 1rem a 1.25rem (aprox 20px) para que sea más grande */
    font-weight: 500;
    margin: 0 1.5rem;
    padding: 5px 5px;
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}

.navbar-brand img {
    height: 30px; /* Esta altura está perfecta, es pequeña y sutil */
    margin-left: 15px; /* Reemplaza el translate en X con un margen real */
}

    .nav-link.active {
        background-color: rgba(43, 140, 238, 0.1);
        color: #2b8cee;
        font-weight: 600;
    }


.btn-primary-custom {
    background-color: var(--primary-color);
    color: black;
    font-weight: 700;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

    .btn-primary-custom:hover {
        background-color: white;
        color: black;
    }

.hero-section {
    padding: 160px 0 100px;
    background-color: var(--neutral-dark);
    position: relative;
    overflow: hidden;
    color: white;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.badge-hero {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.dot-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.hero-title {
    font-size: calc(2.5rem + 2vw);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    color: #a0a0a0;
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.btn-outline-white {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 0.25rem;
}

    .btn-outline-white:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

.logo-cloud {
    padding: 3rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

    .logo-cloud p {
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        color: var(--neutral-medium);
        font-weight: 700;
    }

.logo-item {
    opacity: 0.6;
    filter: grayscale(1);
    transition: 0.5s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

    .logo-item:hover {
        opacity: 1;
        filter: grayscale(0);
    }

.service-card {
    padding: 2.5rem;
    background: var(--bg-light);
    border: 1px solid transparent;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    height: 100%;
}

    .service-card:hover {
        border-color: rgba(233, 240, 62, 0.5);
        transform: translateY(-5px);
        box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.05);
    }

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(233, 240, 62, 0.2);
    color: #b5ba2a;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    color: black;
}

.special-card {
    background-color: var(--primary-color);
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cta-section {
    padding: 80px 0;
    background-color: var(--neutral-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    top: -300px;
    right: -300px;
}

footer {
    background-color: black;
    color: white;
    padding-top: 80px;
    padding-bottom: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.875rem;
    transition: 0.3s;
}

    .footer-link:hover {
        color: var(--primary-color);
    }

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

    .social-btn:hover {
        background: var(--primary-color);
        color: black;
    }

.about-image-container {
    position: relative;
    padding: 1rem;
}

.about-stats-overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    max-width: 260px;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

.section-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b5ba2a;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    display: block;
}



.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: var(--secondary-color);
    color: #ffffff;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar-logo {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-box {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: #000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-right: 12px;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    padding: 1.5rem 1.5rem 0.5rem;
    font-weight: 700;
}

.sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}


.nav-link:hover {
    background-color: #FFDE00;
    color: black !important;
}

.arrow-icon {
    pointer-events: none;
}



.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(233, 240, 62, 0.1);
    border-right: 3px solid var(--primary-color);
}

.nav-link i {
    margin-right: 12px;
    font-size: 1.25rem;
}

.top-navbar {
    margin-left: 260px;
    height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
}

    .search-container i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
    }

.search-input {
    padding-left: 40px;
    background-color: #f1f3f5;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border: none;
    color: #000;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
}

    .btn-primary-custom:hover {
        background-color: #d8df35;
        color: #000;
    }

.card {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    margin-bottom: 1.5rem;
}

.kpi-card {
    position: relative;
    overflow: hidden;
}

    .kpi-card::after {
        content: '';
        position: absolute;
        top: -20px;
        right: -20px;
        width: 80px;
        height: 80px;
        background-color: rgba(233, 240, 62, 0.1);
        border-radius: 50%;
    }

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
}

.badge-up {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    font-weight: 600;
}

.badge-down {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-weight: 600;
}

.chart-placeholder {
    height: 250px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 20px;
    position: relative;
}

.bar {
    width: 30px;
    background-color: #dee2e6;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s;
}

    .bar.highlight {
        background-color: var(--primary-color);
        box-shadow: 0 0 15px rgba(233, 240, 62, 0.4);
    }

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background-color: #f8f9fa;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.2s;
}

    .action-btn:hover {
        background-color: rgba(233, 240, 62, 0.1);
        border-color: var(--primary-color);
        color: #000;
    }

    .action-btn i {
        font-size: 1.5rem;
        margin-bottom: 8px;
        background-color: rgba(233, 240, 62, 0.2);
        padding: 10px;
        border-radius: 50%;
    }

.progress {
    height: 6px;
    border-radius: 3px;
}

.progress-bar {
    background-color: var(--primary-color);
}

.progress-bar-success {
    background-color: #198754;
}

.user-profile {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.table thead th {
    background-color: #f8f9fa;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid #dee2e6;
}

@media (max-width: 992px) {
    .sidebar {
        width: 0;
        overflow: hidden;
        
    }



    .sidebar .collapse:not(.show) {
        display: none !important;
    }

    /* 2. Asegurar que el botón recupere la flecha a su estado original al cerrar */
    .sidebar .nav-link.collapsed .arrow-icon {
        transform: rotate(0deg) !important;
    }

    /* 3. Evitar que el icono interfiera con el click del ratón */
    .sidebar .nav-link .material-icons-outlined,
    .sidebar .nav-link span,
    .sidebar .nav-link .arrow-icon {
        pointer-events: none;
    }

    /* 4. Estilo específico para sub-links para evitar conflictos */
    .sidebar .collapse .nav-link {
        display: flex !important; /* Solo cuando el padre (collapse) permite que se vea */
        padding-left: 3rem !important;
    }
}

/* ============================================================
   HOME LANDING EGN — adaptado del mockup de referencia (Tailwind → Bootstrap).
   Negro + amarillo: hero 2 columnas con franja blanca y foto, banner de marcas
   con scroll infinito que se superpone al hero, sección clara de valor y
   sección oscura de ingeniería. Clases reutilizables (usadas en Home/Index).
   Full-bleed: rompen el padding lateral del container-fluid px-4 del _Layout.
   ============================================================ */

/* Fondo negro: tapa las brechas entre navbar/secciones/footer.
   Aplica a la home y a toda vista pública con estética oscura (ej. Contacto). */
body.pagina-oscura {
    background: #000;
}

/* El footer del layout es claro (inline styles) → en páginas oscuras va negro */
.pagina-oscura footer {
    background: #000 !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
}

/* ---------- HERO ---------- */
.hero-egn {
    position: relative;
    background: #000;
    color: #fff;
    min-height: 85vh;
    /* full bleed exacto: rompe el px-4 del container-fluid. No usar 100vw:
       incluye el scrollbar y desalinea el listón con el navbar (~8px) */
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Listón blanco vertical con el logo (solo desktop) */

.hero-egn__strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 160px;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    padding-top: 2rem;
    z-index: 0;
}

.hero-egn__logo {
    width: 90px;
    height: auto;
}

.hero-egn__grid {
    position: relative;
    z-index: 1;
    width: 100%;
    /* Anclado a la izquierda (no centrado): el listón vive en el borde del
       viewport, así el texto queda siempre a 40px de él sin importar el ancho */
    max-width: 1480px;   /* 200px de listón+gutter, 1280px de contenido */
    margin: 0;
    padding: 7rem 1.5rem 1rem 200px;
}

.hero-egn__title {
    font-weight: 800;
    font-size: clamp(2.4rem, 5.2vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    max-width: 40rem;
}

/* Resaltado amarillo de marca dentro de títulos (home, contacto, etc.) */
.acento {
    color: var(--primary-color);
}

.hero-egn__cta,
.hero-egn__cta-ghost {
    padding: 0.85rem 2rem !important;
    border-radius: 0.4rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.9rem;
}

.hero-egn__cta-ghost {
    border: 1px solid #fff;
    color: #fff;
    background: transparent;
    transition: all 0.2s ease;
}

    .hero-egn__cta-ghost:hover {
        background: #fff;
        color: #000;
    }

/* Formato horizontal 16:9 (igual que el video fuente, sin recortes) */
.hero-egn__media {
    position: relative; /* ancla el botón de audio */
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
    aspect-ratio: 16 / 9;
    width: 100%;
}

/* Botón mute/unmute flotando sobre el video */
.hero-egn__audio {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

    .hero-egn__audio:hover {
        background: var(--primary-color);
        color: #000;
        transform: scale(1.08);
    }

/* En pantallas anchas el grid (max 1480px) deja espacio negro a la derecha:
   el video se estira hacia ahí sin mover la columna de texto */
@media (min-width: 1600px) {
    .hero-egn__media {
        width: calc(100% + 6rem);
    }
}

    .hero-egn__media img,
    .hero-egn__media video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* ---------- BANNER DE MARCAS (marquee infinito que pisa el hero) ---------- */
.brand-banner {
    background: var(--neutral-dark);
    /* full bleed: ocupa todo el ancho de pantalla, pegado al hero */
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    position: relative;
    z-index: 3;
    padding: 2.5rem 0;
    overflow: hidden;
}

.brand-banner__title {
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    margin-bottom: 2rem;
}

.brand-marquee {
    overflow: hidden;
}

    .brand-marquee:hover .brand-marquee__track {
        animation-play-state: paused;
    }

/* Para que el -50% caiga exacto: el padding lateral debe ser la mitad del gap */
.brand-marquee__track {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 4rem;
    padding: 0 2rem;
    animation: brand-scroll 60s linear infinite;
}

    /* Logos blancos con fondo transparente: van directo sobre la banda oscura */
    .brand-marquee__track img {
        height: 44px;
        width: auto;
        object-fit: contain;
        opacity: 0.85;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

        .brand-marquee__track img:hover {
            opacity: 1;
            transform: translateY(-2px);
        }

@keyframes brand-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- SECCIÓN DE VALOR (clara) ---------- */
/* .value-card se usa ahora en la sección clara de Capacidades Técnicas (.specs-section) */
.value-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 0.75rem;
    padding: 2.5rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .value-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 30px -10px rgba(0,0,0,0.12);
    }

/* El PNG de iconografía ya trae su propio círculo de color */
.value-card__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 2rem;
}

    .value-card__icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* ---------- Tarjetas/etiqueta de capacidades (reusadas en el portal y la home) ---------- */
.eng-tag {
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    font-size: 0.8rem;
}

.eng-card {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    padding: 2rem;
    height: 100%;
    transition: border-color 0.3s ease;
}

    .eng-card:hover {
        border-color: rgba(255, 222, 0, 0.5);
    }

    .eng-card .eng-card__icon {
        width: 40px;
        height: 40px;
        object-fit: contain;
        margin-bottom: 1rem;
    }

    .eng-card p {
        color: #c6c6c8;
    }

/* Tarjeta destacada (ej: asistente con IA) — borde amarillo y glow sutil */
.eng-card--destacada {
    position: relative;
    border-color: rgba(255, 222, 0, 0.55);
    background: linear-gradient(180deg, rgba(255, 222, 0, 0.08) 0%, rgba(0, 0, 0, 0.4) 60%);
    box-shadow: 0 0 30px -8px rgba(255, 222, 0, 0.25);
}

.eng-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: #000;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

/* ---------- SECCIÓN PORTAL + TECNOLOGÍA (diferencial digital) ----------
   Oscura con un glow amarillo sutil; contrasta con la sección clara .specs-section. */
.portal-section {
    position: relative;
    background: radial-gradient(120% 80% at 80% 0%, rgba(255, 222, 0, 0.10) 0%, #000 55%);
    color: #fff;
    padding: 7rem 0;
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    overflow: hidden;
}

.portal-section__inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.portal-section__title {
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    margin-top: 0.75rem;
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- SECCIÓN CAPACIDADES TÉCNICAS (clara, contrasta con portal) ----------
   Reusa .value-card / .value-card__icon (tarjetas blancas). */
.specs-section {
    background: #f6f6f7;
    padding: 6rem 0;
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
}

.specs-section__tag {
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    font-size: 0.8rem;
}

.specs-section__title {
    font-weight: 800;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    margin: 0.5rem 0 1rem;
}

.specs-section__lead {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 40rem;
    margin: 0 auto;
}

/* ---------- SECCIÓN OBRAS (galería de videos verticales, oscura) ---------- */
.obras-section {
    background: #0a0a0a;
    padding: 6rem 0;
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
}

.obras-section__title {
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    margin: 0.5rem 0 1rem;
}

.obras-section__lead {
    color: #c6c6c8;
    font-size: 1.1rem;
    max-width: 40rem;
    margin: 0 auto;
}

/* Marco vertical tipo reel */
.obra-card {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

    .obra-card video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* ---------- Bloque blanco del navbar (desktop, todas las vistas públicas) ----------
   El navbar lleva un bloque blanco de 160px al borde izquierdo con el logo.
   En la home empalma con el listón del hero: el hero arranca debajo del navbar
   (main sin padding-top) para que la columna blanca sea continua. */
@media (min-width: 992px) {
    .navbar-custom .navbar-brand {
        position: absolute; /* el navbar fixed-top es su containing block */
        left: 0;
        top: 0;
        height: 100%;
        width: 160px;
        margin: 0;
        padding: 0;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .navbar-custom .navbar-brand img {
            height: 40px;
            margin-left: 0;
        }

    /* Solo en la home: el hero se mete bajo el navbar para la continuidad */
    .home-landing main {
        padding-top: 0 !important; /* pisa el inline style del _Layout */
    }

    /* El logo vive en el navbar; el listón queda como columna blanca lisa */
    .home-landing .hero-egn__logo {
        display: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hero-egn {
        min-height: auto;
        padding-bottom: 2.5rem;
    }

    .hero-egn__strip {
        display: none;
    }

    .hero-egn__grid {
        padding: 3rem 1.25rem 1rem;
    }

    .portal-section,
    .specs-section,
    .obras-section {
        padding: 4rem 0;
    }
}

/* ============================================================
   PÁGINA CONTACTO — estética oscura de la landing (negro + amarillo).
   Usa .pagina-oscura en el body (lo asigna el _Layout por ruta).
   ============================================================ */
.contacto-titulo {
    color: #fff;
    font-weight: 800;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    line-height: 1.1;
    margin: 1rem 0 1.5rem;
}

.contacto-subtitulo {
    color: #c6c6c8;
    font-size: 1.1rem;
    max-width: 550px;
}

/* Card oscura del formulario */
.card-oscura {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

    .card-oscura .form-label {
        color: #fff;
        font-weight: 700;
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .card-oscura .form-control,
    .card-oscura .form-select {
        background-color: #1a1a1a;
        border: 1px solid rgba(255,255,255,0.15);
        color: #fff;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
    }

        .card-oscura .form-control::placeholder {
            color: rgba(255,255,255,0.4);
        }

        .card-oscura .form-control:focus,
        .card-oscura .form-select:focus {
            background-color: #1a1a1a;
            color: #fff;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(255, 222, 0, 0.15);
        }

/* Card de información de contacto */
.info-card {
    background: var(--neutral-dark);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 1rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    height: 100%;
    position: relative;
    overflow: hidden;
}

    /* Burbuja decorativa amarilla en la esquina */
    .info-card::before {
        content: '';
        position: absolute;
        top: -50px;
        right: -50px;
        width: 150px;
        height: 150px;
        background-color: rgba(255, 222, 0, 0.08);
        border-radius: 50%;
    }

.info-title {
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

    .contact-item:last-child {
        margin-bottom: 0;
    }

.icon-box {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .icon-box i {
        color: var(--primary-color);
    }

.info-label {
    display: block;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.info-text {
    font-weight: 500;
    margin: 0;
}

.info-subtext {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-top: 0.25rem;
}

/* Mapa: ocupa el alto restante de la columna, nunca menos de 300px */
.map-container {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    flex: 1 1 auto;
    min-height: 300px;
}

/* ============================================================
   LOGIN / REGISTRO — estética oscura de la landing.
   Reusa .card-oscura para el formulario; el body lleva .pagina-oscura.
   ============================================================ */

/* Panel lateral con foto y claim (solo desktop) */
.login-side {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    /* Altura propia (no 100%): si siguiera al alto de la fila, al cambiar
       de tab Ingresar↔Registrarse la foto se reencuadraría con un salto */
    height: 560px;
    display: flex;
    align-items: flex-end;
    background: var(--neutral-dark);
}

.login-side__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.login-side__contenido {
    position: relative;
    padding: clamp(1.5rem, 4vw, 3rem);
    color: #fff;
}

    .login-side__contenido p {
        color: #c6c6c8;
    }

/* Card del formulario de auth */
.auth-card {
    max-width: 520px;
    margin: 0 auto;
}

    /* Grises de Bootstrap ilegibles sobre negro → versión clara, scoped a la card */
    .auth-card .text-secondary {
        color: rgba(255,255,255,0.6) !important;
    }

    .auth-card h2 {
        color: #fff;
    }

    .auth-card .form-check-input:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

/* Tabs Ingresar/Registrarse sobre fondo oscuro */
.auth-tabs {
    border-bottom: 2px solid rgba(255,255,255,0.15);
    margin-bottom: 2rem;
}

    /* !important: la regla global .nav-link del navbar pinta color negro con !important */
    .auth-tabs .nav-link {
        border: none;
        color: rgba(255,255,255,0.55) !important;
        font-weight: 600;
        padding: 0 0 1rem;
        margin: 0 0 -2px;
        background: transparent;
        font-size: 1rem;
        justify-content: center;
    }

        .auth-tabs .nav-link:hover {
            color: #fff !important;
            border-color: transparent;
        }

        .auth-tabs .nav-link.active {
            color: #fff !important;
            background: transparent;
            border-bottom: 2px solid var(--primary-color);
        }

/* Links sobre fondo oscuro (ej. "¿Olvidaste tu contraseña?") */
.link-claro {
    color: #c6c6c8;
    text-decoration: none;
}

    .link-claro:hover {
        color: var(--primary-color);
    }

/* ---------- Botón de red social en el footer (funciona en claro y oscuro) ---------- */
.footer-red-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #94a3b8;
    color: #94a3b8;
    font-size: 1rem;
    transition: all 0.2s ease;
}

    .footer-red-social:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: #000;
        transform: scale(1.08);
    }

/* Scroll suave para los anclajes internos (Ver Servicios / Explorar Servicios) */
html {
    scroll-behavior: smooth;
}

/* ---------- Tabla sobre fondo oscuro (portal del cliente: Mis Compras) ---------- */
.tabla-oscura {
    --bs-table-bg: transparent;
    --bs-table-color: #fff;
    color: #fff;
}

    .tabla-oscura th {
        color: rgba(255,255,255,0.5);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 700;
        border-bottom: 2px solid rgba(255,255,255,0.15);
        padding: 0.9rem 1rem;
    }

    .tabla-oscura td {
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding: 0.85rem 1rem;
    }

.tabla-oscura__detalle {
    background: rgba(255,255,255,0.04);
    border-radius: 0.5rem;
    margin: 0.25rem 0 0.75rem;
}

/* ---------- Portal del cliente: dashboard estilo billetera ---------- */
/* Barra lateral que acompaña el scroll en pantallas grandes. */
.portal-sticky {
    position: sticky;
    top: 1.5rem;
}

@media (max-width: 991.98px) {
    .portal-sticky {
        position: static;
    }
}

/* Saldo destacado (héroe de la cuenta). */
.portal-hero__saldo {
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    line-height: 1.05;
}

/* Link "Ver todo" del header del card de actividad. */
.actividad-ver-todo {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--neutral-medium);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

    .actividad-ver-todo:hover {
        color: #fff;
    }

    .actividad-ver-todo .material-symbols-outlined {
        font-size: 16px;
    }

/* Feed de "última actividad": fila con ícono circular + texto + monto. */
.actividad-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

    .actividad-item:last-child {
        border-bottom: 0;
    }

.actividad-icono {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    color: #fff;
}

    .actividad-icono .material-symbols-outlined {
        font-size: 22px;
    }

.actividad-cuerpo {
    flex: 1;
    min-width: 0;
}

.actividad-titulo {
    color: #fff;
    font-weight: 600;
}

.actividad-sub {
    color: var(--neutral-medium);
    font-size: 0.85rem;
}

.actividad-monto {
    font-weight: 700;
    white-space: nowrap;
}

/* ===== Compras por obra: carpetas plegables estilo Drive =====
   Cada obra es una "carpeta" (card) que se abre y muestra sus compras
   como "archivos". Grid responsive: varias carpetas por fila en desktop,
   una sola columna en mobile. */
.drive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    align-items: start;
}

.drive-carpeta {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.drive-carpeta--link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

    .drive-carpeta--link:hover {
        background: rgba(255, 255, 255, 0.07);
        color: #fff;
    }

    .drive-carpeta--link:hover .drive-carpeta__icono {
        font-variation-settings: 'FILL' 1;
    }

.drive-carpeta__icono {
    flex: 0 0 auto;
    font-size: 30px;
    color: var(--primary-color);
}

.drive-carpeta__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.drive-carpeta__nombre {
    font-weight: 700;
}

.drive-carpeta__meta {
    font-size: 0.85rem;
    color: var(--neutral-medium);
}

.drive-carpeta__chevron {
    flex: 0 0 auto;
    color: var(--neutral-medium);
}

/* Archivo = compra dentro de la carpeta. */
.drive-archivo {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.drive-archivo__head {
    padding: 0.7rem 0.5rem;
    flex-wrap: wrap;
    text-decoration: none;
    border-radius: 8px;
}

    .drive-archivo__head:hover {
        background: rgba(255, 255, 255, 0.04);
    }

.drive-archivo__icono {
    flex: 0 0 auto;
    font-size: 22px;
    color: var(--neutral-medium);
}

.drive-archivo__nombre {
    font-weight: 600;
}

.drive-archivo__monto {
    font-weight: 700;
    white-space: nowrap;
}

.drive-items {
    padding: 0.25rem 0.5rem 0.75rem 2.4rem;
    color: #fff;
}

.drive-items__fila {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
}

    .drive-items__fila:last-child {
        border-bottom: 0;
    }

@media (max-width: 575.98px) {
    .drive-grid {
        grid-template-columns: 1fr;
    }
}

/* Banner de ahorro por saldo aplicado (portal cliente, detalle de compra). */
.ahorro-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 222, 0, 0.08);
    border: 1px solid rgba(255, 222, 0, 0.25);
}

.ahorro-banner__icono {
    flex: 0 0 auto;
    font-size: 32px;
    color: var(--primary-color);
}

.ahorro-banner__titulo {
    font-weight: 700;
    color: var(--primary-color);
}

.ahorro-banner__sub {
    font-size: 0.85rem;
    color: var(--neutral-medium);
    margin-top: 2px;
}

/* ===== Vista detalle de obra: stat bar + grid de compras ===== */
.obra-stat-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
}

.obra-stat {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

    .obra-stat .material-symbols-outlined {
        font-size: 26px;
    }

.obra-stat__val {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.1;
}

.obra-stat__lbl {
    font-size: 0.78rem;
    color: var(--neutral-medium);
}

.obra-stat__divider {
    width: 1px;
    height: 2rem;
    background: rgba(255,255,255,0.12);
    flex: 0 0 auto;
}

/* Grid de compras (tarjetas). */
.compras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.compra-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.25rem;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    color: #fff;
    transition: background 0.15s, border-color 0.15s;
}

    .compra-card:hover {
        background: rgba(255,255,255,0.07);
        border-color: rgba(255, 222, 0, 0.25);
        color: #fff;
    }

.compra-card__fecha {
    font-size: 0.78rem;
    color: var(--neutral-medium);
}

.compra-card__num {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

.compra-card__monto {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin: 0.2rem 0 0.4rem;
}

.compra-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--neutral-medium);
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin-top: auto;
}

    .compra-card__footer .material-symbols-outlined {
        font-size: 16px;
    }

@media (max-width: 575.98px) {
    .compras-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .obra-stat-bar {
        gap: 1rem;
    }

    .obra-stat__divider {
        display: none;
    }
}

/* Ítem de compra como card (vista detalle en mobile). */
.compra-item-card {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

    .compra-item-card:last-child {
        border-bottom: 0;
    }

.compra-item-card__nombre {
    font-weight: 600;
    color: #fff;
}

/* ============================================================
   BIBLIOTECA DE REGLAMENTACIÓN ELÉCTRICA — portal del arquitecto (tema oscuro)
   ============================================================ */
/* Buscador sobre fondo oscuro (reutilizable fuera de .card-oscura) */
.buscador-oscuro {
    background-color: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 0.75rem;
}

    .buscador-oscuro::placeholder {
        color: rgba(255,255,255,0.4);
    }

    .buscador-oscuro:focus {
        background-color: #1a1a1a;
        color: #fff;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(255, 222, 0, 0.15);
    }

/* Encabezado de cada categoría de la biblioteca */
.reglas-cat__titulo {
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0 1rem;
}

/* Ficha colapsable */
.norma-card {
    margin-bottom: 0.75rem;
    padding: 0;
    overflow: hidden;
}

.norma-card__head {
    width: 100%;
    background: transparent;
    border: 0;
    color: #fff;
    text-align: left;
    padding: 1.1rem clamp(1rem, 3vw, 1.75rem);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

    .norma-card__head:hover {
        background: rgba(255,255,255,0.03);
    }

.norma-card__titulo {
    font-weight: 700;
    color: #fff;
}

.norma-card__resumen {
    color: #c6c6c8;
    font-size: 0.92rem;
    margin-top: 0.15rem;
}

.norma-card__chevron {
    margin-left: auto;
    transition: transform 0.25s ease;
    color: var(--primary-color);
}

.norma-card__head[aria-expanded="true"] .norma-card__chevron {
    transform: rotate(180deg);
}

.norma-card__body {
    padding: 0 clamp(1rem, 3vw, 1.75rem) 1.35rem;
    color: #d7d7d9;
}

.norma-card__contenido {
    white-space: pre-line;
    line-height: 1.6;
}

.norma-card__meta {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
    font-size: 0.85rem;
}

.norma-card__articulo {
    color: var(--primary-color);
    font-weight: 700;
}

/* ── Planos de la obra (portal del arquitecto) ── */
.planos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.plano-card {
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: border-color 0.2s ease;
}

    .plano-card:hover {
        border-color: rgba(255, 222, 0, 0.4);
    }

.plano-card__icono {
    font-size: 40px;
    color: var(--primary-color);
}

.plano-card__nombre {
    font-weight: 700;
    color: #fff;
    word-break: break-word;
    line-height: 1.25;
}

.plano-card__meta {
    font-size: 0.78rem;
    color: #9a9a9c;
}

.plano-card__acciones {
    margin-top: auto;
    padding-top: 0.6rem;
    display: flex;
    gap: 0.4rem;
}

/* ── Asistente IA (chat de consulta) — componente con superficie propia ── */
.chat-asistente {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: min(70vh, 640px);
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}

/* Cabecera del chat: foto + nombre del asistente */
.chat-asistente__cab {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background: #fff;
}

.chat-asistente__foto {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.10);
}

.chat-asistente__foto--icono {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #000;
    font-size: 1.4rem;
}

.chat-asistente__nombre {
    font-weight: 700;
    color: #1a1a1a;
}

.chat-asistente__hilo {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f7f7f8;
}

/* Cada mensaje va en una fila; la IA muestra su avatar a la izquierda */
.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.chat-row--user {
    justify-content: flex-end;
}

.chat-row--ia {
    justify-content: flex-start;
}

.chat-row__av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.10);
}

.chat-row__av--icono {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #000;
    font-size: 1.05rem;
}

.chat-msg {
    max-width: 85%;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

/* Markdown renderizado en burbujas de IA */
.chat-msg--ia { white-space: normal; }
.chat-msg--ia p { margin-bottom: 0.4rem; }
.chat-msg--ia p:last-child { margin-bottom: 0; }
.chat-msg--ia ul, .chat-msg--ia ol { padding-left: 1.3rem; margin-bottom: 0.4rem; }
.chat-msg--ia li { margin-bottom: 0.15rem; }
.chat-msg--ia strong { font-weight: 600; }
.chat-msg--ia em { font-style: italic; }
.chat-msg--ia h1, .chat-msg--ia h2, .chat-msg--ia h3 {
    font-size: 1rem; font-weight: 600; margin: 0.6rem 0 0.3rem;
}
.chat-msg--ia code {
    background: #f0f0f0; border-radius: 3px;
    padding: 0.1em 0.35em; font-size: 0.88em;
}
.chat-msg--ia pre { background: #f4f4f4; border-radius: 6px; padding: 0.6rem; overflow-x: auto; }
.chat-msg--ia pre code { background: none; padding: 0; }

/* Tablas dentro del chat */
.chat-msg--ia table {
    width: 100%; border-collapse: collapse;
    font-size: 0.88rem; margin: 0.5rem 0;
    border: 1px solid #dee2e6;
}
.chat-msg--ia th {
    background: #f1f3f5; font-weight: 600;
    padding: 0.45rem 0.65rem; text-align: left;
    border: 1px solid #dee2e6;
}
.chat-msg--ia td {
    padding: 0.4rem 0.65rem; border: 1px solid #dee2e6;
    vertical-align: top;
}
.chat-msg--ia tr:nth-child(even) td { background: #f9f9f9; }

.chat-msg--user {
    align-self: flex-end;
    background: var(--primary-color);
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-msg--ia {
    align-self: flex-start;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid rgba(0,0,0,0.08);
    border-bottom-left-radius: 4px;
}

    .chat-msg--ia.pensando {
        color: #888;
        font-style: italic;
    }

.chat-asistente__barra {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    background: #fff;
}

.chat-asistente__input {
    flex: 1;
    resize: none;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    color: #1a1a1a;
}

    .chat-asistente__input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(255, 222, 0, 0.2);
    }

/* En mobile, fuente ≥16px en el input evita el zoom automático de iOS Safari al enfocar. */
@media (max-width: 576px) {
    .chat-asistente__input {
        font-size: 16px;
    }
}

/* Avatar editable (foto de perfil con overlay de cámara al pasar el mouse).
   Usado en Mi Perfil; reutilizable en cualquier vista que edite una foto. */
.avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

    .avatar-container:hover .avatar-overlay {
        opacity: 1;
    }

/* Oculta el resumen de validación cuando no hay errores (evita el cuadro vacío). */
.validation-summary-valid {
    display: none;
}
