/* ════════════════════════════════════════════════════════════
   BIM Forum Chile v13.2 — Variedad de bloques + Responsividad
   ════════════════════════════════════════════════════════════ */

/* ── ImgBand — banda fotográfica duotono (manual: estilo conexión) ── */
.imgband {
  position: relative; overflow: hidden;
  min-height: 320px; display: flex; align-items: center;
}
.imgband--tall { min-height: 420px; }
.imgband__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(1) contrast(1.05);
}
.imgband__duo {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(1,50,110,.92) 0%, rgba(1,117,201,.78) 55%, rgba(11,35,70,.88) 100%);
  mix-blend-mode: multiply;
}
.imgband::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(7,15,26,.35), transparent 60%);
}
.imgband__mesh { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.imgband__mesh svg { width: 100%; height: 100%; }
.imgband__inner { position: relative; z-index: 2; padding-top: 4rem; padding-bottom: 4rem; }
.imgband__quote { margin: 0; max-width: 780px; }
.imgband__quote p {
  font-family: var(--f-d); font-weight: 700; color: #fff;
  font-size: clamp(1.35rem, 3.2vw, 2.1rem); line-height: 1.35; text-wrap: pretty;
}
.imgband__quote cite {
  display: block; margin-top: 1.25rem; font-style: normal;
  font-size: .85rem; color: rgba(255,255,255,.65); letter-spacing: .04em;
}
.imgband__quote cite::before {
  content: ''; display: inline-block; width: 26px; height: 2px;
  background: var(--c1); vertical-align: middle; margin-right: 10px;
}
.imgband__stat { display: flex; flex-direction: column; gap: .5rem; }
.imgband__stat .n {
  font-family: var(--f-d); font-weight: 900; color: #fff;
  font-size: clamp(3rem, 8vw, 5.5rem); line-height: 1;
}
.imgband__stat .l { font-size: 1rem; color: rgba(255,255,255,.7); max-width: 420px; line-height: 1.5; }

/* ── Comisiones — rediseño (antes: cards blancas repetidas) ── */
.comision-band {
  background: linear-gradient(160deg, #071828, #0d2c4a);
  border-radius: 20px; padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(85,187,235,.15);
}
.comision-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px; background: rgba(85,187,235,.12); border-radius: 12px; overflow: hidden;
}
.comision-cell {
  background: #0a2138; padding: 1.4rem 1.5rem;
  display: flex; gap: 14px; align-items: flex-start;
  transition: background .3s;
}
.comision-cell:hover { background: #0e2c4a; }
.comision-cell .hx {
  width: 26px; height: 29px; flex-shrink: 0; margin-top: 2px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(135deg, var(--p1), var(--cta));
  display: grid; place-items: center;
  font-family: var(--f-d); font-weight: 700; font-size: .58rem; color: #fff;
}
.comision-cell .t { font-family: var(--f-d); font-weight: 700; font-size: .92rem; color: #fff; line-height: 1.35; }
.comision-cell .c { font-size: .78rem; color: rgba(255,255,255,.5); margin-top: 4px; }

/* ── Responsividad dura ─────────────────────────────────── */

/* Fluid type en headings de sección (por si algún h2 quedó fijo) */
.section h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
.section h3 { font-size: clamp(1.15rem, 2.6vw, 1.5rem); }

/* Shell: menos padding en móvil, sin overflow lateral */
@media (max-width: 640px) {
  .shell { padding-left: 1.1rem; padding-right: 1.1rem; }
  html, body { overflow-x: clip; }
  .section { padding-top: 3.25rem; padding-bottom: 3.25rem; }
  .s-head { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .s-head .s-link { margin-left: 0; }
}

/* Grids auto-colapsables genéricos usados en varias páginas */
@media (max-width: 900px) {
  .biblio { grid-template-columns: 1fr !important; }
  .biblio-filters { position: static !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
  .emp-layout { grid-template-columns: 1fr !important; }
  .emp-filters { position: static !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
}
@media (max-width: 720px) {
  .emp-band--split { flex-direction: column !important; gap: 1.5rem; }
  .emp-band__div { display: none; }
  .emp-band__col { flex-direction: column !important; align-items: flex-start !important; gap: 1rem; }
  .emp-job { flex-wrap: wrap; }
  .emp-job-side { width: 100%; flex-direction: row !important; align-items: center; justify-content: space-between; border-left: none !important; padding-left: 0 !important; border-top: 1px solid var(--ink-100); padding-top: .9rem; margin-top: .5rem; }
  .emp-searchbar { flex-direction: column; align-items: stretch; }
  .emp-sort { width: 100%; }
  .doc { flex-direction: column; }
  .doc-acts { flex-wrap: wrap; }
}

/* Drawers y modales: full-width en móvil */
@media (max-width: 560px) {
  .emp-drawer-panel, .pf-platinum, .pf-premium, .pf-estandar { width: 100vw !important; max-width: 100vw !important; border-radius: 0 !important; }
  .emp-modal-card, .pf-modal { width: calc(100vw - 2rem) !important; max-width: none !important; }
  .emp-form-row { grid-template-columns: 1fr !important; }
  .imgband { min-height: 260px; }
  .imgband__inner { padding-top: 3rem; padding-bottom: 3rem; }
}

/* Tablas (matriz beneficios) — sombra de scroll para indicar overflow */
.bmatrix-wrap {
  background:
    linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left/40px 100% no-repeat local,
    linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right/40px 100% no-repeat local,
    linear-gradient(90deg, rgba(11,27,44,.12), rgba(11,27,44,0)) left/14px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(11,27,44,.12), rgba(11,27,44,0)) right/14px 100% no-repeat scroll,
    #fff;
}

/* Hit targets móviles ≥44px */
@media (max-width: 640px) {
  .btn { min-height: 44px; }
  .nav__item, .mnav__item { min-height: 44px; }
  .biblio-fgrp label, .emp-fgroup label { min-height: 32px; display: flex; align-items: center; }
}
