/* ═══════════════════════════════════════════════════════════════════
   site.css — CBR Lautaro
   CSS unificado del sitio público cbrlautaro.cl
   ═══════════════════════════════════════════════════════════════════

   ÍNDICE
   ──────
   1.  Variables y reset
   2.  Navbar
   3.  Hero
   4.  Secciones base
   5.  Trámites
   6.  Tarifas y tablas
   7.  Índices
   8.  Jurisdicción
   9.  Formularios compartidos
   10. Formulario inscripciones (campos, archivos, captcha)
   11. Formulario contacto (overrides fondo oscuro)
   12. Personal
   13. Transparencia
   14. Repertorio público digital
   15. Contacto
   16. Footer
   17. Responsive
   ═══════════════════════════════════════════════════════════════════ */


/* ── 1. VARIABLES Y RESET ───────────────────────────────────────── */

:root {
    --azul:        #26348b;
    --azul-dk:     #1e2870;
    --azul-lt:     #4a5bbf;
    --azul-pale:   #f0f2fb;
    --azul-border: #dde0f0;
    --blanco:      #ffffff;
    --gris:        #64748b;
    --gris-lt:     #f8f9ff;
    --text:        #1a1f3c;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--blanco);
    color: var(--text);
    overflow-x: hidden;
    font-size: 18px;
    line-height: 1.7;
}


/* ── 2. NAVBAR ──────────────────────────────────────────────────── */

nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    background: var(--azul);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    height: 60px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.nav-logo-icon {
    width: 34px;
    height: 34px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul);
    font-size: 1rem;
}

.nav-logo-text { line-height: 1.2; }
.nav-logo-text strong { display: block; color: #fff; font-size: 1rem; font-weight: 600; }
.nav-logo-text small  { display: block; color: rgba(255,255,255,0.55); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.04em; }

.nav-links { display: flex; gap: 0.1rem; list-style: none; }
.nav-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.45rem 0.9rem;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: rgba(255,255,255,0.1); color: #fff; }


/* ── 3. HERO ────────────────────────────────────────────────────── */

.hero {
    margin-top: 60px;
    background:
        linear-gradient(to right, rgba(26,26,46,0.72) 0%, rgba(26,26,46,0.45) 60%, rgba(26,26,46,0.30) 100%),
        url('/images/hero.jpeg') 50% 45% / cover no-repeat;
    display: grid;
    grid-template-columns: 1fr 400px;
    min-height: 440px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(-55deg, transparent, transparent 40px, rgba(255,255,255,0.018) 40px, rgba(255,255,255,0.018) 41px);
    pointer-events: none;
}

.hero-text {
    padding: 4.5rem 3rem 4.5rem 3.5rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1.4rem;
    width: fit-content;
}

.hero h1 { font-size: 2.8rem; font-weight: 700; color: #fff; line-height: 1.15; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: rgba(255,255,255,0.55); font-weight: 400; }
.hero-sub { color: rgba(255,255,255,0.6); font-size: 1rem; line-height: 1.75; max-width: 420px; margin-bottom: 2.2rem; }
.hero-ctas { display: flex; gap: 0.85rem; flex-wrap: wrap; }

.btn-primary {
    background: #fff;
    color: var(--azul);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.8rem 1.7rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover { background: var(--azul-pale); transform: translateY(-1px); }

.btn-outline {
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 0.95rem;
    padding: 0.8rem 1.7rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); }

.hero-panel {
    background: var(--azul-dk);
    border-left: 1px solid rgba(255,255,255,0.08);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.hero-panel-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.38); margin-bottom: 0.25rem; }

.info-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    transition: background 0.15s;
}
.info-card:hover { background: rgba(255,255,255,0.1); }

.info-card-icon {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.1);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.9rem; flex-shrink: 0;
}
.info-card h3 { color: rgba(255,255,255,0.45); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.2rem; font-weight: 500; }
.info-card p  { color: rgba(255,255,255,0.85); font-size: 0.95rem; line-height: 1.6; }


