/* Copa Jalisco — página de TORNEO (landing). Depende de styles.css + site.css.
 * Reutiliza .cj-section / .cj-sechead / .cj-gcard / .cj-ggrid de home.css
 * (home.css se enlaza también en esta vista). Consolidar en components.css luego. */

/* botón pill reutilizable */
.cj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-pill); cursor: pointer;
  font-family: var(--font-sans); font-weight: 700; font-size: var(--text-sm);
  text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none; border: none;
}
.cj-btn:hover { text-decoration: none; }
.cj-btn--gold { background: var(--gold-400); color: var(--ink-900); }
.cj-btn--gold:hover { background: var(--gold-300); }
.cj-btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.28); }
.cj-btn--ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }
.cj-btn--brand { background: var(--brand); color: #fff; }
.cj-btn--brand:hover { background: var(--brand-strong); color: #fff; }
.cj-btn--outline { background: var(--surface-card); color: var(--text-strong); border: 1.5px solid var(--border-strong); }
.cj-btn--outline:hover { border-color: var(--brand); color: var(--brand); }
.cj-btn--sm { height: 40px; padding: 0 16px; font-size: var(--text-xs); }

/* ============================================================ HERO TORNEO */
.cj-thero { position: relative; background: var(--royal-950); overflow: hidden; }
.cj-thero__bg { position: absolute; inset: 0; background: radial-gradient(120% 130% at 50% 0%, var(--royal-700) 0%, var(--royal-950) 68%); }
.cj-thero__inner {
  position: relative; max-width: 1000px; margin: 0 auto; padding: 56px 24px;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap; justify-content: center; text-align: center;
}
.cj-thero__logo { width: 150px; height: auto; max-height: 170px; object-fit: contain; display: block; filter: drop-shadow(0 8px 20px rgba(0,0,0,0.4)); }
.cj-thero__body { flex: 1; min-width: 260px; }
.cj-thero__title { font-family: var(--font-display); text-transform: uppercase; color: #fff; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.02; letter-spacing: 0.005em; margin: 8px 0 0; }
.cj-thero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; justify-content: center; }

@media (min-width: 720px) {
  .cj-thero__inner { text-align: left; justify-content: flex-start; }
  .cj-thero__cta { justify-content: flex-start; }
}

/* ============================================================ AVISO destacado */
.cj-aviso {
  max-width: 1000px; margin: -28px auto 0; position: relative; z-index: 2;
  background: var(--surface-card); border: 1px solid var(--border); border-left: 4px solid var(--gold-400);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 20px 24px;
}
.cj-aviso__eyebrow { display: inline-flex; align-items: center; gap: 7px; }
.cj-aviso__title { font-family: var(--font-sans); font-weight: 800; font-size: var(--text-lg); color: var(--text-strong); margin: 8px 0 4px; }
.cj-aviso__text { font-size: var(--text-sm); color: var(--text-body); margin: 0; }
.cj-aviso__foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: var(--text-xs); color: var(--text-subtle); }

/* ============================================================ CATEGORÍAS (chips) */
.cj-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cj-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--radius-pill); background: var(--surface-card); border: 1px solid var(--border-strong);
  font-family: var(--font-sans); font-weight: 700; font-size: var(--text-sm); color: var(--text-strong);
  text-decoration: none;
}
.cj-chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.cj-chip i { color: var(--accent-strong); }

/* ============================================================ DOCUMENTOS OFICIALES (visor 2 paneles) */
.cj-docs { background: var(--bg-subtle); border-top: 1px solid var(--border); margin-top: 56px; }
.cj-docs__inner { max-width: 1200px; margin: 0 auto; padding: 48px 24px 56px; }
.cj-docs__grid { display: grid; grid-template-columns: 360px 1fr; gap: 28px; align-items: start; }

