:root {
    --army-gold: #cdaa7d; 
    --neon-green: #51ff00;
    --dark-base: #0a0c0a;
    --paper-color: #fdfdfd;
    --text-dark: #1a1a1a;
    --border-grey: #2a2a2a;
}

body {
    background-color: var(--dark-base);
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    margin: 0; padding: 0; line-height: 1.6;
}

/* Escáner Visual */
.scanner-effect {
    width: 100%; height: 2px; position: fixed; top: 0;
    background: rgba(81, 255, 0, 0.1); box-shadow: 0 0 10px var(--neon-green);
    z-index: 1000; pointer-events: none; animation: scan 8s linear infinite;
}
@keyframes scan { 0% { top: 0; } 100% { top: 100vh; } }

/* Header Dossier */
.classified-header {
    height: 250px;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), 
                url('https://images.unsplash.com/photo-1595590424283-b8f17842773f?q=80&w=2070&auto=format&fit=crop') center/cover;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    border-bottom: 3px solid var(--army-gold); position: relative;
    text-align: center;
}

.folder-tab {
    position: absolute; top: -5px; left: 20px; background: var(--army-gold);
    color: #000; padding: 5px 15px; font-weight: bold; font-family: 'Special Elite', cursive; font-size: 0.8rem;
}

h1.typewriter { font-family: 'Special Elite', cursive; font-size: 3rem; color: #fff; margin: 0; }

.classification-banner {
    border: 1px solid #7f1d1d; color: #ef4444; padding: 4px 15px;
    font-size: 0.75rem; margin-top: 10px; background: rgba(0,0,0,0.6); letter-spacing: 2px;
}

.blink { animation: blinker 1.5s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

/* Navegación SEO */
.file-nav { background: #111; border-bottom: 1px solid var(--border-grey); position: sticky; top: 0; z-index: 100; }
.file-nav ul { display: flex; justify-content: center; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.file-nav a {
    padding: 15px 15px; display: block; text-decoration: none; color: #888;
    font-weight: bold; font-size: 0.75rem; transition: 0.3s;
}
.file-nav a:hover, .file-nav a.active { color: #fff; background: rgba(205, 170, 125, 0.15); }

/* Documento de Contenido */
.container { max-width: 1000px; margin: 40px auto; padding: 0 20px; }

.intel-document {
    background: var(--paper-color); color: var(--text-dark); padding: 40px;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.8); font-family: 'Special Elite', cursive;
    border-radius: 2px;
}

.intel-document a { color: #b71c1c; text-decoration: underline; }

.stamp-top-secret {
    font-family: 'Special Elite', cursive; font-size: 1.2rem; color: #166534;
    border: 2px solid #166534; padding: 5px 15px; transform: rotate(-10deg);
    position: absolute; right: 40px; top: 40px; opacity: 0.7;
}

/* Grid Táctico */
.intel-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; margin-top: 40px;
}

.archive-box {
    background: #141614; border: 1px solid var(--border-grey); padding: 25px;
    position: relative; transition: 0.3s;
}

.archive-box:hover { border-color: var(--army-gold); transform: translateY(-5px); }

.box-label { background: var(--army-gold); color: #000; padding: 2px 8px; font-weight: bold; position: absolute; top: 0; left: 0; font-size: 0.65rem; }

.view-btn { color: var(--neon-green); text-decoration: none; font-weight: bold; font-size: 0.8rem; }

/* Footer */
.classified-footer { background: #050505; padding: 30px; border-top: 1px solid var(--army-gold); text-align: center; margin-top: 50px; }
.log-entry { font-size: 0.7rem; color: #555; margin-bottom: 10px; }
.final-stamp { color: #222; font-family: 'Special Elite', cursive; font-size: 0.8rem; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    h1.typewriter { font-size: 2rem; }
    .file-nav a { flex: 1 1 45%; text-align: center; font-size: 0.7rem; }
}


/* Estilo de Tabla Profesional para Datos Tácticos */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
}

.data-table th {
    background: #222;
    color: var(--army-gold);
    padding: 12px;
    text-align: left;
    text-transform: uppercase;
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    color: #333;
}

.data-table tr:nth-child(even) {
    background: #f4f4f4;
}

.data-table tr:hover {
    background: #ececec;
}



/* --- SAZÓN TÁCTICA PARA EL GLOSARIO --- */

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.glossary-item {
    background: rgba(0, 0, 0, 0.03); /* Fondo sutil tipo papel oficial */
    border: 1px solid #ddd;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    border-left: 4px solid var(--border-grey);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.05);
}

/* Efecto al pasar el ratón (Hover) */
.glossary-item:hover {
    background: #fff;
    border-left: 4px solid var(--army-gold);
    transform: translateX(5px);
    box-shadow: 5px 5px 15px rgba(205, 170, 125, 0.2);
    border-color: var(--army-gold);
}

.term {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: #b71c1c; /* Rojo operativo */
    display: block;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Decoración técnica en las esquinas */
.glossary-item::before {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 10px; height: 10px;
    border-top: 2px solid #ccc;
    border-right: 2px solid #ccc;
}

.glossary-item p {
    font-family: 'Special Elite', cursive;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
    margin: 0;
}

/* Ajuste para que la tabla de Sistemas y otros datos se vean mejor con este estilo */
.data-table {
    border: 1px solid var(--army-gold);
    box-shadow: 0 0 15px rgba(205, 170, 125, 0.1);
}

/* Animación de pulso para elementos activos */
.active-pulse {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { border-color: var(--border-grey); }
    50% { border-color: var(--army-gold); }
    100% { border-color: var(--border-grey); }
}


/* Estilo para Documentos Legales Clasificados */
.legal-document {
    background: #f4f4f4;
    border: 1px solid #ccc;
    color: #222;
    padding: 50px;
    font-family: 'Special Elite', cursive; /* Fuente de máquina de escribir */
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.05);
}

.legal-document h1 {
    text-decoration: underline;
    color: #b71c1c;
    text-transform: uppercase;
    font-size: 1.8rem;
}

.legal-document h2 {
    border-bottom: 1px solid #999;
    padding-bottom: 5px;
    margin-top: 30px;
    font-size: 1.2rem;
    color: #444;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: #b71c1c;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid #b71c1c;
    padding: 5px 15px;
    transition: 0.3s;
}

.back-link:hover {
    background: #b71c1c;
    color: #fff;
}


/* Banner de Cookies Estilo Dossier */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: #1a1a1a;
    color: #00ff00; /* Verde terminal */
    padding: 20px;
    border: 2px solid #333;
    font-family: 'Roboto Mono', monospace;
    z-index: 10000;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    display: none; /* Se activa con JS */
}

.cookie-content {
    font-size: 0.85rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    background: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'Special Elite', cursive;
    transition: 0.3s;
}

.cookie-btn.accept {
    background: #b71c1c;
    border-color: #ff0000;
}

.cookie-btn:hover {
    filter: brightness(1.2);
}


/* --- OPTIMIZACIÓN MÓVIL (RESPONSIVE) --- */

@media (max-width: 768px) {
    /* Ajuste del encabezado */
    .classified-header h1 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    /* Menú de navegación: Se vuelve una lista vertical cómoda para el dedo */
    .file-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 0 10px;
    }

    .file-nav li {
        border-bottom: 1px solid #333;
    }

    .file-nav a {
        padding: 12px;
        display: block;
        text-align: center;
    }

    /* Contenedor principal */
    .container {
        padding: 10px;
    }

    /* Ajuste de las tablas (para que no se corten) */
    .data-table {
        display: block;
        overflow-x: auto; /* Permite deslizar la tabla de lado si es muy ancha */
        font-size: 0.85rem;
    }

    /* Las cajas de información (Grid) pasan de 3 columnas a 1 sola */
    .intel-grid {
        grid-template-columns: 1fr !important; 
        gap: 15px;
    }

    /* El Banner de Cookies se ajusta al ancho del móvil */
    #cookie-banner {
        width: 95%;
        bottom: 10px;
        padding: 15px;
    }

    .cookie-buttons {
        flex-direction: column; /* Botones uno encima de otro */
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}