/* ── 4. SECCIONES BASE ──────────────────────────────────────────── */

section { scroll-margin-top: 68px; }

.section-wrap { max-width: 1100px; margin: 0 auto; padding: 5rem 2rem; }

.section-header { margin-bottom: 2.5rem; }

.section-tag { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--azul-lt); font-weight: 500; margin-bottom: 0.4rem; }

.section-header h2 { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.25; }
.section-header p  { margin-top: 0.6rem; color: var(--gris); font-size: 1rem; line-height: 1.75; max-width: 560px; }

.divider { width: 36px; height: 3px; background: var(--azul); margin-top: 0.85rem; border-radius: 2px; }

.bg-pale  { background: var(--azul-pale); }
.bg-white { background: var(--blanco); }

.alert-ley {
    background: var(--azul-pale);
    border: 1px solid var(--azul-border);
    border-left: 4px solid var(--azul);
    border-radius: 0 8px 8px 0;
    padding: 0.85rem 1.2rem;
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 2rem;
}
.alert-ley strong { color: var(--azul); }


/* ── 5. TRÁMITES ────────────────────────────────────────────────── */

.tramites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.25rem; }

.tramite-card {
    border: 1px solid var(--azul-border);
    border-radius: 12px;
    padding: 1.4rem;
    background: var(--blanco);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.tramite-card:hover { border-color: var(--azul-lt); box-shadow: 0 4px 20px rgba(38,52,139,0.1); transform: translateY(-2px); }

.tramite-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem; }

.tramite-icon {
    width: 38px; height: 38px;
    background: var(--azul);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.95rem; flex-shrink: 0;
}

.tramite-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.tramite-card p  { font-size: 0.95rem; color: var(--gris); line-height: 1.7; margin-bottom: 0.85rem; }

.tramite-req { background: var(--azul-pale); border-radius: 7px; padding: 0.7rem 0.9rem; font-size: 0.9rem; color: var(--text); line-height: 1.6; }
.tramite-req strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--azul-lt); margin-bottom: 0.3rem; font-weight: 600; }

.tarifa-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    margin-top: 0.75rem;
    background: var(--azul); color: #fff;
    font-size: 0.85rem; font-weight: 500;
    padding: 0.3rem 0.8rem; border-radius: 20px; text-decoration: none;
}