/* lista de documentos (izquierda) */
.cj-doc-list { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.cj-doc { padding: 20px; border-bottom: 1px solid var(--divider); transition: background var(--dur-base) var(--ease-out); }
.cj-doc:last-child { border-bottom: none; }
.cj-doc.is-active { background: var(--royal-50); }
.cj-doc__top { display: flex; align-items: center; gap: 14px; }
.cj-doc__icon { width: 46px; height: 46px; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cj-doc__icon--conv { background: var(--live-100); color: var(--live-600); }
.cj-doc__icon--reg  { background: var(--gold-100); color: var(--gold-700); }
.cj-doc__name { font-family: var(--font-sans); font-weight: 800; font-size: var(--text-lg); color: var(--text-strong); line-height: 1.1; }
.cj-doc__sub { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.cj-doc__actions { display: flex; gap: 10px; margin-top: 18px; }
.cj-doc__actions .cj-btn { flex: 1; }

/* panel de vista previa (derecha) */
.cj-preview { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; min-height: 620px; }
.cj-preview__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--divider); }
.cj-preview__title { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-sans); font-weight: 800; font-size: var(--text-lg); color: var(--text-strong); }
.cj-preview__title i { color: var(--royal-600); }
.cj-preview__open { font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--royal-600); text-decoration: none; white-space: nowrap; }
.cj-preview__open:hover { text-decoration: underline; }
.cj-preview__body { flex: 1; position: relative; background: var(--bg-sunken); display: flex; align-items: center; justify-content: center; }
.cj-preview__body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; display: block; }
.cj-preview__body img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.cj-preview__empty { text-align: center; padding: 40px 24px; color: var(--text-muted); font-family: var(--font-sans); font-size: var(--text-base); }
.cj-preview__empty i { color: var(--slate-400); }
.cj-preview__empty a { color: var(--royal-600); font-weight: 700; }

@media (max-width: 860px) {
  .cj-docs__grid { grid-template-columns: 1fr; }
  .cj-preview { min-height: 480px; }
}

.cj-aviso__more {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--royal-600); text-decoration: none; cursor: pointer; background: none; border: none;
}
.cj-aviso__more:hover { color: var(--royal-700); text-decoration: underline; }

/* ============================================================ LISTADO DE AVISOS */
.cj-avisos-list { display: flex; flex-direction: column; gap: 12px; }
.cj-aviso-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.cj-aviso-item:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.cj-aviso-item__icon { width: 42px; height: 42px; border-radius: var(--radius-md); background: var(--gold-100); color: var(--gold-700); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cj-aviso-item__body { flex: 1; min-width: 0; }
.cj-aviso-item__title { font-family: var(--font-sans); font-weight: 800; font-size: var(--text-base); color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cj-aviso-item__excerpt { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cj-aviso-item__date { font-family: var(--font-sans); font-size: var(--text-xs); color: var(--text-subtle); white-space: nowrap; flex-shrink: 0; }

/* paginación */
.cj-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }
.cj-pager__btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--text-strong); cursor: pointer; }
.cj-pager__btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.cj-pager__btn:disabled { opacity: 0.4; cursor: default; }
.cj-pager__info { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-muted); }

/* ============================================================ MODAL de aviso */
.cj-modal { position: fixed; inset: 0; z-index: 300; background: rgba(12,16,36,0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 24px; }
.cj-modal.is-open { display: flex; animation: cj-fade 0.18s var(--ease-out); }
@keyframes cj-fade { from { opacity: 0; } to { opacity: 1; } }
.cj-modal__card { width: min(520px, 100%); max-height: 85vh; overflow-y: auto; background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.cj-modal__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 12px; }
.cj-modal__icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--gold-100); color: var(--gold-700); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cj-modal__title { font-family: var(--font-sans); font-weight: 800; font-size: var(--text-h4); color: var(--text-strong); flex: 1; line-height: 1.25; }
.cj-modal__close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-card); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-body); flex-shrink: 0; }
.cj-modal__close:hover { background: var(--bg-subtle); }
.cj-modal__body { padding: 0 22px 22px; }
.cj-modal__text { font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-body); line-height: 1.6; white-space: pre-line; margin: 0; }
.cj-modal__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--divider); font-family: var(--font-sans); font-size: var(--text-xs); color: var(--text-subtle); }

/* estado vacío genérico */
.cj-empty {
  text-align: center; padding: 40px 24px; color: var(--text-muted);
  font-family: var(--font-sans); font-size: var(--text-sm);
  background: var(--surface-card); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}
