/* ==========================================================================
   site.css — Estándar global de Canal de Ética
   Tokens de diseño compartidos por todas las páginas.
   ========================================================================== */

/* ──────────────────────────────────────────────────────────────────────────
   1. TOKENS DEL SISTEMA DE DISEÑO
   ────────────────────────────────────────────────────────────────────────── */
:root {
    /* Paleta corporativa */
    --b2-primary: #003a70;
    --b2-primary-hover: #00284d;
    --b2-accent: #00c4cc;
    --b2-danger: #e30613;
    /* Superficies */
    --b2-bg: #f4f7f6;
    --b2-surface: #ffffff;
    --b2-surface-soft: #f8fafc;
    /* Tipografía */
    --b2-text: #2c3e50;
    --b2-text-muted: #64748b;
    /* Bordes y sombras */
    --b2-border: #e2e8f0;
    --b2-shadow-sm: 0 4px 6px -1px rgba(0, 58, 112, 0.05), 0 2px 4px -1px rgba(0, 58, 112, 0.03);
    --b2-shadow-md: 0 10px 25px -5px rgba(0, 58, 112, 0.08), 0 4px 10px -5px rgba(0, 58, 112, 0.04);
    --b2-shadow-lg: 0 20px 40px -8px rgba(0, 58, 112, 0.12), 0 8px 16px -4px rgba(0, 58, 112, 0.06);
    /* Transición estándar */
    --b2-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    /* Radios */
    --b2-radius-sm: 8px;
    --b2-radius-md: 12px;
    --b2-radius-lg: 16px;
    --b2-radius-xl: 24px;
}

/* ──────────────────────────────────────────────────────────────────────────
   2. RESET Y BASE
   ────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--b2-bg);
    color: var(--b2-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin-bottom: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   3. ESTRUCTURA DE PÁGINA
   ────────────────────────────────────────────────────────────────────────── */
.page-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-main {
    flex: 1;
}

/* ──────────────────────────────────────────────────────────────────────────
   4. FOOTER GLOBAL
   ────────────────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--b2-surface);
    border-top: 1px solid var(--b2-border);
    padding: 1rem 2rem;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--b2-text-muted);
}

.footer-brand {
    font-weight: 700;
    color: var(--b2-primary);
    display: flex;
    align-items: center;
}

.footer-copy {
    color: var(--b2-text-muted);
}

.footer-link {
    color: var(--b2-text-muted);
    text-decoration: none;
    transition: var(--b2-transition);
}

    .footer-link:hover {
        color: var(--b2-primary);
        text-decoration: underline;
    }

/* ──────────────────────────────────────────────────────────────────────────
   5. OVERRIDES DE BOOTSTRAP — Focus ring corporativo
   ────────────────────────────────────────────────────────────────────────── */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.18rem rgba(0, 58, 112, 0.2) !important;
    outline: none;
}

/* ──────────────────────────────────────────────────────────────────────────
   6. FORM FLOATING — placeholder end/start behavior
   ────────────────────────────────────────────────────────────────────────── */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--b2-text-muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ──────────────────────────────────────────────────────────────────────────
   7. UTILIDADES GLOBALES
   ────────────────────────────────────────────────────────────────────────── */

/* Color de acento para iconos (usado en formulario de denuncia) */
.text-accent {
    color: var(--b2-accent) !important;
}

/* Truncar texto en una línea */
.text-truncate-1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Animación de entrada suave — disponible en todas las páginas */
@keyframes b2-fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b2-animate-in {
    animation: b2-fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Spinner de carga global */
.b2-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0, 58, 112, 0.2);
    border-top-color: var(--b2-primary);
    border-radius: 50%;
    animation: b2-spin 0.7s linear infinite;
}

@keyframes b2-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   8. SCROLLBAR PERSONALIZADO (Webkit)
   ────────────────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--b2-bg);
}

::-webkit-scrollbar-thumb {
    background: #c0ccd8;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--b2-primary);
    }
