﻿html, body {
  overflow-x: hidden;
  max-width: 100%;
}

* {
  box-sizing: border-box;
}

/* ── HEADER PÚBLICO ─────────────────────────────────────────────── */
.hdr {
  background: var(--navy);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shl);
}
.hdr::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green), var(--cyan));
}
.brand { display: flex; flex-direction: column; }
.brand-name {
  color: var(--white);
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  line-height: 1.1;
}
.brand-name span { color: var(--cyan); }
.brand-sub {
  color: rgba(255,255,255,.45);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hdr-btns { display: flex; gap: 6px; align-items: center; }
.hdr-btn {
  background: #00AFEF;
  border: none;
  color: white;
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hdr-btn:hover { background: #0093CB; }
.hdr-btn.subtle {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.15);
  font-size: 15px;
  padding: 6px 10px;
}
.hdr-btn.subtle:hover { color: rgba(255,255,255,.4); }

/* ── HERO ────────────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green), var(--cyan));
}
.hero h1 { color: var(--white); font-size: clamp(1.4rem,4vw,2.2rem); margin-bottom: .6rem; }
.hero p { color: rgba(255,255,255,.6); font-size: 18px; max-width: 500px; margin: 0 auto 1.75rem; }
.hero-divider { width: 50px; height: 3px; background: var(--yellow); margin: 0 auto 1.25rem; border-radius: 2px; }

/* ── CATEGORÍAS ──────────────────────────────────────────────────── */
.cat-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: .5rem; }
.cat-pill {
  background: transparent;
  border: 1.5px solid white;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: all .25s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-pill:hover { background: var(--red); border-color: var(--red); color: white; }
.cat-pill.active { background: var(--red); border-color: var(--red); color: white; font-weight: 700; }
.cat-desc { color: rgba(255,255,255,.5); font-size: 16px; text-align: center; margin-top: .5rem; min-height: 18px; padding: 0 1rem; }

/* ── FORMULARIO ──────────────────────────────────────────────────── */
.form-container { max-width: 780px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.form-card { background: var(--white); border-radius: var(--rl); box-shadow: var(--shl); overflow: hidden; }
.form-section { padding: 1.5rem; border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: none; }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1.1rem; }
.section-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--white);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.section-title { font-size: 19px; font-weight: 600; color: var(--cyan-d); }

/* ── DOCUMENTO ───────────────────────────────────────────────────── */
.doc-row { display: flex; }
.doc-sel {
  width: auto; min-width: 68px;
  border-radius: var(--r) 0 0 var(--r);
  border-right: none;
  background: var(--gray);
  font-weight: 700;
  color: var(--cyan-d);
}
.doc-inp { border-radius: 0 var(--r) var(--r) 0; }

/* ── ANÓNIMO ─────────────────────────────────────────────────────── */
.anon-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px;
  background: var(--cyan-l);
  border-radius: var(--r);
  border: 1.5px solid rgba(0,174,239,.2);
  cursor: pointer;
}
.anon-toggle input { width: 17px; height: 17px; accent-color: var(--cyan); }
.anon-toggle-label { font-size: 17px; color: var(--cyan-d); }
.anon-badge {
  background: var(--yellow-l); color: var(--yellow-d);
  font-size: 14px; padding: 2px 7px;
  border-radius: 10px; font-weight: 700;
  margin-left: auto; border: 1px solid var(--yellow);
}

