/* ===========================
   Transparencia Fiscal - UI 2026
   XLIII Ayuntamiento de Tepic
   =========================== */

:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;

  --brand: #7a1530;     /* guinda institucional aproximado */
  --brand-2: #c59a54;   /* acento */
  --shadow: 0 10px 30px rgba(17, 24, 39, .08);
  --radius: 16px;
  --radius-sm: 12px;

  --max: 1100px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* Links */
a{ color: var(--brand); text-decoration:none; }
a:hover{ text-decoration: underline; }

/* Layout */
.wrapper{
  min-height:100%;
  display:flex;
  flex-direction:column;
}
.container{
  width:100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 16px 28px;
}

/* Header superior (logo/hero) */
/* Header principal - guinda institucional */
.topbar{
  background: var(--brand);
  padding: 6px 0;
}
.topbar .container{
  display:flex;
  align-items:center;
  gap:16px;
  padding: 6px 16px;
}
.topbar a.logo{
  display:flex;
  align-items:center;
  gap:12px;
  color:#fff;
  text-decoration:none;
}
.topbar a.logo img{
  height:46px;
  width:auto;
  border-radius: 8px;
  box-shadow: none;
}
.topbar .brandtext strong{
  font-size: 14px;
  font-weight: 700;
}
.topbar .brandtext span{
  font-size: 12px;
  color: rgba(255,255,255,.85);
}

/* Sub-header dorado */
.page-titlebar{
  background: var(--brand-gold);
  color:#3b2a0f;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.page-titlebar .container{
  padding: 10px 16px;
}
.page-titlebar h1{
  margin:0;
  font-size: 16px;
  font-weight: 700;
}
.page-titlebar p{
  margin:2px 0 0;
  font-size: 13px;
  color: rgba(0,0,0,.65);
}


/* Card principal */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-body{
  padding: 18px 18px 10px;
}

/* Secciones del índice (h3 + lista) */
#accordion{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

/* Título de fracción (h3.titulos original) */
h3.titulos{
  margin: 0;
  padding: 14px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  border: 1px solid var(--border);
  cursor: default;
  font-size: 15px;
  font-weight: 800;
  position: relative;
}
h3.titulos::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:6px;
  background: var(--brand);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
  opacity:.9;
}

/* Contenedor de subfracciones (div.numeral original) */
div.numeral{
  margin-top: -6px;
  padding: 10px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;

  display:flex;
  flex-direction:column;

  gap: 2px;              /* <-- antes 6px */
  font-size: 14px;
  color: var(--muted);
}
div.numeral::before{
  content:"Selecciona una sub-sección:";
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;     /* <-- antes 6, lo dejamos pero puede bajar */
}

/* links más compactos */
div.numeral a.gray{
  display:block;
  padding: 6px 10px;      /* <-- antes 10px 10px */
  border-radius: 10px;
  color: var(--text);
  text-decoration:none;
  border: 1px solid transparent;
  line-height: 1.25;      /* <-- ayuda a compactar */
}

/* cuando es texto sin link */
div.numeral > div{
  padding: 4px 10px;      /* <-- para que quede alineado con los links */
  line-height: 1.25;
  color: var(--muted);
}
/*div.numeral a.gray{
  display:block;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration:none;
  border: 1px solid transparent;
} */
div.numeral a.gray:hover{
  background: rgba(138, 29, 63, .06);
  border-color: rgba(138, 29, 63, .18);
  text-decoration:none;
}
div.numeral br{ display:none; } /* elimina el look “lista con saltos” */

/* Si hay texto sin link, que no se vea raro */
div.numeral{
  white-space: normal;
}
div.numeral{
  font-size: 14px;
  color: var(--muted);
}

/* Ajuste: convertir texto suelto en “líneas” con separación 
div.numeral{
  display:flex;
  flex-direction:column;
  gap: 6px;
}*/

div.numeral::before{
  content:"Selecciona una sub-sección:";
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ===== file.php (tabla de archivos) ===== */
.breadcrumb{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
}
.breadcrumb .kicker{
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb .title{
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.breadcrumb .subtitle{
  font-size: 13px;
  color: var(--muted);
}

/* Tabla moderna */
.tablas{
  width:100%;
  border-collapse: separate;
  border-spacing: 0 10px;   /* “filas tipo card” */
}
.tablas th{
  text-align:left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 12px;
}
.tablas tr{
  background:#fff;
}
.tablas tr td{
  padding: 12px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tablas tr td:first-child{
  border-left: 1px solid var(--border);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  width: 56px;
  text-align:center;
}
.tablas tr td:last-child{
  border-right: 1px solid var(--border);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Fila de grupo */
.tablas tr.grupo td{
  padding: 12px 12px;
  font-weight: 900;
  color: var(--brand);
  background: rgba(138, 29, 63, .06);
  border: 1px dashed rgba(138, 29, 63, .30);
  border-radius: 12px;
}

/* Links dentro de tabla */
.tablas td a{
  color: var(--text);
  font-weight: 700;
  text-decoration:none;
}
.tablas td a:hover{
  text-decoration: underline;
}
.smallmeta{
  display:block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}

/* Iconos tipo archivo */
.file-icon{
  width:22px;
  height:22px;
  vertical-align: middle;
}

/* Footer institucional */
.site-footer{
  margin-top:auto;
  background: #7a1530;
  color: rgba(255,255,255,.88);
  border-top: 1px solid rgba(255,255,255,.08);
}
.site-footer .container{
  padding: 18px 16px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.site-footer .left{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.site-footer .left strong{
  font-size: 13px;
}
.site-footer .left span{
  font-size: 12px;
  color: rgba(255,255,255,.70);
}
.site-footer .right{
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

/* Responsive */
@media (max-width: 700px){
  .topbar .container{
    flex-direction:column;
    align-items:flex-start;
  }
  .page-titlebar h1{ font-size: 16px; }
  .tablas th:nth-child(2), .tablas td:nth-child(2){ display:none; } /* oculta “Dependencia” en móvil */
  .tablas th:nth-child(3), .tablas td:nth-child(3){ display:none; } /* oculta “Publicación” en móvil */
}
/* ======= INDEX: compactación final ======= */
div.numeral{
  margin-top: -6px;
  padding: 10px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;

  display:flex;
  flex-direction:column;
  gap: 1px;                 /* súper compacto */

  font-size: 14px;
  color: var(--muted);
}

div.numeral::before{
  content:"Selecciona una sub-sección:";
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;       /* menos aire */
}

div.numeral a.gray{
  display:block;
  padding: 4px 10px;        /* compacto real */
  border-radius: 10px;
  color: var(--text);
  text-decoration:none;
  border: 1px solid transparent;
  line-height: 1.15;        /* compacto */
}

div.numeral a.gray:hover{
  background: rgba(138, 29, 63, .06);
  border-color: rgba(138, 29, 63, .18);
  text-decoration:none;
}

/* cuando es texto sin link */
div.numeral > div{
  padding: 3px 10px;
  line-height: 1.15;
  color: var(--muted);
}
main.container{
  margin-top: 14px;
}

div.numeral br{ display:none; }
/* === FIX DEFINITIVO: barra dorada institucional === */
.page-titlebar{
  background-color: #c59a54 !important; /* dorado Tepic */
  color: #3b2a0f !important;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.page-titlebar h1{
  color: #3b2a0f !important;
}

.page-titlebar p{
  color: rgba(0,0,0,.65) !important;
}
/* Oculta elementos vacíos que vienen de BD (espacios, separadores viejos) */
div.numeral a.gray:empty,
div.numeral > div:empty{
  display:none !important;
  padding:0 !important;
  margin:0 !important;
}
