/* ============================================
   AV-CORE SISTEMA DE AUDITORÍA VEHICULAR
   HOJA DE ESTILOS TÉCNICOS
   VERSIÓN: 2.0.1
   ============================================ */

/* RESET Y VARIABLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* PALETA INDUSTRIAL */
    --color-primary: #FFEB3B;      /* Amarillo advertencia */
    --color-black: #212121;         /* Negro carbón */
    --color-alert: #FF5722;         /* Naranja alerta */
    --color-white: #FFFFFF;         /* Blanco papel */
    --color-gray: #424242;          /* Gris metálico */
    --color-light-gray: #F5F5F5;    /* Gris papel */
    --color-border: #616161;        /* Gris oscuro */

    /* TIPOGRAFÍA TÉCNICA */
    --font-mono: 'Courier New', Courier, monospace;

    /* ESPACIADO */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
}

/* BASE */
body {
    font-family: var(--font-mono);
    background-color: var(--color-light-gray);
    color: var(--color-black);
    line-height: 1.6;
    font-size: 14px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   HEADER TÉCNICO
   ============================================ */
.tech-header {
    background-color: var(--color-black);
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--spacing-md);
}

.system-id {
    display: flex;
    gap: var(--spacing-xs);
    font-size: 12px;
}

.system-id .code {
    color: var(--color-gray);
}

.system-id .value {
    color: var(--color-primary);
    font-weight: bold;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.led {
    width: 12px;
    height: 12px;
    background-color: var(--color-gray);
    border: 2px solid var(--color-border);
}

.led.active {
    background-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
}

.status-text {
    font-size: 11px;
    letter-spacing: 1px;
}

.cert-badge {
    text-align: right;
    font-size: 11px;
}

.cert-code {
    border: 2px solid var(--color-primary);
    padding: 4px 12px;
    display: inline-block;
}

/* ============================================
   SECCIÓN A: FICHA TÉCNICA
   ============================================ */
.section-a {
    background-color: var(--color-white);
    border-bottom: 4px solid var(--color-black);
    padding: var(--spacing-xl) 0;
}

.doc-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--color-black);
    margin-bottom: var(--spacing-lg);
}

.doc-number {
    font-size: 12px;
    padding: 4px 12px;
    background-color: var(--color-black);
    color: var(--color-primary);
    border: 2px solid var(--color-black);
}

.doc-title {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
}

.doc-date {
    font-size: 12px;
    color: var(--color-gray);
}

.spec-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    font-weight: normal;
}

.spec-code {
    color: var(--color-alert);
    font-size: 18px;
}

.spec-subtitle {
    font-size: 14px;
    color: var(--color-gray);
    letter-spacing: 3px;
}

.spec-description {
    border-left: 4px solid var(--color-primary);
    padding-left: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.spec-text {
    font-size: 16px;
    line-height: 1.8;
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    border: 3px solid var(--color-black);
    padding: var(--spacing-md);
    background-color: var(--color-light-gray);
}

.metric-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-xs);
    border-bottom: 1px solid var(--color-border);
}

.metric-label {
    font-size: 11px;
    color: var(--color-gray);
}

.metric-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-alert);
}

/* ============================================
   SECCIÓN B: MATRIZ DE MÓDULOS
   ============================================ */
.section-b {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: var(--spacing-xl) 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--color-primary);
}

.section-code {
    background-color: var(--color-primary);
    color: var(--color-black);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
}

.section-title {
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 2px;
}

.module-table {
    border: 3px solid var(--color-primary);
}

.table-header,
.table-row {
    display: grid;
    grid-template-columns: 100px 200px 1fr 1fr;
    gap: 2px;
    background-color: var(--color-primary);
}

.table-header {
    background-color: var(--color-primary);
}

.table-header > div {
    background-color: var(--color-black);
    color: var(--color-primary);
    padding: var(--spacing-sm);
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;
}

.table-row {
    background-color: var(--color-black);
}

.table-row:hover {
    background-color: var(--color-gray);
}

.table-row > div {
    background-color: var(--color-black);
    padding: var(--spacing-md);
    border-top: 1px solid var(--color-gray);
}

.table-row:hover > div {
    background-color: var(--color-gray);
}

.col-code {
    color: var(--color-primary);
    font-weight: bold;
}

.col-module {
    color: var(--color-white);
    font-weight: bold;
    font-size: 13px;
}

.col-function {
    color: var(--color-light-gray);
    font-size: 13px;
}

.col-benefit {
    color: var(--color-primary);
    font-size: 13px;
    border-left: 2px solid var(--color-alert);
    padding-left: var(--spacing-md) !important;
}

/* ============================================
   SECCIÓN C: VENTAJAS OPERATIVAS
   ============================================ */
.section-c {
    background-color: var(--color-white);
    padding: var(--spacing-xl) 0;
}