/* ── MOTIVOS ─────────────────────────────────────────────────────── */
.motivo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 7px; }
.motivo-opt {
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 9px 12px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  display: flex; align-items: center; gap: 7px;
  transition: all .2s;
  user-select: none;
}
.motivo-opt:hover { border-color: var(--green); background: var(--green-l); }
.motivo-opt.active { border-color: var(--green); background: var(--green); color: var(--white); }
.motivo-opt i { font-size: 19px; flex-shrink: 0; }
.motivo-hint { font-size: 15px; color: var(--muted); margin-bottom: .65rem; display: flex; align-items: center; gap: 5px; }
.chips-row { margin-top: .65rem; display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  background: var(--green); color: var(--white);
  padding: 3px 9px; border-radius: 16px;
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.chip button { background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 17px; padding: 0; line-height: 1; }

/* ── ARCHIVOS ────────────────────────────────────────────────────── */
.file-zone {
  border: 2px dashed var(--border);
  border-radius: var(--rl);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  position: relative;
}
.file-zone:hover, .file-zone.drag { border-color: var(--cyan); background: var(--cyan-l); }
.file-zone i { font-size: 29px; color: var(--cyan); margin-bottom: .4rem; display: block; }
.file-zone p { font-size: 17px; color: var(--muted); }
.file-zone strong { color: var(--cyan-d); }
.file-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-list { margin-top: .65rem; display: flex; flex-direction: column; gap: 4px; }
.file-item {
  display: flex; align-items: center; gap: 7px;
  background: var(--cyan-l); border-radius: 6px;
  padding: 5px 9px; font-size: 16px;
}
.file-item i { color: var(--cyan); }
.fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsize { color: var(--muted); }
.file-remove { background: none; border: none; cursor: pointer; color: var(--muted); padding: 0; font-size: 17px; }
.file-remove:hover { color: var(--red); }

/* ── POLÍTICA ────────────────────────────────────────────────────── */
.policy-box {
  background: var(--cyan-l);
  border: 1px solid rgba(0,174,239,.2);
  border-radius: var(--r);
  padding: 1.1rem;
  font-size: 16px;
  color: var(--cyan-d);
  line-height: 1.7;
  margin-bottom: .875rem;
}
.policy-box strong { display: block; margin-bottom: .3rem; font-size: 15.5px; }
.policy-actions { display: flex; gap: .65rem; }
.policy-btn {
  flex: 1; padding: 9px;
  border-radius: var(--r);
  font-family: 'DM Sans', sans-serif;
  font-size: 17px; font-weight: 600;
  cursor: pointer; border: 1.5px solid;
  transition: all .2s;
}
.policy-btn.autorizo { background: var(--green-l); border-color: var(--green); color: var(--green-d); }
.policy-btn.autorizo.sel { background: var(--green); color: var(--white); }
.policy-btn.no-autorizo { background: var(--red-l); border-color: var(--red); color: var(--red-d); }
.policy-btn.no-autorizo.sel { background: var(--red); color: var(--white); }

/* ── SUBMIT ──────────────────────────────────────────────────────── */
.submit-area {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--green-l), var(--cyan-l));
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(0,166,81,.15);
}
.submit-note { font-size: 15px; color: var(--green-d); flex: 1; }

/* ── SUCCESS ─────────────────────────────────────────────────────── */
.success-panel { text-align: center; padding: 2.5rem 1.5rem; }
.success-icon {
  width: 65px; height: 65px;
  background: var(--green-l);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 33px; color: var(--green);
}
.success-panel h2 { font-size: 1.4rem; color: var(--green-d); margin-bottom: .4rem; }
.success-panel p { color: var(--muted); font-size: 17px; margin-bottom: .875rem; }
.radicado {
  font-family: monospace;
  background: var(--cyan-l);
  border: 1px solid rgba(0,174,239,.3);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 19px; color: var(--cyan-d); font-weight: 700;
  display: inline-block; margin-bottom: .65rem;
}
.rad-warn {
  background: var(--yellow-l);
  border: 1px solid var(--yellow);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 16px; color: #7a6200;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 7px; text-align: left;
}

/* ── CONSULTA CON PIN ────────────────────────────────────────────── */
.consulta-wrap { padding: 1.5rem 1rem 3rem; }
.consulta-box {
  background: var(--white);
  border-radius: var(--rl);
  box-shadow: var(--shl);
  padding: 1.75rem;
  max-width: 520px;
  margin: 0 auto;
}
.consulta-box h3 { font-size: 1.1rem; color: var(--cyan-d); margin-bottom: .4rem; }
.consulta-box p { font-size: 17px; color: var(--muted); margin-bottom: 1.1rem; }
.consulta-step { display: none; }
.consulta-step.active { display: block; }
.pin-inputs {
  display: flex; gap: 8px; justify-content: center; margin: 1.5rem 0;
}
.pin-input {
  width: 48px; height: 56px;
  text-align: center;
  font-size: 23px; font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--r);
  font-family: monospace;
}
.pin-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,174,239,.12); }