/* Lista de trámites (ul estilo tarjeta) */
.tramites-lista { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.tramites-lista li {
    display: flex; align-items: flex-start; gap: 12px;
    background: #f4f5fb;
    border: 1px solid #d0d4ef;
    border-left: 4px solid var(--azul);
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 0.92rem; color: #333; line-height: 1.5;
}
.tramites-lista li i { color: var(--azul); font-size: 1rem; margin-top: 2px; flex-shrink: 0; }

/* Tabla trámites/requisitos */
.tramites-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tramites-table thead tr { background-color: var(--azul); color: #fff; }
.tramites-table thead th { padding: 14px 20px; text-align: left; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; white-space: nowrap; }
.tramites-table thead th:first-child { width: 38%; }
.tramites-table tbody tr { border-bottom: 1px solid #e8eaf3; transition: background 0.15s; }
.tramites-table tbody tr:last-child { border-bottom: none; }
.tramites-table tbody tr:hover { background-color: #f4f5fb; }
.tramites-table tbody tr:nth-child(odd) { background-color: #fafbff; }
.tramites-table tbody tr:nth-child(odd):hover { background-color: #f4f5fb; }
.tramite-nombre { padding: 14px 20px; font-weight: 600; color: #1a1a2e; vertical-align: top; line-height: 1.5; }
.tramite-requisitos { padding: 14px 20px; color: #555; vertical-align: top; line-height: 1.7; }
.tramite-sin-req span { display: inline-block; font-size: 0.75rem; color: #aaa; font-style: italic; }


/* ── 6. TARIFAS Y TABLAS ────────────────────────────────────────── */

.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--azul-border); }

table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
thead tr { background: var(--azul); }
thead th { color: #fff; font-weight: 500; padding: 1rem 1.3rem; text-align: left; font-size: 0.88rem; letter-spacing: 0.06em; text-transform: uppercase; }
tbody tr { border-bottom: 1px solid var(--azul-border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--gris-lt); }
tbody td { padding: 0.9rem 1.3rem; color: var(--text); vertical-align: middle; font-size: 0.95rem; }
.precio  { font-weight: 600; color: var(--azul); }
.ley-ref { font-size: 0.82rem; color: var(--gris); font-style: italic; }


/* ── 7. ÍNDICES ─────────────────────────────────────────────────── */

.indices-toolbar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }

.filter-btn { border: 1px solid var(--azul-border); background: var(--blanco); color: var(--text); font-size: 0.9rem; padding: 0.5rem 1.1rem; border-radius: 20px; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.filter-btn.active, .filter-btn:hover { background: var(--azul); border-color: var(--azul); color: #fff; }

.indices-search { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.indices-search input { flex: 1; border: 1px solid var(--azul-border); border-radius: 8px; padding: 0.65rem 1rem; font-size: 0.95rem; font-family: inherit; color: var(--text); outline: none; transition: border-color 0.15s; background: var(--blanco); }
.indices-search input:focus { border-color: var(--azul-lt); }
.indices-search input::placeholder { color: #aab; }

.btn-buscar { background: var(--azul); color: #fff; border: none; border-radius: 8px; padding: 0.65rem 1.4rem; font-size: 0.95rem; font-family: inherit; cursor: pointer; font-weight: 500; transition: background 0.15s; }
.btn-buscar:hover { background: var(--azul-dk); }

.badge-vigente   { display: inline-block; background: #eaf3de; color: #3b6d11; font-size: 0.82rem; padding: 0.2rem 0.6rem; border-radius: 10px; font-weight: 500; }
.badge-cancelada { display: inline-block; background: #f1efe8; color: #5f5e5a; font-size: 0.82rem; padding: 0.2rem 0.6rem; border-radius: 10px; }

/* Card índices externo */
.indices-external {
    display: flex; align-items: flex-start; gap: 28px;
    background: #f4f5fb; border: 1px solid #d0d4ef; border-left: 4px solid var(--azul);
    border-radius: 8px; padding: 32px 36px; max-width: 680px;
}
.indices-external-icon {
    flex-shrink: 0; width: 56px; height: 56px;
    background: var(--azul); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff;
}
.indices-external-body h3 { margin: 0 0 8px 0; font-size: 1.1rem; color: #1a1a2e; }
.indices-external-body p  { margin: 0 0 20px 0; font-size: 0.9rem; color: #555; line-height: 1.6; }

.btn-autoconsulta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--azul); color: #fff; text-decoration: none;
    font-size: 0.88rem; font-weight: 600;
    padding: 11px 24px; border-radius: 5px; transition: background 0.2s;
}
.btn-autoconsulta:hover { background: var(--azul-dk); }


/* ── 8. JURISDICCIÓN ────────────────────────────────────────────── */

.jurisdiccion-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.jurisdiccion-img { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto; border-radius: 8px; }
.jurisdiccion-info { display: flex; flex-direction: column; gap: 20px; }

.jurisdiccion-card {
    display: flex; align-items: flex-start; gap: 16px;
    background: #fff; border: 1px solid #d0d4ef; border-left: 4px solid var(--azul);
    border-radius: 6px; padding: 16px 20px;
}
.jurisdiccion-card-icon {
    flex-shrink: 0; width: 36px; height: 36px;
    background: var(--azul); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.9rem;
}
.jurisdiccion-card h3 { margin: 0 0 4px 0; font-size: 1rem; color: #1a1a2e; }
.jurisdiccion-card p  { margin: 0; font-size: 0.85rem; color: #666; line-height: 1.5; }

.jurisdiccion-nota {
    display: flex; align-items: flex-start; gap: 10px;
    background: #f4f5fb; border-radius: 6px;
    padding: 14px 18px; font-size: 0.83rem; color: var(--azul); line-height: 1.5;
}
.jurisdiccion-nota i { flex-shrink: 0; margin-top: 2px; }


/* ── 9. FORMULARIOS COMPARTIDOS ─────────────────────────────────── */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group.full { grid-column: 1 / -1; }

.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text); letter-spacing: 0.03em; text-transform: uppercase; }

.form-group input,
.form-group select,
.form-group textarea {
    border: 1px solid var(--azul-border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.86rem;
    font-family: inherit;
    color: var(--text);
    background: var(--blanco);
    outline: none;
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--azul-lt); box-shadow: 0 0 0 3px rgba(74,91,191,0.1); }

.form-group textarea { resize: vertical; min-height: 100px; }

.file-upload-area {
    grid-column: 1 / -1;
    border: 2px dashed var(--azul-border);
    border-radius: 10px; padding: 2rem; text-align: center;
    cursor: pointer; background: var(--gris-lt);
    transition: border-color 0.15s, background 0.15s;
}
.file-upload-area:hover { border-color: var(--azul-lt); background: var(--azul-pale); }
.file-upload-area p      { font-size: 0.95rem; color: var(--gris); }
.file-upload-area strong { color: var(--azul); }

.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 0.85rem; margin-top: 0.4rem; }

.btn-reset {
    border: 1px solid var(--azul-border); background: transparent; color: var(--gris);
    font-size: 0.84rem; font-family: inherit; padding: 0.7rem 1.4rem; border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.btn-reset:hover { border-color: var(--azul); color: var(--azul); }

.btn-enviar {
    background: var(--azul); color: #fff; border: none;
    font-size: 0.95rem; font-family: inherit; font-weight: 600;
    padding: 0.8rem 2.2rem; border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.btn-enviar:hover    { background: var(--azul-dk); }
.btn-enviar:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-enviar .fa-spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ── 10. FORMULARIO INSCRIPCIONES ───────────────────────────────── */

.req { color: #c0392b; font-weight: bold; }
.opt { font-size: 0.78rem; color: var(--gris); font-weight: normal; }

.field-error { display: block; font-size: 0.75rem; color: #c0392b; margin-top: 4px; min-height: 1rem; }

.inscripcion-alert { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; border-radius: 6px; margin-bottom: 24px; font-size: 0.9rem; line-height: 1.5; }
.inscripcion-alert i { font-size: 1.4rem; margin-top: 2px; flex-shrink: 0; }
.inscripcion-alert p { margin: 4px 0 0 0; }
.inscripcion-alert--success { background: #eafaf1; border: 1px solid #27ae60; color: #1d6e45; }
.inscripcion-alert--success i { color: #27ae60; }
.inscripcion-alert--error   { background: #fdf3f2; border: 1px solid #c0392b; color: #7b1d13; }
.inscripcion-alert--error i { color: #c0392b; }

.uppercase-input             { text-transform: uppercase; }
.uppercase-input::placeholder { text-transform: none; }

.char-count { display: block; text-align: right; font-size: 0.72rem; color: var(--gris); margin-top: 4px; }

/* Sección documentos */
.docs-upload-section { background: #fff; border: 1px solid #d0d4ef; border-radius: 8px; padding: 0; overflow: hidden; }
.docs-upload-header  { background: #f4f5fb; border-bottom: 1px solid #d0d4ef; padding: 14px 20px; display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--azul); }
.docs-upload-header i { font-size: 1rem; }

.file-upload-row { padding: 14px 20px; border-bottom: 1px solid #ebebf5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.file-upload-row:last-of-type { border-bottom: none; }

.file-upload-info { flex: 1 1 300px; display: flex; align-items: center; gap: 10px; }

.file-doc-name { font-size: 0.84rem; color: #333; display: flex; align-items: center; gap: 6px; }
.file-doc-name i  { color: #c0392b; }
.file-doc-name em { color: var(--gris); font-size: 0.78rem; }

.file-badge { font-size: 0.68rem; font-weight: bold; padding: 2px 8px; border-radius: 99px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px; }
.file-badge.required { background: #fdecea; color: #c0392b; }
.file-badge.optional { background: #f0f0f0; color: #888; }

.file-upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 5px; font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap; background: var(--azul); color: #fff; border: none; transition: background 0.2s; }
.file-upload-btn:hover { background: #1b2567; }
.file-upload-btn.secondary { background: transparent; color: var(--azul); border: 1px solid var(--azul); }
.file-upload-btn.secondary:hover { background: #f4f5fb; }

.file-hidden { display: none; }

.file-selected { font-size: 0.78rem; color: var(--gris); font-style: italic; flex: 1 1 180px; }
.file-selected.has-file { color: #27ae60; font-style: normal; font-weight: 600; }

.file-hint { padding: 10px 20px; background: #fafafa; font-size: 0.75rem; color: var(--gris); margin: 0; border-top: 1px solid #ebebf5; display: flex; align-items: center; gap: 6px; }

/* Captcha */
.captcha-box    { background: #f4f5fb; border: 1px solid #d0d4ef; border-radius: 8px; padding: 16px 20px; }
.captcha-header { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--azul); margin-bottom: 12px; }
.captcha-body   { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha-question { font-size: 1.1rem; font-weight: bold; color: #1a1a2e; background: #fff; border: 1px solid #c8cde8; border-radius: 5px; padding: 8px 18px; letter-spacing: 1px; min-width: 120px; text-align: center; }
.captcha-input    { width: 100px !important; text-align: center; font-size: 1rem; font-weight: bold; }
.captcha-refresh  { background: transparent; border: 1px solid #c8cde8; border-radius: 5px; padding: 8px 12px; color: var(--azul); cursor: pointer; font-size: 0.9rem; transition: background 0.15s; }
.captcha-refresh:hover { background: #e8eaf3; }


/* ── 11. FORMULARIO CONTACTO — overrides fondo oscuro ───────────── */

#form-contacto .captcha-input    { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.35); color: #fff; }
#form-contacto .captcha-input::placeholder { color: rgba(255,255,255,0.5); }
#form-contacto .captcha-box      { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
#form-contacto .captcha-header   { color: rgba(255,255,255,0.75); }
#form-contacto .captcha-question { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); color: #fff; }
#form-contacto .btn-reset        { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.75); }
#form-contacto .btn-reset:hover  { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }
#form-contacto .captcha-refresh      { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.75); }
#form-contacto .captcha-refresh:hover { background: rgba(255,255,255,0.08); border-color: #fff; color: #fff; }


/* ── 12. PERSONAL ───────────────────────────────────────────────── */

.personal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }

.personal-card { border: 1px solid var(--azul-border); border-radius: 12px; overflow: hidden; background: var(--blanco); transition: box-shadow 0.2s; }
.personal-card:hover { box-shadow: 0 4px 16px rgba(38,52,139,0.1); }

.personal-card-top { background: var(--azul); padding: 1.4rem; display: flex; justify-content: center; }

.avatar { width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: #fff; }

.personal-card-body { padding: 1.1rem 1.2rem; }
.personal-card-body h3   { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.personal-card-body .cargo { font-size: 0.85rem; color: var(--azul-lt); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.7rem; }
.personal-card-body .remu  { font-size: 0.88rem; color: var(--gris); }

.badge-titular  { display: inline-block; margin-bottom: 0.4rem; background: var(--azul); color: #fff; font-size: 0.64rem; font-weight: 600; padding: 0.18rem 0.5rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
.badge-suplente { display: inline-block; margin-bottom: 0.4rem; background: var(--azul-pale); color: var(--azul-lt); font-size: 0.64rem; font-weight: 500; padding: 0.18rem 0.5rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.06em; }


/* ── 13. TRANSPARENCIA ──────────────────────────────────────────── */

.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.1rem; }

.doc-card { background: var(--blanco); border: 1px solid var(--azul-border); border-radius: 12px; padding: 1.2rem 1.4rem; display: flex; align-items: flex-start; gap: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.doc-card:hover { border-color: var(--azul-lt); box-shadow: 0 2px 12px rgba(38,52,139,0.07); }

.doc-icon { font-size: 1.7rem; color: var(--azul-lt); flex-shrink: 0; margin-top: 0.1rem; }
.doc-card h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.doc-card p  { font-size: 0.9rem; color: var(--gris); margin-bottom: 0.7rem; line-height: 1.6; }

.doc-link { font-size: 0.9rem; color: #fff; text-decoration: underline; display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 500; background: var(--azul); padding: 0.25rem 0.7rem; border-radius: 5px; transition: background 0.15s; }
.doc-link:hover { background: var(--azul-dk); }


/* ── 14. REPERTORIO PÚBLICO DIGITAL ────────────────────────────── */

/* Filtros año / mes */
.rep-filtros { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 2rem; }
.rep-filtros label { font-size: 0.85rem; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: 0.07em; }

.rep-select {
    appearance: none; -webkit-appearance: none;
    background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2326348b' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--azul-border); border-radius: 6px;
    padding: 8px 36px 8px 14px;
    font-size: 0.92rem; font-family: inherit; color: var(--text);
    cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; min-width: 110px;
}
.rep-select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(38,52,139,0.1); }

/* Lista de entradas */
.rep-lista { display: flex; flex-direction: column; gap: 10px; }

.rep-entrada {
    display: flex; align-items: center; gap: 16px;
    background: var(--blanco);
    border: 1px solid var(--azul-border); border-left: 4px solid var(--azul);
    border-radius: 8px; padding: 16px 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.rep-entrada:hover { border-color: var(--azul-lt); box-shadow: 0 2px 12px rgba(38,52,139,0.07); }

.rep-entrada-icon { flex-shrink: 0; width: 40px; height: 40px; background: var(--azul-pale); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--azul); font-size: 1.1rem; }

.rep-entrada-body    { flex: 1; min-width: 0; }
.rep-entrada-fecha   { font-size: 0.98rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.rep-entrada-desc    { font-size: 0.85rem; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rep-entrada-actions { display: flex; gap: 8px; flex-shrink: 0; }

.rep-btn-ver,
.rep-btn-descargar { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 5px; font-size: 0.82rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }

.rep-btn-ver { background: var(--azul); color: #fff; }
.rep-btn-ver:hover { background: var(--azul-dk); }

.rep-btn-descargar { background: transparent; color: var(--azul); border: 1px solid var(--azul-border); }
.rep-btn-descargar:hover { background: var(--azul-pale); border-color: var(--azul); }

/* Estado vacío */
.rep-vacio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; color: var(--gris); text-align: center; }
.rep-vacio i { font-size: 2.2rem; color: var(--azul-border); }
.rep-vacio p { font-size: 0.95rem; margin: 0; }

/* Spinner */
.rep-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 20px; color: var(--gris); font-size: 0.95rem; }
.rep-loading i { animation: rep-spin 0.8s linear infinite; color: var(--azul-lt); }
@keyframes rep-spin { to { transform: rotate(360deg); } }


/* ── 15. CONTACTO ───────────────────────────────────────────────── */

#contacto { background: var(--azul); }
#contacto .section-tag      { color: rgba(255,255,255,0.45); }
#contacto .section-header h2 { color: #fff; }
#contacto .divider           { background: rgba(255,255,255,0.25); }

.contacto-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contacto-info   { display: flex; flex-direction: column; gap: 1.4rem; }

.contacto-item { display: flex; align-items: flex-start; gap: 0.9rem; }
.contacto-item-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.95rem; flex-shrink: 0; }
.contacto-item h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.45); margin-bottom: 0.25rem; font-weight: 500; }
.contacto-item p  { color: rgba(255,255,255,0.85); font-size: 1rem; line-height: 1.5; }

.horario-table { width: 100%; font-size: 0.95rem; border-collapse: collapse; }
.horario-table td { padding: 0.3rem 0; color: rgba(255,255,255,0.75); }
.horario-table td:first-child { color: rgba(255,255,255,0.9); font-weight: 500; width: 130px; }

.contacto-form { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 2rem; }
.contacto-form h3 { color: #fff; font-size: 1.2rem; font-weight: 600; margin-bottom: 1.4rem; }
.contacto-form .form-group label { color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.contacto-form .form-group input,
.contacto-form .form-group select,
.contacto-form .form-group textarea { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: #fff; }
.contacto-form .form-group input::placeholder,
.contacto-form .form-group textarea::placeholder { color: rgba(255,255,255,0.28); }
.contacto-form .form-group input:focus,
.contacto-form .form-group select:focus,
.contacto-form .form-group textarea:focus { border-color: rgba(255,255,255,0.4); box-shadow: 0 0 0 3px rgba(255,255,255,0.07); }
.contacto-form .form-group select option { background: var(--azul); }
.contacto-form .btn-enviar       { background: #fff; color: var(--azul); }
.contacto-form .btn-enviar:hover { background: var(--azul-pale); }


/* ── 16. FOOTER ─────────────────────────────────────────────────── */

footer { background: var(--azul-dk); padding: 2rem 2.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

.footer-left strong { display: block; color: #fff; font-size: 1rem; }
.footer-left small  { display: block; color: rgba(255,255,255,0.38); font-size: 0.82rem; margin-top: 0.2rem; font-weight: 400; }

.footer-right { font-size: 0.85rem; text-align: right; color: rgba(255,255,255,0.38); }
.footer-right a       { color: #fff; text-decoration: underline; }
.footer-right a:hover { color: rgba(255,255,255,0.7); }


/* ── 17. RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 820px) {
    .hero                    { grid-template-columns: 1fr; }
    .hero-panel              { display: none; }
    .hero h1                 { font-size: 1.9rem; }
    .form-grid               { grid-template-columns: 1fr; }
    .form-group.full,
    .file-upload-area,
    .form-actions            { grid-column: 1; }
    .contacto-layout         { grid-template-columns: 1fr; }
    .nav-links               { display: none; }
    .jurisdiccion-layout     { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
    /* Tabla trámites responsive */
    .tramites-table,
    .tramites-table thead,
    .tramites-table tbody,
    .tramites-table th,
    .tramites-table td,
    .tramites-table tr      { display: block; }
    .tramites-table thead   { display: none; }
    .tramites-table tbody tr { border: 1px solid #d0d4ef; border-radius: 6px; margin-bottom: 12px; padding: 4px 0; }
    .tramite-nombre          { font-size: 0.9rem; border-bottom: 1px solid #e8eaf3; }
    .tramite-requisitos      { font-size: 0.82rem; }
    .tramite-nombre::before  { content: 'Trámite'; display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--azul); margin-bottom: 4px; }
    .tramite-requisitos::before { content: 'Requisitos'; display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--azul); margin-bottom: 4px; }

    /* Repertorio responsive */
    .rep-entrada        { flex-wrap: wrap; gap: 12px; }
    .rep-entrada-actions { width: 100%; }
    .rep-btn-ver,
    .rep-btn-descargar  { flex: 1; justify-content: center; }
}