.specs-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.advantage-block {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-light-gray);
}

.adv-number {
    background-color: var(--color-black);
    color: var(--color-primary);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    border: 3px solid var(--color-primary);
}

.adv-title {
    font-size: 18px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-black);
    letter-spacing: 1px;
}

.adv-desc {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: var(--spacing-sm);
    color: var(--color-gray);
}

.adv-result {
    background-color: var(--color-primary);
    color: var(--color-black);
    padding: var(--spacing-sm);
    font-size: 13px;
    font-weight: bold;
    border-left: 4px solid var(--color-alert);
}

.specs-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.sidebar-box {
    border: 3px solid var(--color-black);
    background-color: var(--color-light-gray);
}

.box-title {
    background-color: var(--color-black);
    color: var(--color-primary);
    padding: var(--spacing-sm);
    font-size: 12px;
    letter-spacing: 2px;
}

.tech-list,
.cert-list {
    list-style: none;
    padding: var(--spacing-md);
}

.tech-list li,
.cert-list li {
    padding: var(--spacing-xs) 0;
    font-size: 13px;
    border-bottom: 1px solid var(--color-border);
}

.tech-list li:last-child,
.cert-list li:last-child {
    border-bottom: none;
}

.check {
    color: var(--color-alert);
    margin-right: var(--spacing-xs);
    font-weight: bold;
}

.implementation-time {
    padding: var(--spacing-md);
    text-align: center;
}

.time-value {
    font-size: 48px;
    font-weight: bold;
    color: var(--color-alert);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.time-desc {
    font-size: 12px;
    color: var(--color-gray);
}

/* ============================================
   SECCIÓN D: PROTOCOLO DE IMPLEMENTACIÓN
   ============================================ */
.section-d {
    background-color: var(--color-light-gray);
    padding: var(--spacing-xl) 0;
    border-top: 4px solid var(--color-black);
}

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.protocol-step {
    border: 3px solid var(--color-black);
    background-color: var(--color-white);
    padding: var(--spacing-md);
    transition: all 0.2s;
}

.protocol-step:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.active-step {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.step-number {
    background-color: var(--color-black);
    color: var(--color-primary);
    padding: 8px 16px;
    display: inline-block;
    margin-bottom: var(--spacing-sm);
    font-size: 12px;
    letter-spacing: 2px;
}

.active-step .step-number {
    background-color: var(--color-primary);
    color: var(--color-black);
}

.step-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 1px;
}

.step-desc {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    color: var(--color-gray);
}

.active-step .step-desc {
    color: var(--color-light-gray);
}

.step-time {
    font-size: 11px;
    color: var(--color-alert);
    font-weight: bold;
}

.step-action {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--color-primary);
}

.btn-demo {
    display: block;
    background-color: var(--color-primary);
    color: var(--color-black);
    padding: var(--spacing-md);
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 2px;
    border: 3px solid var(--color-primary);
    transition: all 0.2s;
}

.btn-demo:hover {
    background-color: var(--color-black);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ============================================
   FOOTER TÉCNICO
   ============================================ */
.tech-footer {
    background-color: var(--color-black);
    color: var(--color-light-gray);
    padding: var(--spacing-lg) 0;
    border-top: 4px solid var(--color-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.footer-label {
    font-size: 10px;
    color: var(--color-gray);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.footer-value {
    font-size: 13px;
    color: var(--color-primary);
}

.footer-bottom {
    padding-top: var(--spacing-md);
    text-align: center;
}

.footer-notice {
    font-size: 10px;
    color: var(--color-gray);
    letter-spacing: 1px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .specs-layout {
        grid-template-columns: 1fr;
    }

    .specs-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 900px) {
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
    }

    .col-code::before {
        content: 'CÓD: ';
        color: var(--color-gray);
    }

    .col-module::before {
        content: 'MÓDULO: ';
        color: var(--color-gray);
    }

    .col-function::before {
        content: 'FUNCIÓN: ';
        color: var(--color-gray);
    }

    .col-benefit::before {
        content: 'BENEFICIO: ';
        color: var(--color-gray);
    }

    .advantage-block {
        grid-template-columns: 1fr;
    }

    .adv-number {
        width: 100%;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .header-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-sm);
    }

    .cert-badge {
        text-align: center;
    }

    .doc-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .spec-title {
        font-size: 24px;
    }

    .key-metrics {
        grid-template-columns: 1fr;
    }

    .protocol-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ANIMACIONES TÉCNICAS
   ============================================ */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.led.active {
    animation: blink 2s infinite;
}

/* ESTADOS DE HOVER */
.table-row:hover {
    cursor: pointer;
}

.protocol-step:hover {
    cursor: default;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background-color: white;
    }

    .tech-header {
        position: static;
    }

    .btn-demo {
        display: none;
    }
}
