/* ══════════════════════════════════════════════
 * CECA Tab Horizontal Widget — Estilos BEM
 * Variables CSS3 del tema ceca-theme
 * ══════════════════════════════════════════════ */

/* ── Bloque principal ── */
.ceca-tab-horizontal {
  position: relative;
  width: 100%;
}

/* ── Barra de pestañas ── */
.ceca-tab-horizontal__tabs {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  border-bottom: 1px solid #cecdcd;
}

/* ── Pestaña individual ── */
.ceca-tab-horizontal__tab {
  flex: 1 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 20px;
  font-weight: 500;
  line-height: normal;
  color: var(--ceca-primary, #002a4f);
  text-align: center;
  white-space: nowrap;
  transition:
    font-weight 0.25s ease,
    color 0.25s ease;
  font-family: inherit;
}

.ceca-tab-horizontal__tab:hover {
  opacity: 0.8;
}

.ceca-tab-horizontal__tab:focus-visible {
  outline: 2px solid var(--ceca-primary, #002a4f);
  outline-offset: -2px;
  border-radius: 4px;
}

/* ── Pestaña activa ── */
.ceca-tab-horizontal__tab--active {
  font-weight: 700;
}

/* ── Indicador animado (línea activa) ── */
.ceca-tab-horizontal__indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: var(--ceca-primary, #002a4f);
  transition:
    left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* ── Contenedor de paneles ── */
.ceca-tab-horizontal__panels {
  position: relative;
  width: 100%;
}

/* ── Panel individual ── */
.ceca-tab-horizontal__panel {
  padding: 32px 0;
  display: none;
}

.ceca-tab-horizontal__panel--active {
  display: block;
}

/* ══════════════════════════════════════════════
 * Template A — Imagen / Vídeo
 * ══════════════════════════════════════════════ */

.ceca-tab-horizontal__tpl-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ceca-tab-horizontal__media {
  width: 100%;
  line-height: 0;
}

.ceca-tab-horizontal__media img,
.ceca-tab-horizontal__media video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.ceca-tab-horizontal__caption {
  margin: 0;
  font-size: 14px;
  color: #686870;
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
 * Template B — Texto
 * ══════════════════════════════════════════════ */

.ceca-tab-horizontal__tpl-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ceca-tab-horizontal__text-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ceca-primary, #002a4f);
}

.ceca-tab-horizontal__text-body {
  font-size: 16px;
  line-height: 1.6;
}

.ceca-tab-horizontal__text-body p:last-child {
  margin-bottom: 0;
}

/* ══════════════════════════════════════════════
 * Responsive
 * ══════════════════════════════════════════════ */

@media (max-width: 767px) {
  .ceca-tab-horizontal__tabs {
    height: auto;
    min-height: 56px;
  }

  .ceca-tab-horizontal__tab {
    font-size: 16px;
    padding: 10px 8px;
  }

  .ceca-tab-horizontal__text-title {
    font-size: 22px;
  }

  .ceca-tab-horizontal__panel {
    padding: 20px 0;
  }
}