/* Vista del caso para el ciudadano */
.caso-ciudadano { margin-top: 1.5rem; }
.caso-header {
  background: var(--navy);
  color: var(--white);
  padding: 1rem 1.25rem;
  border-radius: var(--rl) var(--rl) 0 0;
  border-bottom: 3px solid var(--red);
}
.caso-header h3 { font-size: 1rem; color: white; }
.caso-header p { font-size: 15px; color: rgba(255,255,255,.55); margin-top: 2px; }
.caso-body { background: var(--white); padding: 1.25rem; border-radius: 0 0 var(--rl) var(--rl); border: 1px solid var(--border); border-top: none; }
.caso-field { margin-bottom: .875rem; }
.caso-field label { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; display: block; margin-bottom: 2px; }
.caso-field p { font-size: 17px; color: var(--text); }

/* Chat ciudadano */
.chat-ciudadano { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.chat-ciudadano h4 { font-size: 16px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .875rem; }
.msg-gestor, .msg-cliente-resp {
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 8px;
  max-width: 88%;
}
.msg-gestor { background: var(--cyan-l); color: var(--cyan-d); align-self: flex-start; }
.msg-cliente-resp { background: var(--green-l); color: var(--green-d); align-self: flex-end; margin-left: auto; }

@media (max-width: 600px) {
  .hdr-btn:not(.subtle) span { display: none; }
  .pin-input { width: 40px; height: 48px; font-size: 19px; }
}

/* ── SECCIONES PÚBLICAS ───────────────────────────────────────────── */
.pasos-section, .glosario-section, .ayuda-publica-section {
  padding: 3rem 1rem;
  background: var(--white);
}
.pasos-section { background: var(--off); }
.pasos-container { max-width: 1100px; margin: 0 auto; }
.pasos-titulo { font-size: 1.75rem; font-weight: 700; color: var(--navy); text-align: center; margin-bottom: .5rem; }
.pasos-sub { font-size: 1rem; color: var(--muted); text-align: center; margin-bottom: 2rem; }
.pasos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.paso-card { background: var(--white); border-radius: var(--rl); padding: 1.5rem; text-align: center; box-shadow: var(--sh); position: relative; }
.paso-num { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); background: var(--navy); color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; }
.paso-icon { font-size: 2rem; color: var(--navy); margin: 1rem 0 .75rem; }
.paso-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.paso-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; }
.glosario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.glosario-card { background: var(--off); border-radius: var(--r); padding: 1.25rem; text-align: center; border: 1.5px solid var(--border); transition: box-shadow .2s; }
.glosario-card:hover { box-shadow: var(--sh); }
.glosario-icon { font-size: 2rem; margin-bottom: .75rem; display: block; }
.glosario-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.glosario-card p { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.ayuda-filtros-pub { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.ayuda-pub-btn { padding: 6px 16px; border-radius: 50px; border: 1.5px solid var(--border); background: white; cursor: pointer; font-size: .9rem; font-weight: 600; font-family: 'DM Sans', sans-serif; transition: all .15s; }
.ayuda-pub-btn.active { background: var(--navy); color: white; border-color: var(--navy); }
.ayuda-acordeon { border: 1.5px solid var(--border); border-radius: var(--r); margin-bottom: .75rem; overflow: hidden; }
.ayuda-acordeon-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; background: none; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 1rem; font-weight: 600; color: var(--text); text-align: left; }
.ayuda-acordeon-btn:hover { background: var(--off); }
.ayuda-acordeon-body { display: none; padding: 0 1.25rem 1.25rem; font-size: .9rem; color: var(--muted); line-height: 1.7; }
.site-footer { width: 100%; background: var(--navy); color: white; padding: 3rem 1rem 0; margin-top: 2rem; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.6); margin-top: .5rem; }
.footer-links h4, .footer-contact h4 { font-size: .9rem; font-weight: 700; margin-bottom: .75rem; color: rgba(255,255,255,.9); }
.footer-links a { display: block; font-size: .85rem; color: rgba(255,255,255,.6); text-decoration: none; margin-bottom: .4rem; transition: color .15s; }
.footer-links a:hover { color: white; }
.footer-contact p { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: .4rem; display: flex; align-items: center; gap: 6px; }
.footer-social { display: flex; gap: 12px; margin-top: .75rem; }
.footer-social a { color: rgba(255,255,255,.7); font-size: 1.25rem; transition: color .15s; }
.footer-social a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem; text-align: center; font-size: .85rem; color: rgba(255,255,255,.4); }

@media (max-width: 768px) {
  .brand img {
    height: 32px !important;
  }
  .brand span {
    font-size: 12px !important;
  }
}
